diff --git a/components/BsLogin.vue b/components/BsLogin.vue index f75ddbd..c326611 100644 --- a/components/BsLogin.vue +++ b/components/BsLogin.vue @@ -107,10 +107,9 @@ export default { }, set(val) { if (!val) { - Object.assign(this.form, { - phone: "", - verificationCode: "", - }); + this.$refs.ruleForm.resetFields(); + this.isAcceptAgreement = false; + this.countDown = 0; } this.$emit("update:visible", val); }, diff --git a/plugins/axiosTk.js b/plugins/axiosTk.js index b108c06..141af11 100644 --- a/plugins/axiosTk.js +++ b/plugins/axiosTk.js @@ -23,7 +23,7 @@ export default function ({$axios, store, route}, inject) { return result.data; } if(result.code === 'TOKEN_FAIL'){ - await store.dispatch('logout'); + await store.commit('setLoginOut'); store.commit('setLoginVisible'); return result; }