BMI
getBMI(){ let userInfo = uni.getStorageSync("userInfo"); let { weight,height,gender} = {...userInfo}; this.gender = gender; // 获取用户的性别信息 if(weight && height){ let bmi = weight * 10000 / (height * height); if(18.5< bmi <= 24){ this.bmiType = 1; }else { this.bmiType = 2; this.bmiMsk = '多多注意!' } this.bmi = parseInt(bmi); }else { this.bmiType = 3; } },