A fixing device used for fixedly connecting a first component and a second component, the fixing device comprising a connection member connected to the first component and a base connected to the second component, the connection member configured for being in lock connection with the base by means of a locking mechanism, wherein the fixing device further comprises a pre-locking mechanism having a pre-locking state and an unlocking state; before the locking mechanism locks the connection member and the base, the pre-locking mechanism is in the pre-locking state, and the connection member and the base are in limited fitting by means of the pre-locking mechanism, so as to prevent the connection member from being detached from the base; and when the pre-locking mechanism is in the unlocking state, the connection member can be detached from the base, wherein the first component is a wall or a rack, the second component is a body of the sanitary ware; the locking mechanism is arranged on the base, and the pre-locking mechanism comprises a pre-locking fitting surface arranged on the connection member and a pre-locking part; the pre-locking fitting surface and/or the pre-locking part can move between an unlocking position and a pre-locking position; when the pre-lock mechanism is in the pre-locking state, the pre-locking fitting surface and/or the pre-locking part is in the pre-locking position, and the pre-locking fitting surface is in limited fitting with the pre-locking part, so that the connection member and the base are in limited fitting; and when the pre-lock mechanism is in the unlocking state, the pre-locking fitting surface and/or the pre-locking part is in the unlocking position, and the pre-locking fitting surface is separated from the pre-locking part, so that the connection member can be separated from the base; wherein the connection member is also provided with a locking fitting surface, and the locking mechanism locks and connects the connection member and the base through locking fitting with the locking fitting surface; the connection member is a connecting rod, the base is internally provided with a connecting channel into which the connecting rod is inserted, a side wall of the connecting channel is provided with a radial through hole communicating with the connecting channel, and the locking mechanism is inserted into the connecting channel through the radial through hole; and a side wall of the connection member is provided with a concave part, and a surface of the concave part is formed with the locking fitting surface; the locking mechanism comprises a screw connection member, which is in screw connection with the radial through hole, and when the screw connection member is rotated, the screw connection member is in locking fitting with the locking fitting surface; characterised in that the pre-locking part is arranged on the locking mechanism. wherein the first component is a wall or a rack, the second component is a body of the sanitary ware; the locking mechanism is arranged on the base, and the pre-locking mechanism comprises a pre-locking fitting surface arranged on the connection member and a pre-locking part; the pre-locking fitting surface and/or the pre-locking part can move between an unlocking position and a pre-locking position; when the pre-lock mechanism is in the pre-locking state, the pre-locking fitting surface and/or the pre-locking part is in the pre-locking position, and the pre-locking fitting surface is in limited fitting with the pre-locking part, so that the connection member and the base are in limited fitting; and when the pre-lock mechanism is in the unlocking state, the pre-locking fitting surface and/or the pre-locking part is in the unlocking position, and the pre-locking fitting surface is separated from the pre-locking part, so that the connection member can be separated from the base; wherein the connection member is also provided with a locking fitting surface, and the locking mechanism locks and connects the connection member and the base through locking fitting with the locking fitting surface; the connection member is a connecting rod, the base is internally provided with a connecting channel into which the connecting rod is inserted, a side wall of the connecting channel is provided with a radial through hole communicating with the connecting channel, and the locking mechanism is inserted into the connecting channel through the radial through hole; and a side wall of the connection member is provided with a concave part, and a surface of the concave part is formed with the locking fitting surface; the locking mechanism comprises a screw connection member, which is in screw connection with the radial through hole, and when the screw connection member is rotated, the screw connection member is in locking fitting with the locking fitting surface; characterised in that the pre-locking part is arranged on the locking mechanism.