fix: 修复license未认证的情况下,按回车键可以登录的问题

(cherry picked from commit 4e0eb3f143)
This commit is contained in:
chenjinsong
2024-03-19 16:03:21 +08:00
committed by 陈劲松
parent da0156031c
commit d8b3a8cdc7

View File

@@ -33,13 +33,13 @@
@click="login"
@keyup.enter="login"
style="font-size: 16px;"
>Login</el-button
>
>Login
</el-button>
</el-form-item>
<el-form-item v-if="licenseStatus !== 0">
<div class="license-error-msg">{{licenseStatusErrMsg}}</div>
<div class="license-file">
<button style="position: relative;" class="license__btn margin-r-20" @click.prevent="downloadFile">
<button style="position: relative;" class="license__btn margin-r-20" @click.prevent="downloadFile" @keyup.enter="login">
<i class="cn-icon-download1 cn-icon margin-r-6"></i><span>Download c2v file</span>
</button>
<el-upload :action="`${baseUrl}sys/license/upload`"
@@ -101,6 +101,9 @@ export default {
} else {
return
}
if (this.licenseStatus !== 0) {
return
}
this.loading = true
axios.post(api.login, { username: this.username, pin: this.pin }).then(
res => {