update
This commit is contained in:
parent
52566c600a
commit
44077b0afa
@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user