diff --git a/public/index.html b/public/index.html index 71f176a..53f0c2b 100644 --- a/public/index.html +++ b/public/index.html @@ -30,7 +30,7 @@ <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %> <% } %> diff --git a/src/i18n/index.js b/src/i18n/index.js index 1ea81ad..eb668d6 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -15,6 +15,7 @@ export const messages = { } export default new VueI18n({ - locale: Cookies.get('language') || 'zh-CN', + // locale: Cookies.get('language') || 'zh-CN', + locale: 'zh-CN', // 先默认中文 messages }) diff --git a/src/router/index.js b/src/router/index.js index 5c4c2a2..7f34f42 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -72,6 +72,7 @@ const router = new Router({ }) router.beforeEach((to, from, next) => { + console.log('[*] === router beforeEach: ', to, from) // 添加动态(菜单)路由 // 已添加或者当前路由为页面路由, 可直接访问 if (window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] || fnCurrentRouteIsPageRoute(to, pageRoutes)) { diff --git a/src/utils/index.js b/src/utils/index.js index bf8bb9b..50decdf 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -73,7 +73,7 @@ export function getIconList () { } /** - * 树形数据转换 + * 树形数据转换,把扁平的数据,转换为树形结构的数据 * @param {*} data * @param {*} id * @param {*} pid diff --git a/src/views/main-navbar.vue b/src/views/main-navbar.vue index 83e1cb0..f07cb75 100644 --- a/src/views/main-navbar.vue +++ b/src/views/main-navbar.vue @@ -89,8 +89,8 @@ export default { cancelButtonText: this.$t('cancel'), type: 'warning' }).then(() => { - this.$http.post('/logout').then(({ data: res }) => { - if (res.code !== 0) { + this.$http.post('/doLogout').then(({ data: res }) => { + if (res.code !== 200) { return this.$message.error(res.msg) } clearLoginInfo() diff --git a/src/views/pages/login.vue b/src/views/pages/login.vue index 814999b..2def271 100644 --- a/src/views/pages/login.vue +++ b/src/views/pages/login.vue @@ -22,7 +22,7 @@ - + {{ $t('login.title') }} @@ -55,7 +55,7 @@