mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
update login.vue and remove invalid codes
This commit is contained in:
parent
84d6ccb213
commit
91c2cf7e6d
@ -28,9 +28,6 @@
|
|||||||
>
|
>
|
||||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||||
</el-input>
|
</el-input>
|
||||||
<div class="login-code">
|
|
||||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||||
<el-form-item prop="code">
|
<el-form-item prop="code">
|
||||||
@ -64,7 +61,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { getCodeImg } from "@/api/login";
|
|
||||||
import Verify from "@/components/Verifition/Verify";
|
import Verify from "@/components/Verifition/Verify";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||||
@ -92,7 +88,6 @@ export default {
|
|||||||
password: [
|
password: [
|
||||||
{ required: true, trigger: "blur", message: "密码不能为空" }
|
{ required: true, trigger: "blur", message: "密码不能为空" }
|
||||||
],
|
],
|
||||||
// code: [{ required: true, trigger: "change", message: "验证码不能为空" }]
|
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
redirect: undefined,
|
redirect: undefined,
|
||||||
@ -108,20 +103,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCode();
|
|
||||||
this.getCookie();
|
this.getCookie();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/*getCode() {
|
|
||||||
getCodeImg().then(res => {
|
|
||||||
this.captchaEnabled = res.data.enabled;
|
|
||||||
if(res.data.enabled){
|
|
||||||
this.codeUrl = "data:image/gif;base64," + res.data.img;
|
|
||||||
this.loginForm.uuid = res.data.uuid;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},*/
|
|
||||||
|
|
||||||
verifySuccess(params){
|
verifySuccess(params){
|
||||||
// params 返回的二次验证参数, 和登录参数一起回传给登录接口,方便后台进行二次验证
|
// params 返回的二次验证参数, 和登录参数一起回传给登录接口,方便后台进行二次验证
|
||||||
this.loginForm.code = params.captchaVerification;
|
this.loginForm.code = params.captchaVerification;
|
||||||
@ -164,7 +148,6 @@ export default {
|
|||||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
// this.getCode();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user