|
@@ -19,15 +19,6 @@
|
|
|
<el-radio label="ADMIN">系统管理员</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
-
|
|
|
- <el-form-item prop="verification_code_image_text" class="verification-code" label="验证码">
|
|
|
- <el-input v-model="form.verification_code_image_text" @keyup.enter.native="signIn" />
|
|
|
- <el-image
|
|
|
- v-if="image_content_base64.length > 0"
|
|
|
- :src="`data:image/jpg;base64,${image_content_base64}`"
|
|
|
- @click="updateVerificationCode"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button class="submit" type="primary" @click="signIn">登录</el-button>
|
|
|
</el-form-item>
|
|
@@ -60,7 +51,7 @@
|
|
|
|
|
|
<script>
|
|
|
import md5 from 'md5';
|
|
|
-import { GetVerificationCodeImage, GetLogo } from '@/api/app';
|
|
|
+import { GetLogo } from '@/api/app';
|
|
|
import { setConfig } from '@/utils/auth';
|
|
|
import { getUserTypeToJump } from '@/router/guard';
|
|
|
|
|
@@ -77,8 +68,6 @@ export default {
|
|
|
user_name: '',
|
|
|
password: '',
|
|
|
is_password_md5: 'true',
|
|
|
- verification_code_image_id: '',
|
|
|
- verification_code_image_text: '',
|
|
|
},
|
|
|
rules: {
|
|
|
user_name: [
|
|
@@ -95,24 +84,15 @@ export default {
|
|
|
trigger: 'blur',
|
|
|
},
|
|
|
],
|
|
|
- verification_code_image_text: [{ required: true, trigger: 'blur', message: '验证码不能为空' }],
|
|
|
},
|
|
|
image_content_base64: '',
|
|
|
showUseragreement: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.updateVerificationCode();
|
|
|
this.getLogo();
|
|
|
},
|
|
|
methods: {
|
|
|
- updateVerificationCode() {
|
|
|
- GetVerificationCodeImage().then(({ image_id, image_content_base64: image }) => {
|
|
|
- this.form.verification_code_image_id = image_id;
|
|
|
- this.image_content_base64 = image;
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
getLogo() {
|
|
|
GetLogo().then((res) => {
|
|
|
setConfig(res);
|
|
@@ -129,9 +109,7 @@ export default {
|
|
|
.then((user_type) => {
|
|
|
this.$router.push({ path: getUserTypeToJump(user_type) });
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- this.updateVerificationCode();
|
|
|
- });
|
|
|
+ .catch(() => {});
|
|
|
});
|
|
|
},
|
|
|
|