Просмотр исходного кода

修改验证码开关变量名

RuoYi лет назад: 3
Родитель
Сommit
4b1351ef21

+ 3 - 3
ruoyi-gateway/src/main/java/com/ruoyi/gateway/service/impl/ValidateCodeServiceImpl.java

@@ -46,9 +46,9 @@ public class ValidateCodeServiceImpl implements ValidateCodeService
46
     public AjaxResult createCaptcha() throws IOException, CaptchaException
46
     public AjaxResult createCaptcha() throws IOException, CaptchaException
47
     {
47
     {
48
         AjaxResult ajax = AjaxResult.success();
48
         AjaxResult ajax = AjaxResult.success();
49
-        boolean captchaOnOff = captchaProperties.getEnabled();
50
-        ajax.put("captchaOnOff", captchaOnOff);
51
-        if (!captchaOnOff)
49
+        boolean captchaEnabled = captchaProperties.getEnabled();
50
+        ajax.put("captchaEnabled", captchaEnabled);
51
+        if (!captchaEnabled)
52
         {
52
         {
53
             return ajax;
53
             return ajax;
54
         }
54
         }

+ 5 - 5
ruoyi-ui/src/views/login.vue

@@ -23,7 +23,7 @@
23
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
23
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
24
         </el-input>
24
         </el-input>
25
       </el-form-item>
25
       </el-form-item>
26
-      <el-form-item prop="code" v-if="captchaOnOff">
26
+      <el-form-item prop="code" v-if="captchaEnabled">
27
         <el-input
27
         <el-input
28
           v-model="loginForm.code"
28
           v-model="loginForm.code"
29
           auto-complete="off"
29
           auto-complete="off"
@@ -89,7 +89,7 @@ export default {
89
       },
89
       },
90
       loading: false,
90
       loading: false,
91
       // 验证码开关
91
       // 验证码开关
92
-      captchaOnOff: true,
92
+      captchaEnabled: true,
93
       // 注册开关
93
       // 注册开关
94
       register: false,
94
       register: false,
95
       redirect: undefined
95
       redirect: undefined
@@ -110,8 +110,8 @@ export default {
110
   methods: {
110
   methods: {
111
     getCode() {
111
     getCode() {
112
       getCodeImg().then(res => {
112
       getCodeImg().then(res => {
113
-        this.captchaOnOff = res.captchaOnOff === undefined ? true : res.captchaOnOff;
114
-        if (this.captchaOnOff) {
113
+        this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled;
114
+        if (this.captchaEnabled) {
115
           this.codeUrl = "data:image/gif;base64," + res.img;
115
           this.codeUrl = "data:image/gif;base64," + res.img;
116
           this.loginForm.uuid = res.uuid;
116
           this.loginForm.uuid = res.uuid;
117
         }
117
         }
@@ -144,7 +144,7 @@ export default {
144
             this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
144
             this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
145
           }).catch(() => {
145
           }).catch(() => {
146
             this.loading = false;
146
             this.loading = false;
147
-            if (this.captchaOnOff) {
147
+            if (this.captchaEnabled) {
148
               this.getCode();
148
               this.getCode();
149
             }
149
             }
150
           });
150
           });

+ 1 - 1
ruoyi-ui/src/views/system/user/profile/resetPwd.vue

@@ -7,7 +7,7 @@
7
       <el-input v-model="user.newPassword" placeholder="请输入新密码" type="password" show-password/>
7
       <el-input v-model="user.newPassword" placeholder="请输入新密码" type="password" show-password/>
8
     </el-form-item>
8
     </el-form-item>
9
     <el-form-item label="确认密码" prop="confirmPassword">
9
     <el-form-item label="确认密码" prop="confirmPassword">
10
-      <el-input v-model="user.confirmPassword" placeholder="请确认密码" type="password" show-password/>
10
+      <el-input v-model="user.confirmPassword" placeholder="请确认密码" type="password" show-password/>
11
     </el-form-item>
11
     </el-form-item>
12
     <el-form-item>
12
     <el-form-item>
13
       <el-button type="primary" size="mini" @click="submit">保存</el-button>
13
       <el-button type="primary" size="mini" @click="submit">保存</el-button>