From d6078aa21d394683f6de0fd45f4c610c1eea7fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Sat, 3 Jul 2021 20:59:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8F=9C=E5=8D=95=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/popconfirm_delete/index.vue | 6 +- src/main.js | 2 - .../header/LayoutTopHeaderAvatar.vue | 8 +- src/pages/frame/services/accountService.js | 3 +- src/pages/frame/view/login/Login.vue | 6 +- src/pages/user/components/info.vue | 37 +-- src/router/config.js | 298 +++++++++--------- src/router/guards.js | 17 +- src/store/index.js | 18 -- src/utils/index.js | 16 + 10 files changed, 204 insertions(+), 207 deletions(-) delete mode 100644 src/store/index.js diff --git a/src/components/popconfirm_delete/index.vue b/src/components/popconfirm_delete/index.vue index b478ee4..db2347c 100644 --- a/src/components/popconfirm_delete/index.vue +++ b/src/components/popconfirm_delete/index.vue @@ -31,7 +31,11 @@ export default { methods: { async confirm() { if (typeof this.url === 'string') { - await delReq(this.url); + try { + await delReq(this.url); + } catch (error) { + return; + } } if (typeof this.url === 'object') { switch (this.url.method) { diff --git a/src/main.js b/src/main.js index 19ea87b..7f64ea3 100644 --- a/src/main.js +++ b/src/main.js @@ -6,7 +6,6 @@ import Router from 'vue-router'; import { initRouter } from './router'; import VueI18n from 'vue-i18n'; import { accountModule, settingModule } from './pages/frame/store'; -import globalStore from '@/store'; import App from './App.vue'; import Plugins from './plugins'; import { loadRoutes, loadGuards, setAppOptions } from './utils/routerUtil'; @@ -27,7 +26,6 @@ Vue.config.productionTip = false; Vue.use(Vuex); //加载 框架的module包括 命名空间accountModule,settingModule const store = new Vuex.Store({ - ...globalStore, modules: { accountModule, settingModule }, }); diff --git a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue index e5c4d66..ac2d690 100644 --- a/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue +++ b/src/pages/frame/components/header/LayoutTopHeaderAvatar.vue @@ -19,15 +19,15 @@