diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue index db3cb1ce..3d9c6c14 100644 --- a/resources/assets/js/pages/login.vue +++ b/resources/assets/js/pages/login.vue @@ -59,7 +59,7 @@ export default { codeUrl: this.$store.state.method.apiUrl('users/login/codeimg'), loginType: 'login', - email: '', + email: this.$store.state.method.getStorageString("cacheLoginEmail") || '', password: '', password2: '', code: '', @@ -143,6 +143,7 @@ export default { }, }).then(({data}) => { this.loadIng--; + this.$store.state.method.setStorage("cacheLoginEmail", this.email) this.$store.dispatch("handleClearCache", data).then(() => { this.goNext(); }).catch(() => { diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index 0bf4543f..999185e3 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -388,6 +388,8 @@ export default { handleClearCache({state, dispatch}, userInfo) { return new Promise(function (resolve, reject) { try { + const cacheLoginEmail = state.method.getStorageString("cacheLoginEmail"); + // window.localStorage.clear(); // state.cacheUserBasic = []; @@ -397,6 +399,7 @@ export default { state.cacheTasks = state.tasks = state.taskSubs = []; // state.method.setStorage("cacheTablePanel", state.cacheTablePanel); + state.method.setStorage("cacheLoginEmail", cacheLoginEmail); dispatch("saveUserInfo", state.method.isJson(userInfo) ? userInfo : state.userInfo); // resolve()