qingyiay
2023-07-26 c636483eef9fcdf1805f6a968914bf95255de2fc
pages/login/userPassword.vue
@@ -7,7 +7,7 @@
               clearable
               maxlength="32"
               type="text"
               placeholder="请输入用户名"
               placeholder="请输入手机号"
               prefixIcon="account"
               prefixIconStyle="font-size: 22px;color: #909399"
            ></u--input>
@@ -43,10 +43,10 @@
   },
   data() {
      return {
         username: '12222222222', // 客户
         username: '', // 客户
         // username:'13333333331',//货代
         // username: '13333333332',// 司机
         password: '123456',
         password: '',
         remember: true,
         baseUrl: ''
      };
@@ -107,17 +107,26 @@
                     this.$u.toast(res.msg);
                  }
               } else {
                  this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('code') }, 'params').then(res => {
                     uni.hideLoading();
                     if (res.code == 0) {
                        this.$u.toast('绑定成功!即将回到登录页!');
                        setTimeout(() => {
                           uni.navigateBack();
                        }, 1000);
                     } else {
                        this.$u.toast(res.msg ? res.msg : '绑定失败');
                  uni.login({
                     success: res => {
                        if (res.code) {
                           uni.setStorageSync('bindcode', res.code);
                        }
                     }
                  });
                  if (uni.getStorageSync('bindcode')) {
                     this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('bindcode') }, 'params').then(res => {
                        uni.hideLoading();
                        if (res.code == 0) {
                           this.$u.toast('绑定成功!即将回到登录页!');
                           setTimeout(() => {
                              uni.navigateBack();
                           }, 1000);
                        } else {
                           this.$u.toast(res.msg ? res.msg : '绑定失败');
                        }
                     });
                  }
               }
            })
            .catch(e => {