#
whycq
2023-03-20 eabfdea3f6f37bdcc63d79dccd062210d345d5c2
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>
@@ -60,18 +60,18 @@
         <uni-popup ref="inputDialog" type="dialog">
            <view class="popup">
               <!-- 标题 -->
               <view class="title">配 置</view>
               <view class="input">
                  <view class="input-left">IP:</view>
                  <view class="input-right"><input type="text"></view>
               <view class="title">配置</view>
               <view class="popup-item">
                  <view class="popup-item-left">IP:</view>
                  <view class="popup-item-right"><input type="text"></view>
               </view>
               <view class="input">
                  <view class="input-left">端口:</view>
                  <view class="input-right"><input type="text"></view>
               <view class="popup-item">
                  <view class="popup-item-left">端口:</view>
                  <view class="popup-item-right"><input type="text"></view>
               </view>
               <view class="input">
                  <view class="input-left">项目:</view>
                  <view class="input-right"><input type="text"></view>
               <view class="popup-item">
                  <view class="popup-item-left">项目:</view>
                  <view class="popup-item-right"><input type="text"></view>
               </view>
               <view class="btn">
                  <view class="btn-left" @click="close">取消</view>
@@ -95,7 +95,11 @@
      data() {
         return {
            version: '',
            value: ''
            value: '',
            load: {
               loading: false,
               btnText: '登录'
            },
         }
      },
      onLoad() {
@@ -119,11 +123,25 @@
         // 设置窗口关闭按钮
         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)
         }
      }
   }
</script>
<style>
   @import url('../../static/css/wms.css/wms.css');
   /* 设置区域 */
   .settings {
      min-height: 100rpx;
@@ -210,69 +228,10 @@
      color: #909399;
   }
   
   .popup {
      width: 80vw;
      min-height: 400rpx;
      background-color: #FFF;
      border-radius: 25rpx;
   }
   .title {
      height: 100rpx;
      line-height: 100rpx;
      width: 100%;
      color: #606266;
      text-align: center;
      font-size: 18px;
   }
   .input {
      height: 80rpx;
      line-height: 80rpx;
      display: flex;
      align-items: center;
      font-size: 14px;
   }
   .input-left {
      width: 16vw;
      padding-right: 20rpx;
      text-align: right;
      color: #606266;
   }
   .input-right {
      display: flex;
      align-items: center;
      width: 50vw;
      height: 50rpx;
      padding: 2px 5px;
      border: 1px solid #E4E7ED;
      border-radius: 5rpx;
   }
   .input-right input{
      color: #606266;
   }
   .btn {
      display: flex;
      height: 90rpx;
      margin-top: 20rpx;
      border-top: 1px solid #DCDFE6;
      justify-content: center;
      align-items: center;
   }
   .btn-left {
      display: flex;
      flex: 1;
      height: 100%;
      justify-content: center;
      align-items: center;
      color: #606266;
      border-right: 1px solid #DCDFE6;
   }
   .btn-right {
      display: flex;
      flex: 1;
      justify-content: center;
      align-items: center;
      color: #409EFF;
   }