qingyiay
2023-08-28 82a7eba143cc761b303b99889193f7aad2dc9d08
pages/login/userPassword.vue
@@ -2,29 +2,27 @@
   <view>
      <view class="list">
         <view class="list-call">
            <u--input
               v-model="username"
            <u--input v-model="username"
               clearable
               maxlength="32"
               type="text"
               placeholder="请输入手机号"
               prefixIcon="account"
               prefixIconStyle="font-size: 22px;color: #909399"
            ></u--input>
               prefixIconStyle="font-size: 22px;color: #909399"></u--input>
         </view>
         <view class="list-call">
            <u--input
               v-model="password"
            <u--input v-model="password"
               clearable
               maxlength="32"
               type="password"
               placeholder="请输入密码"
               prefixIcon="lock"
               prefixIconStyle="font-size: 22px;color: #909399"
            ></u--input>
               prefixIconStyle="font-size: 22px;color: #909399"></u--input>
         </view>
      </view>
      <view class="loginBtn"><u-button type="primary" :text="btnText == 1 ? '绑定' : '登录'" @click="submit()"></u-button></view>
      <view class="loginBtn"><u-button type="primary"
            :text="btnText == 1 ? '绑定' : '登录'"
            @click="submit()"></u-button></view>
   </view>
</template>
@@ -90,6 +88,7 @@
                           this.$u.toast('登录成功');
                           this.setUserTabbar(res.data.type);
                           uni.setStorageSync('roleType', res.data.type);
                              uni.setStorageSync("userId", res.data.userId)
                           setCustomerId(res.data.customerid);
                           setName(res.name);
                           uni.hideLoading();
@@ -115,7 +114,8 @@
                     }
                  });
                  if (uni.getStorageSync('bindcode')) {
                     this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('bindcode') }, 'params').then(res => {
                        this.$reqPost('wxBind', { state: 'MINI', code: uni.getStorageSync('bindcode') },
                           'params').then(res => {
                        uni.hideLoading();
                        if (res.code == 0) {
                           this.$u.toast('绑定成功!即将回到登录页!');
@@ -139,6 +139,7 @@
<style lang="scss">
@import 'index.scss';
.dengluBtn {
   margin-top: 80rpx;
}