Cosmetic container with a massage function