An air conditioner, comprising: an indoor unit; a drainage pipe having a first end connected with the indoor unit and a second end; a fixing post arranged on an outer wall of the drainage pipe; a water pipe, the second end of the drainage pipe being inserted in a first end of the water pipe; and a snap arranged to the first end of the water pipe and snapped with the fixing post, wherein the snap is an unclosed ring structure, and comprises a fixing ring, a snap bracket, and a snap ring, the fixing ring, the snap bracket, and the snap ring are arranged to extend perpendicular to one another, an end of the fixing ring is connected to the snap bracket, another end of the snap bracket is connected to the snap ring, the fixing ring is fitted over an outer wall of the first end of the water pipe, and the snap ring is configured to be snapped with the fixing post, wherein the water pipe comprises a pipe orifice, a pipe portion and a rubber pad, the pipe orifice is located at an opening of the pipe portion, the rubber pad is arranged inside the pipe portion and is located on a first boss inside the pipe portion, the second end of the drainage pipe is inserted in the pipe portion through the pipe orifice, the second end of the drainage pipe is snapped with the rubber pad, and the fixing ring is arranged outside the pipe portion, wherein the drainage pipe comprises a pipe body and a quick-release head arranged to a second end of the pipe body, the fixing post is arranged on an outer wall of the quick-release head, and the pipe body is inserted in the quick-release head, wherein the quick-release head comprises a movable in-pipe sleeve, a shell, and a water-pipe joint, a first end of the movable in-pipe sleeve is connected with the second end of the drainage pipe, and a second boss is provided at a bottom of the movable in-pipe sleeve, characterized in that a second end of the quick-release head is inserted in the water pipe, and the second end of the quick-release head is snapped with the rubber pad, the quick-release head further comprises a spring and a sealing ring, the movable in-pipe sleeve is arranged in the spring, and the spring is arranged in the shell, a cylindrical wall of the movable in-pipe sleeve is provided with a plurality of through holes corresponding to the spring, the sealing ring is arranged at an opening of a first end of the shell, the water-pipe joint is arranged to a second end of the shell and inserted in the water pipe, and the fixing post is arranged on an outer wall of the shell. an indoor unit; a drainage pipe having a first end connected with the indoor unit and a second end; a fixing post arranged on an outer wall of the drainage pipe; a water pipe, the second end of the drainage pipe being inserted in a first end of the water pipe; and a snap arranged to the first end of the water pipe and snapped with the fixing post, wherein the snap is an unclosed ring structure, and comprises a fixing ring, a snap bracket, and a snap ring, the fixing ring, the snap bracket, and the snap ring are arranged to extend perpendicular to one another, an end of the fixing ring is connected to the snap bracket, another end of the snap bracket is connected to the snap ring, the fixing ring is fitted over an outer wall of the first end of the water pipe, and the snap ring is configured to be snapped with the fixing post, wherein the water pipe comprises a pipe orifice, a pipe portion and a rubber pad, the pipe orifice is located at an opening of the pipe portion, the rubber pad is arranged inside the pipe portion and is located on a first boss inside the pipe portion, the second end of the drainage pipe is inserted in the pipe portion through the pipe orifice, the second end of the drainage pipe is snapped with the rubber pad, and the fixing ring is arranged outside the pipe portion, wherein the drainage pipe comprises a pipe body and a quick-release head arranged to a second end of the pipe body, the fixing post is arranged on an outer wall of the quick-release head, and the pipe body is inserted in the quick-release head, wherein the quick-release head comprises a movable in-pipe sleeve, a shell, and a water-pipe joint, a first end of the movable in-pipe sleeve is connected with the second end of the drainage pipe, and a second boss is provided at a bottom of the movable in-pipe sleeve, characterized in that a second end of the quick-release head is inserted in the water pipe, and the second end of the quick-release head is snapped with the rubber pad, the quick-release head further comprises a spring and a sealing ring, the movable in-pipe sleeve is arranged in the spring, and the spring is arranged in the shell, a cylindrical wall of the movable in-pipe sleeve is provided with a plurality of through holes corresponding to the spring, the sealing ring is arranged at an opening of a first end of the shell, the water-pipe joint is arranged to a second end of the shell and inserted in the water pipe, and the fixing post is arranged on an outer wall of the shell.