#
whycq
2023-03-19 eb32a99a8ae487f90ffd7f0917c819ec5cc577d7
pages/login/login.vue
@@ -50,7 +50,7 @@
      <!-- 登录按钮 -->
      <view class="submit">
         <view class="" style="width: 400rpx;">
            <button type="primary" size="default">登录</button>
            <button type="primary" @click="onLogin()" :loading="load.loading">{{load.btnText}}</button>
         </view>
      
      </view>
@@ -95,7 +95,11 @@
      data() {
         return {
            version: '',
            value: ''
            value: '',
            load: {
               loading: false,
               btnText: '登录'
            },
         }
      },
      onLoad() {
@@ -119,6 +123,19 @@
         // 设置窗口关闭按钮
         close() {
            this.$refs.inputDialog.close()
         },
         onLogin() {
            let that = this
            that.load.loading = true;
            that.load.btnText = '登录中';
            setTimeout(()=> {
               uni.showToast({title: '登录成功'})
               setTimeout(()=> {
                  uni.reLaunch({
                     url: '../home/home'
                  });
               },300)
            },700)
         }
      }
   }