pages/login/userPassword.vue
@@ -43,9 +43,8 @@
   },
   data() {
      return {
         // username: '12222222222',// 客户
         // username: '18805080506',// 王楠(司机)
         username: '13333333332',// driver
         // username: '12222222222', // 客户
         username: '13333333332',// 司机
         password: '123456',
         remember: true,
         baseUrl: ''
@@ -85,20 +84,22 @@
                     setRefreshToken(res.refresh_token);
                     setUsernameKey(res.username);
                     //查询用户详细信息并储存
                     this.$reqGet('getUserEntity').then(res => {
                        this.$u.toast('恭喜您,登录成功!');
                        this.setUserTabbar(res.data.type);
                        uni.setStorageSync('roleType', res.data.type);
                        setCustomerId(res.data.customerid);
                        uni.hideLoading();
                        //跳转页面
                        this.$nextTick(() => {
                           redirectHome();
                     this.$reqGet('getUserEntity')
                        .then(res => {
                           this.$u.toast('恭喜您,登录成功!');
                           this.setUserTabbar(res.data.type);
                           uni.setStorageSync('roleType', res.data.type);
                           setCustomerId(res.data.customerid);
                           uni.hideLoading();
                           //跳转页面
                           this.$nextTick(() => {
                              redirectHome();
                           });
                        })
                        .catch(err => {
                           this.$u.toast('登录异常!');
                           console.log(err);
                        });
                     }).catch(err=>{
                        this.$u.toast('登录异常!');
                        console.log(err);
                     });
                  } else {
                     uni.hideLoading();
                     this.$u.toast(res.msg);