From abd47cec11fd4c362fe3479cdd0efb25c59bc1c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E8=99=B9=E7=9D=BF?= <297504645@qq.com> Date: Fri, 8 Sep 2023 14:13:12 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=8E=A5=E5=8F=A3=E7=9C=8B=E6=9D=BF?= =?UTF-8?q?=E3=80=91=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=80=E5=8F=91=20+=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PC/InterFace.Dash/public/config.js | 6 +- .../src/layout/components/Navbar.vue | 24 ++-- PC/InterFace.Dash/src/router/index.js | 6 +- PC/InterFace.Dash/src/store/modules/user.js | 4 +- PC/InterFace.Dash/src/views/login/index.vue | 3 - .../src/views/profileuser/index.vue | 32 ++++++ .../src/views/profileuser/index_dy.vue | 106 ++++++++++++++++++ .../src/views/profileuser/resetPwd.vue | 100 +++++++++++++++++ .../src/views/profileuser/userInfo.vue | 52 +++++++++ PC/InterFace.Dash/vue.config.js | 2 +- 10 files changed, 312 insertions(+), 23 deletions(-) create mode 100644 PC/InterFace.Dash/src/views/profileuser/index.vue create mode 100644 PC/InterFace.Dash/src/views/profileuser/index_dy.vue create mode 100644 PC/InterFace.Dash/src/views/profileuser/resetPwd.vue create mode 100644 PC/InterFace.Dash/src/views/profileuser/userInfo.vue diff --git a/PC/InterFace.Dash/public/config.js b/PC/InterFace.Dash/public/config.js index 8cf43ae..d6c1dc0 100644 --- a/PC/InterFace.Dash/public/config.js +++ b/PC/InterFace.Dash/public/config.js @@ -1,7 +1,7 @@ // dev_win -window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60068' -window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60068' -window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60065' +window.SITE_CONFIG['baseApi'] = 'http://dev.ccwin-in.com:60021' +window.SITE_CONFIG['authApi'] = 'http://dev.ccwin-in.com:60021' +window.SITE_CONFIG['loginApi'] = 'http://dev.ccwin-in.com:60020' window.SITE_CONFIG['businessApi'] = 'http://dev.ccwin-in.com:10097' //是否登录配置信息【loginName】 window.SITE_CONFIG['isConfigLogin'] = false diff --git a/PC/InterFace.Dash/src/layout/components/Navbar.vue b/PC/InterFace.Dash/src/layout/components/Navbar.vue index 6f12500..02bbe72 100644 --- a/PC/InterFace.Dash/src/layout/components/Navbar.vue +++ b/PC/InterFace.Dash/src/layout/components/Navbar.vue @@ -36,9 +36,9 @@ 系统首页 - + 退出登录 @@ -86,15 +86,17 @@ export default { }, async logout() { this.fullscreenLoading = true - mgr.signoutRedirect() - mgr.signoutRedirectCallback() - .then(() => { - this.$store.dispatch("user/logout") - }) - .catch(function(error){ - this.$message.error("退出登录失败,请重试") - this.fullscreenLoading = false - }) + this.$store.dispatch("user/logout") + // 如果有单点登录方式使用下方配置 + // mgr.signoutRedirect() + // mgr.signoutRedirectCallback() + // .then(() => { + // this.$store.dispatch("user/logout") + // }) + // .catch(function(error){ + // this.$message.error("退出登录失败,请重试") + // this.fullscreenLoading = false + // }) }, showProfileuser() { diff --git a/PC/InterFace.Dash/src/router/index.js b/PC/InterFace.Dash/src/router/index.js index 1f5f797..f6b73a3 100644 --- a/PC/InterFace.Dash/src/router/index.js +++ b/PC/InterFace.Dash/src/router/index.js @@ -102,12 +102,12 @@ export let constantRoutes = [ }] }, { - path: '/profileuser', + path: '/', component: Layout, - redirect: '/profileuser/index', + redirect: '/profileuser', hidden: true, children: [{ - path: 'index', + path: 'profileuser', component: () => import('@/views/profileuser/index'), name: 'Profileuser', meta: { diff --git a/PC/InterFace.Dash/src/store/modules/user.js b/PC/InterFace.Dash/src/store/modules/user.js index 5ffdf2a..d21325f 100644 --- a/PC/InterFace.Dash/src/store/modules/user.js +++ b/PC/InterFace.Dash/src/store/modules/user.js @@ -147,8 +147,8 @@ const actions = { }) // reset visited views and cached views // to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485 - // 防止路由叠加(打开后单点登录的退出无效) - // location.reload() + // 防止路由叠加(打开后单点登录的退出无效),如果有单点登录方式关闭下方location.reload() + location.reload() // }).catch(error => { // reject(error) // }) diff --git a/PC/InterFace.Dash/src/views/login/index.vue b/PC/InterFace.Dash/src/views/login/index.vue index d306364..d6576b4 100644 --- a/PC/InterFace.Dash/src/views/login/index.vue +++ b/PC/InterFace.Dash/src/views/login/index.vue @@ -165,9 +165,6 @@ export default { this.$store.dispatch('user/login', this.loginForm) .then(() => { this.$router.push({ path: '/'}) - setTimeout(()=>{ - this.loading = false - }) }) .catch((error) => { this.loading = false diff --git a/PC/InterFace.Dash/src/views/profileuser/index.vue b/PC/InterFace.Dash/src/views/profileuser/index.vue new file mode 100644 index 0000000..17dfb7d --- /dev/null +++ b/PC/InterFace.Dash/src/views/profileuser/index.vue @@ -0,0 +1,32 @@ + + + diff --git a/PC/InterFace.Dash/src/views/profileuser/index_dy.vue b/PC/InterFace.Dash/src/views/profileuser/index_dy.vue new file mode 100644 index 0000000..e92dee3 --- /dev/null +++ b/PC/InterFace.Dash/src/views/profileuser/index_dy.vue @@ -0,0 +1,106 @@ + + + + diff --git a/PC/InterFace.Dash/src/views/profileuser/resetPwd.vue b/PC/InterFace.Dash/src/views/profileuser/resetPwd.vue new file mode 100644 index 0000000..19b4faf --- /dev/null +++ b/PC/InterFace.Dash/src/views/profileuser/resetPwd.vue @@ -0,0 +1,100 @@ + + + + \ No newline at end of file diff --git a/PC/InterFace.Dash/src/views/profileuser/userInfo.vue b/PC/InterFace.Dash/src/views/profileuser/userInfo.vue new file mode 100644 index 0000000..13e2982 --- /dev/null +++ b/PC/InterFace.Dash/src/views/profileuser/userInfo.vue @@ -0,0 +1,52 @@ + + + + \ No newline at end of file diff --git a/PC/InterFace.Dash/vue.config.js b/PC/InterFace.Dash/vue.config.js index f4dd2d4..7501ecb 100644 --- a/PC/InterFace.Dash/vue.config.js +++ b/PC/InterFace.Dash/vue.config.js @@ -13,7 +13,7 @@ const name = defaultSettings.title || '接口看板-QAD&WMS' // page title // For example, Mac: sudo npm run // You can change the port by the following method: // port = 9528 npm run dev OR npm run dev --port = 9528 -const port = process.env.port || process.env.npm_config_port || 60066 // dev port +const port = process.env.port || process.env.npm_config_port || 60021 // dev port const Timestamp = new Date().getTime(); // All configuration item explanations can be find in https://cli.vuejs.org/config/ module.exports = {