Merge remote-tracking branch 'origin/dev-nx' into dev-nx
This commit is contained in:
commit
5bcf664c40
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,16 @@
|
|||
@toggleClick="toggleSideBar"
|
||||
/>
|
||||
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
|
||||
<breadcrumb
|
||||
id="breadcrumb-container"
|
||||
class="breadcrumb-container"
|
||||
v-if="!topNav"
|
||||
/>
|
||||
<top-nav
|
||||
id="topmenu-container"
|
||||
class="topmenu-container"
|
||||
v-if="topNav"
|
||||
/>
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device !== 'mobile'">
|
||||
|
|
@ -22,14 +30,23 @@
|
|||
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
||||
<!-- </el-tooltip>-->
|
||||
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
<screenfull
|
||||
id="screenfull"
|
||||
class="right-menu-item hover-effect"
|
||||
/>
|
||||
|
||||
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
<size-select
|
||||
id="size-select"
|
||||
class="right-menu-item hover-effect"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<el-dropdown
|
||||
class="avatar-container right-menu-item hover-effect"
|
||||
trigger="click"
|
||||
>
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="avatar" class="user-avatar" />
|
||||
<i class="el-icon-caret-bottom" />
|
||||
|
|
@ -103,10 +120,7 @@ export default {
|
|||
})
|
||||
.then(() => {
|
||||
this.$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(() => {})
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -204,7 +204,5 @@ export default new Router({
|
|||
mode: 'history', // 去掉url中的#
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes,
|
||||
base: process.env.NODE_ENV === 'production-nw' ? '/gl' : ''
|
||||
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -3,11 +3,7 @@
|
|||
<div class="login-bar">
|
||||
<div class="form-bar">
|
||||
<h3 class="title">请重置登录密码</h3>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="user"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form ref="form" :model="user" :rules="rules">
|
||||
<el-form-item label="旧密码" prop="oldPassword">
|
||||
<el-input
|
||||
v-model="user.oldPassword"
|
||||
|
|
@ -33,10 +29,15 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" style="width: 48.5%;" @click="submit"
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 48.5%"
|
||||
@click="submit"
|
||||
>确认修改</el-button
|
||||
>
|
||||
<el-button style="width: 48.5%;" @click="close">返回登录页</el-button>
|
||||
<el-button style="width: 48.5%" @click="close"
|
||||
>返回登录页</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -125,13 +126,7 @@
|
|||
this.$modal.msgSuccess('修改成功')
|
||||
// 进入首页
|
||||
this.$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'
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -139,13 +134,7 @@
|
|||
},
|
||||
close() {
|
||||
this.$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'
|
||||
})
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
|
|
|||
Loading…
Reference in New Issue