Sweating is a way for the human body to cool down in order to maintain body temperature, and it has nothing to do with whether you lose weight or not. Once the body temperature rises to a certain extent, the body will sweat and absorb heat through evaporation, so that the body surface temperature will drop rapidly.
What can raise the body temperature is that the outside temperature is too high, such as hot summer days, exercise and fever.