diff --git a/src/libs/notice.js b/src/libs/notice.js index 5d44603..db5aeef 100644 --- a/src/libs/notice.js +++ b/src/libs/notice.js @@ -2,6 +2,7 @@ import SettingMer from '@/libs/settingMer' import ElementUI from 'element-ui' import router from '../router' +import store from '@/store' import { roterPre } from '@/settings' import Vue from 'vue' @@ -44,6 +45,15 @@ function notice(token) { if (data.status === 200) { vm.$emit(data.data.status, data.data.result) } + console.log(data); + if (data.data.type === 'account_change') { + setTimeout(async () => { + await store.dispatch("user/logout"); + router.push( + `${roterPre}/login` + ); + }, 150); + } if (data.type === 'notice') { const h = vm.$createElement ElementUI.Notification({ diff --git a/src/views/systemForm/setSystem/modifyStoreInfo.vue b/src/views/systemForm/setSystem/modifyStoreInfo.vue index a976e58..2f96b49 100644 --- a/src/views/systemForm/setSystem/modifyStoreInfo.vue +++ b/src/views/systemForm/setSystem/modifyStoreInfo.vue @@ -56,7 +56,7 @@