Browse Source

修改验证码开关变量名

RuoYi 3 years ago
parent
commit
331dbc44b2
2 changed files with 6 additions and 6 deletions
  1. 5 5
      src/views/login.vue
  2. 1 1
      src/views/system/user/profile/resetPwd.vue

+ 5 - 5
src/views/login.vue

@@ -25,7 +25,7 @@
           <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>
         </el-input>
       </el-form-item>
-      <el-form-item prop="code" v-if="captchaOnOff">
+      <el-form-item prop="code" v-if="captchaEnabled">
         <el-input
           v-model="loginForm.code"
           size="large"
@@ -91,7 +91,7 @@ const loginRules = {
 const codeUrl = ref("");
 const loading = ref(false);
 // 验证码开关
-const captchaOnOff = ref(true);
+const captchaEnabled = ref(true);
 // 注册开关
 const register = ref(false);
 const redirect = ref(undefined);
@@ -117,7 +117,7 @@ function handleLogin() {
       }).catch(() => {
         loading.value = false;
         // 重新获取验证码
-        if (captchaOnOff.value) {
+        if (captchaEnabled.value) {
           getCode();
         }
       });
@@ -127,8 +127,8 @@ function handleLogin() {
 
 function getCode() {
   getCodeImg().then(res => {
-    captchaOnOff.value = res.captchaOnOff === undefined ? true : res.captchaOnOff;
-    if (captchaOnOff.value) {
+    captchaEnabled.value = res.captchaEnabled === undefined ? true : res.captchaEnabled;
+    if (captchaEnabled.value) {
       codeUrl.value = "data:image/gif;base64," + res.img;
       loginForm.value.uuid = res.uuid;
     }

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

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