diff --git a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java index 14899b7b..5f85287c 100644 --- a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java +++ b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java @@ -58,9 +58,9 @@ public class TokenController { //web端登录 @PostMapping("login") public R login(@RequestBody LoginBody form) throws Exception { - //String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey); + String decryptedData = RsaUtil.decryptByPrivateKey(form.getPassword(), privateKey); // 用户登录 - LoginUser userInfo = sysLoginService.login(form.getUsername(), form.getPassword()); + LoginUser userInfo = sysLoginService.login(form.getUsername(), decryptedData); String uuid = form.getUuid(); String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString(); if (StringUtils.isBlank(captcha)) { diff --git a/sgzb-ui/src/layout/components/Navbar.vue b/sgzb-ui/src/layout/components/Navbar.vue index 08de724b..7b5fd2db 100644 --- a/sgzb-ui/src/layout/components/Navbar.vue +++ b/sgzb-ui/src/layout/components/Navbar.vue @@ -1,53 +1,70 @@ diff --git a/sgzb-ui/src/permission.js b/sgzb-ui/src/permission.js index ef95de94..fbc55f9c 100644 --- a/sgzb-ui/src/permission.js +++ b/sgzb-ui/src/permission.js @@ -32,10 +32,7 @@ router.beforeEach((to, from, next) => { }).catch(err => { store.dispatch('LogOut').then(() => { Message.error(err) - // next({ path: '/login' }) - // next({ path: '/gl/login' }) - - next({ path: process.env.NODE_ENV === 'production-nw' ? '/gl/login' : '/login' }) + next({ path: '/login' }) }) }) } else { diff --git a/sgzb-ui/src/router/index.js b/sgzb-ui/src/router/index.js index 5ad2eff1..b78cd54f 100644 --- a/sgzb-ui/src/router/index.js +++ b/sgzb-ui/src/router/index.js @@ -204,7 +204,5 @@ export default new Router({ mode: 'history', // 去掉url中的# scrollBehavior: () => ({ y: 0 }), routes: constantRoutes, - base: process.env.NODE_ENV === 'production-nw' ? '/gl' : '' - }) diff --git a/sgzb-ui/src/utils/request.js b/sgzb-ui/src/utils/request.js index 46989bb0..d8cd2c18 100644 --- a/sgzb-ui/src/utils/request.js +++ b/sgzb-ui/src/utils/request.js @@ -87,10 +87,7 @@ service.interceptors.response.use(res => { MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; store.dispatch('LogOut').then(() => { - // location.href = '/login'; - // location.href = '/gl/login'; - - location.href = process.env.NODE_ENV === 'production-nw' ? '/gl/login' : '/login' + location.href = '/login' }) }).catch(() => { isRelogin.show = false; diff --git a/sgzb-ui/src/views/resetPassword.vue b/sgzb-ui/src/views/resetPassword.vue index d3a7f350..a39db898 100644 --- a/sgzb-ui/src/views/resetPassword.vue +++ b/sgzb-ui/src/views/resetPassword.vue @@ -3,11 +3,7 @@

请重置登录密码

- + - 确认修改 - 返回登录页 + 返回登录页
@@ -45,204 +46,192 @@ diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js index fd5dfd04..07d2b066 100644 --- a/sgzb-ui/vue.config.js +++ b/sgzb-ui/vue.config.js @@ -19,7 +19,7 @@ module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === 'production' ? '/gl/' : '/', ///gl/ + publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', ///gl/ // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)