wk
2024-06-26 6fa23352c5944e6bf2a108aa68b8780df3a7edea
pages/login/login.vue
@@ -2,8 +2,9 @@
   <view class="login">
      <view class="logo">无人值守</view>
      <!--用户名密码登录-->
      <user-password :btnText="0" />
      <user-password :btnText="0" :userList="userList"/>
      <!-- 微信openid登录 -->
    <!--  #ifdef MP-WEIXIN  -->
      <view class="loginBtn">
         <u-button class="button"
            @click.stop="beforeLoginEvent"
@@ -12,6 +13,7 @@
            type="primary"
            text="微信一键登录"></u-button>
      </view>
    <!--  #endif  -->
      <view class="utils-block">
         <view @click="forgetPassword"><text>忘记密码?</text></view>
         <view @click="PrivacyAgreementHandle"><text>新用户注册</text></view>
@@ -21,6 +23,8 @@
         <view class="copyright">冀中能源无人值守微信小程序</view>
         <view class="copyright">小程序仅供已拥有系统账号特定内部人员使用</view>
      </view>
    <!--  #ifdef MP-WEIXIN  -->
      <!-- 微信授权前的弹框 -->
      <view class="loginPopup">
         <u-popup :show="loginPopupShow"
@@ -55,6 +59,7 @@
            @confirm="bindWxConfirm"
            @cancel="bindWxCancel"></u-modal>
      </view>
    <!--  #endif  -->
   </view>
</template>
@@ -74,10 +79,14 @@
            bindWxContent: '如果已拥有系统账号,可以直接跳转绑定微信页面',
            appid: "",
            secret: "",
            userList:[]
         };
      },
      components: {
         userPassword
      },
      onShow() {
         this.userList=uni.getStorageSync('userList')?JSON.parse(uni.getStorageSync('userList')):[];
      },
      methods: {
         ...mapMutations(['setUserTabbar', 'changeisLogin']),
@@ -311,4 +320,4 @@
         }
      }
   }
</style>
</style>