yangan
2024-06-12 a54597994e1a2112cddcc356de93174525dd1710
pages/login/userPassword.vue
@@ -89,18 +89,24 @@
                        //查询用户详细信息并储存
                        this.$reqGet('getUserEntity')
                           .then(res => {
                              this.$u.toast('登录成功');
                              this.setUserTabbar(res.data.type);
                              uni.setStorageSync('roleType', res.data.type);
                              uni.setStorageSync("userId", res.data.userId)
                              uni.setStorageSync("carNo", res.data.carNo)
                              setCustomerId(res.data.customerid);
                              setName(res.name);
                              uni.hideLoading();
                              //跳转页面
                              this.$nextTick(() => {
                                 redirectHome();
                              });
                    this.$u.toast('登录成功');
                    this.setUserTabbar(res.data.type);
                    uni.setStorageSync('roleType', res.data.type);
                    uni.setStorageSync("userId", res.data.userId)
                    uni.setStorageSync("carNo", res.data.carNo)
                    setCustomerId(res.data.customerid);
                    setName(res.name);
                    uni.hideLoading();
                    if(res.data.forcePassword == 1) {
                      uni.navigateTo({
                        url: '/pages/login/resetPassword/resetPassword'
                      })
                    }else {
                      //跳转页面
                      this.$nextTick(() => {
                        redirectHome();
                      });
                    }
                           })
                           .catch(err => {
                              this.submitLoading = false
@@ -150,4 +156,4 @@
   .dengluBtn {
      margin-top: 80rpx;
   }
</style>
</style>