feat: 登录弹窗隐藏时重置表单

merge-requests/56/head
xiaoguang 2 years ago
parent 8a238e0b3b
commit c543931458

@ -107,10 +107,9 @@ export default {
}, },
set(val) { set(val) {
if (!val) { if (!val) {
Object.assign(this.form, { this.$refs.ruleForm.resetFields();
phone: "", this.isAcceptAgreement = false;
verificationCode: "", this.countDown = 0;
});
} }
this.$emit("update:visible", val); this.$emit("update:visible", val);
}, },

@ -23,7 +23,7 @@ export default function ({$axios, store, route}, inject) {
return result.data; return result.data;
} }
if(result.code === 'TOKEN_FAIL'){ if(result.code === 'TOKEN_FAIL'){
await store.dispatch('logout'); await store.commit('setLoginOut');
store.commit('setLoginVisible'); store.commit('setLoginVisible');
return result; return result;
} }

Loading…
Cancel
Save