#
whycq
2022-07-21 dde7d54074db587277530651e02bd3af6b61b221
pages/login/login.vue
@@ -48,20 +48,21 @@
      <view>
         <uni-popup ref="popup" type="right">
            <view class="config">
               <view>
                  <text>ip地址</text>
                  <input type="text" placeholder="192.168.1.1">
               <view class="config-title"><text >配置</text></view>
               <view class="config-item">
                  <text>ip地址:</text>
                  <input v-model="IP" type="text" placeholder="192.168.1.1" placeholder-style="font-size:16rpx;text-indent: 10rpx;">
               </view>
               <view class="config-item">
                  <text>端口号:</text>
                  <input v-model="PORT" type="text" placeholder="8080" placeholder-style="font-size:16rpx;text-indent: 10rpx;">
               </view>
               <view class="config-item">
                  <text>项目:</text>
                  <input v-model="PJO" type="text" placeholder="jkwms" placeholder-style="font-size:16rpx;text-indent: 10rpx;">
               </view>
               <view>
                  <text>端口号</text>
                  <input type="text" placeholder="8080">
               </view>
               <view>
                  <text>项目</text>
                  <input type="text" placeholder="jkwms">
               </view>
               <view>
                  <button>确认</button>
                  <button @click="configConfirm">确认</button>
               </view>
            </view>
         </uni-popup>
@@ -128,6 +129,7 @@
            rember:true,
            IP:'',
            PORT:'8080',// 默认端口号
            PJO:'jkwms'
            };
        },
      mounted() {
@@ -192,6 +194,15 @@
         // 配置 URL PORT 项目(jkwms)
         config() {
            this.$refs.popup.open("center")
         },
         // 确认配置
         configConfirm() {
            this.baseIP = this.IP
            uni.setStorageSync('UIP',this.baseIP)
            this.basePORT = this.PORT
            uni.setStorageSync('UPORT',this.basePORT)
            this.$refs.popup.close()
         },
         longpressImg() { // 长按图片
            this.$refs.serverPort.open()
@@ -336,6 +347,32 @@
      height: 500rpx;
      background-color: #fff;
   }
   .config-title {
      height: 100rpx;
      font-size: 32rpx;
      text-align: center;
      line-height: 100rpx;
   }
   .config-item {
      height: 100rpx;
   }
   .config-item text {
      display: inline-block;
      float: left;
      text-indent: 1em;
   }
   .config-item input {
      display: inline-block;
      float: right;
      margin-right: 50rpx;
      width: 300rpx;
      height: 50rpx;
      border: 1px solid #aaaaaa;
      border-radius: 10rpx;
      font-size: 16rpx;
      text-indent: 10rpx;
   }
    .login-paddingtop {
        padding-top: 50upx;
    }