#
whycq
2024-07-29 21ad7745a981656da1be4c1f63644c707be9153c
pages/login/login.vue
@@ -9,7 +9,7 @@
      <!-- logo -->
      <view class="logo">
         <view class="logo-box">
            <image src="../../static/img/logo.png" mode="aspectFit"></image>
            <image src="../../static/img/logo1.png" mode="aspectFit"></image>
         </view>
      </view>
      <view class="content">
@@ -18,7 +18,7 @@
            <view class="box-icon">
               <uni-icons type="person" size="20" color="#707070"></uni-icons>
            </view>
            <view class="box-text">账号:</view>
            <view class="box-text">賬號:</view>
            <view class="box-input">
               <input type="text" placeholder="请输入账号" v-model="user.userName" 
               placeholder-style="font-size:14px;color:#ccc;">
@@ -30,7 +30,7 @@
            <view class="box-icon">
               <uni-icons type="locked" size="20" color="#707070"></uni-icons>
            </view>
            <view class="box-text">密码:</view>
            <view class="box-text">密碼:</view>
            <view class="box-input">
               <input :password="!showPassword" placeholder="请输入密码" v-model="user.password"
               placeholder-style="font-size:14px;color:#ccc;" >
@@ -43,7 +43,7 @@
         <!-- 记住密码 -->
         <view class="check">
            <view class="check-left">
               <view>记住密码</view>
               <view>記住密碼</view>
            </view>
            <view class="check-right">
               <switch :checked='remberPassword' color="#FFCC33" style="zoom:.5" @change="remberChange"/>
@@ -73,12 +73,12 @@
                  <view class="popup-item-right"><input type="text" v-model="url.port"></view>
               </view>
               <view class="popup-item">
                  <view class="popup-item-left">项目:</view>
                  <view class="popup-item-left">URL:</view>
                  <view class="popup-item-right"><input type="text" v-model="url.project"></view>
               </view>
               <view class="btn">
                  <view class="btn-left" @click="close">取消</view>
                  <view class="btn-right" @click="settingConfirm">确认</view>
                  <view class="btn-right" @click="settingConfirm">確認</view>
               </view>
            </view>
         </uni-popup>
@@ -122,7 +122,7 @@
            },
            load: {
               loading: false,
               btnText: '登录'
               btnText: '登錄'
            },
            msgType: 'success',
            filename: '',
@@ -177,7 +177,7 @@
               fail(result) {
                  uni.showToast({
                     icon: 'error',
                     title: '请求失败'
                     title: '請求失敗'
                  })
               },
               data: {
@@ -190,7 +190,7 @@
               success(result) {
                  if (result.statusCode === 404) {
                     uni.showToast({
                        title: '登录失败',
                        title: '登錄失敗',
                        icon: "error"
                     })
                     return
@@ -198,7 +198,7 @@
                  let res = result.data
                  if (res.code === 200) {
                     that.load.loading = true;
                     that.load.btnText = '登录中';
                     that.load.btnText = '登錄中';
                     uni.setStorageSync('token', res.data.token);
                     if(that.remberPassword){
                        uni.setStorageSync('user', that.user);
@@ -207,7 +207,7 @@
                     }
                     setTimeout(() => {
                        uni.showToast({
                           title: '登录成功'
                           title: '登錄成功'
                        })
                        setTimeout(() => {
                           uni.reLaunch({
@@ -261,7 +261,7 @@
                  var res = res.data
                  if (res.data) {
                     that.filename = res.data.path
                     that.dialogContent = '发现新版本:' + res.data.version + ', 是否立即更新'
                     that.dialogContent = '發現新版本:' + res.data.version + ', 是否立即更新'
                     that.$refs.upVersion.open()
                  } else {
                     uni.showToast({