From 82f1f5d0cf1b51a5d81915e842e01760f404fa74 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 20 十月 2021 13:07:16 +0800
Subject: [PATCH] update 优化xxl-job-admin相关pr代码 增加格式化日志输出与docker镜像

---
 ruoyi-ui/src/views/login.vue |   26 +++++++++++++++++++-------
 1 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index d68f614..6c35bd8 100644
--- a/ruoyi-ui/src/views/login.vue
+++ b/ruoyi-ui/src/views/login.vue
@@ -18,7 +18,7 @@
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
         </el-input>
       </el-form-item>
-      <el-form-item prop="code">
+      <el-form-item prop="code" v-if="captchaOnOff">
         <el-input
           v-model="loginForm.code"
           auto-complete="off"
@@ -44,6 +44,9 @@
           <span v-if="!loading">鐧� 褰�</span>
           <span v-else>鐧� 褰� 涓�...</span>
         </el-button>
+        <div style="float: right;" v-if="register">
+          <router-link class="link-type" :to="'/register'">绔嬪嵆娉ㄥ唽</router-link>
+        </div>
       </el-form-item>
     </el-form>
     <!--  搴曢儴  -->
@@ -73,14 +76,18 @@
       },
       loginRules: {
         username: [
-          { required: true, trigger: "blur", message: "鐢ㄦ埛鍚嶄笉鑳戒负绌�" }
+          { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" }
         ],
         password: [
-          { required: true, trigger: "blur", message: "瀵嗙爜涓嶈兘涓虹┖" }
+          { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勫瘑鐮�" }
         ],
-        code: [{ required: true, trigger: "change", message: "楠岃瘉鐮佷笉鑳戒负绌�" }]
+        code: [{ required: true, trigger: "change", message: "璇疯緭鍏ラ獙璇佺爜" }]
       },
       loading: false,
+      // 楠岃瘉鐮佸紑鍏�
+      captchaOnOff: true,
+      // 娉ㄥ唽寮�鍏�
+      register: false,
       redirect: undefined
     };
   },
@@ -99,8 +106,11 @@
   methods: {
     getCode() {
       getCodeImg().then(res => {
-        this.codeUrl = "data:image/gif;base64," + res.data.img;
-        this.loginForm.uuid = res.data.uuid;
+        this.captchaOnOff = res.data.captchaOnOff === undefined ? true : res.data.captchaOnOff;
+        if (this.captchaOnOff) {
+          this.codeUrl = "data:image/gif;base64," + res.data.img;
+          this.loginForm.uuid = res.data.uuid;
+        }
       });
     },
     getCookie() {
@@ -130,7 +140,9 @@
             this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
           }).catch(() => {
             this.loading = false;
-            this.getCode();
+            if (this.captchaOnOff) {
+              this.getCode();
+            }
           });
         }
       });

--
Gitblit v1.9.3