This commit is contained in:
ZSEN 2021-04-24 13:56:08 +08:00
parent 52566c600a
commit 44077b0afa

View File

@ -67,6 +67,7 @@
type="primary" type="primary"
class="btn-unlock" class="btn-unlock"
icon="el-icon-right" icon="el-icon-right"
:loading="loading"
@click="submitForm" @click="submitForm"
></el-button> ></el-button>
</template> </template>
@ -102,6 +103,7 @@ export default defineComponent({
const lockModel = reactive({ const lockModel = reactive({
password: '', password: '',
}) })
const loading = ref(false)
const checkPwd = async (rule, value, callback) => { const checkPwd = async (rule, value, callback) => {
const encryption = new AesEncryption() const encryption = new AesEncryption()
@ -114,11 +116,12 @@ export default defineComponent({
return callback() return callback()
} else { } else {
// //
loading.value = true
const { code } = await Login({ const { code } = await Login({
username: store.state.account.userinfo.name, username: store.state.account.userinfo.name,
password: value, password: value,
}) })
loading.value = false
if (+code === 200) { if (+code === 200) {
return callback() return callback()
} }
@ -157,8 +160,8 @@ export default defineComponent({
} }
// //
removeItem('__VEA_SCREEN_LOCKED__')
router.push({ path: route.query.redirect || '/', replace: true }) router.push({ path: route.query.redirect || '/', replace: true })
removeItem('__VEA_SCREEN_LOCKED__')
}) })
} }
@ -179,6 +182,7 @@ export default defineComponent({
lockRules, lockRules,
handleUnlock, handleUnlock,
submitForm, submitForm,
loading,
cancel, cancel,
reLogin, reLogin,
} }