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端登录
|
//web端登录
|
||||||
@PostMapping("login")
|
@PostMapping("login")
|
||||||
public R<?> login(@RequestBody LoginBody form) throws Exception {
|
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 uuid = form.getUuid();
|
||||||
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
String captcha = redisService.getCacheObject(CacheConstants.CAPTCHA_CODE_KEY + uuid).toString();
|
||||||
if (StringUtils.isBlank(captcha)) {
|
if (StringUtils.isBlank(captcha)) {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,16 @@
|
||||||
@toggleClick="toggleSideBar"
|
@toggleClick="toggleSideBar"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
|
<breadcrumb
|
||||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
|
id="breadcrumb-container"
|
||||||
|
class="breadcrumb-container"
|
||||||
|
v-if="!topNav"
|
||||||
|
/>
|
||||||
|
<top-nav
|
||||||
|
id="topmenu-container"
|
||||||
|
class="topmenu-container"
|
||||||
|
v-if="topNav"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="right-menu">
|
<div class="right-menu">
|
||||||
<template v-if="device !== 'mobile'">
|
<template v-if="device !== 'mobile'">
|
||||||
|
|
@ -22,14 +30,23 @@
|
||||||
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
<!-- <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
|
||||||
<!-- </el-tooltip>-->
|
<!-- </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">
|
<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>
|
</el-tooltip>
|
||||||
</template>
|
</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">
|
<div class="avatar-wrapper">
|
||||||
<img :src="avatar" class="user-avatar" />
|
<img :src="avatar" class="user-avatar" />
|
||||||
<i class="el-icon-caret-bottom" />
|
<i class="el-icon-caret-bottom" />
|
||||||
|
|
@ -103,10 +120,7 @@ export default {
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
// location.href = '/login';
|
location.href = '/login'
|
||||||
// location.href = '/gl/login';
|
|
||||||
|
|
||||||
location.href = process.env.NODE_ENV === 'production-nw' ? '/gl/login' : '/login'
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,7 @@ router.beforeEach((to, from, next) => {
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
Message.error(err)
|
Message.error(err)
|
||||||
// next({ path: '/login' })
|
next({ path: '/login' })
|
||||||
// next({ path: '/gl/login' })
|
|
||||||
|
|
||||||
next({ path: process.env.NODE_ENV === 'production-nw' ? '/gl/login' : '/login' })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,5 @@ export default new Router({
|
||||||
mode: 'history', // 去掉url中的#
|
mode: 'history', // 去掉url中的#
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRoutes,
|
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(() => {
|
MessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
// location.href = '/login';
|
location.href = '/login'
|
||||||
// location.href = '/gl/login';
|
|
||||||
|
|
||||||
location.href = process.env.NODE_ENV === 'production-nw' ? '/gl/login' : '/login'
|
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
isRelogin.show = false;
|
isRelogin.show = false;
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,7 @@
|
||||||
<div class="login-bar">
|
<div class="login-bar">
|
||||||
<div class="form-bar">
|
<div class="form-bar">
|
||||||
<h3 class="title">请重置登录密码</h3>
|
<h3 class="title">请重置登录密码</h3>
|
||||||
<el-form
|
<el-form ref="form" :model="user" :rules="rules">
|
||||||
ref="form"
|
|
||||||
:model="user"
|
|
||||||
:rules="rules"
|
|
||||||
>
|
|
||||||
<el-form-item label="旧密码" prop="oldPassword">
|
<el-form-item label="旧密码" prop="oldPassword">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="user.oldPassword"
|
v-model="user.oldPassword"
|
||||||
|
|
@ -33,10 +29,15 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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
|
||||||
>
|
>
|
||||||
<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-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -45,10 +46,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { updateUserPwd } from '@/api/system/user'
|
import { updateUserPwd } from '@/api/system/user'
|
||||||
import { validPassword } from '@/utils/validate'
|
import { validPassword } from '@/utils/validate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
const passwordRegex = (rule, value, callback) => {
|
const passwordRegex = (rule, value, callback) => {
|
||||||
// const reg =
|
// const reg =
|
||||||
|
|
@ -125,13 +126,7 @@
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
// 进入首页
|
// 进入首页
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
// location.href = '/login';
|
location.href = '/login'
|
||||||
// location.href = '/gl/login';
|
|
||||||
|
|
||||||
location.href =
|
|
||||||
process.env.NODE_ENV === 'production-nw'
|
|
||||||
? '/gl/login'
|
|
||||||
: '/login'
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -139,21 +134,15 @@
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$store.dispatch('LogOut').then(() => {
|
this.$store.dispatch('LogOut').then(() => {
|
||||||
// location.href = '/login';
|
location.href = '/login'
|
||||||
// location.href = '/gl/login';
|
|
||||||
|
|
||||||
location.href =
|
|
||||||
process.env.NODE_ENV === 'production-nw'
|
|
||||||
? '/gl/login'
|
|
||||||
: '/login'
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
.login {
|
.login {
|
||||||
//display: flex;
|
//display: flex;
|
||||||
//justify-content: center;
|
//justify-content: center;
|
||||||
//align-items: center;
|
//align-items: center;
|
||||||
|
|
@ -162,15 +151,15 @@
|
||||||
background-image: url('../assets/images/login.png');
|
background-image: url('../assets/images/login.png');
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
//background: #1891FF;
|
//background: #1891FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0px auto 30px auto;
|
margin: 0px auto 30px auto;
|
||||||
//text-align: center;
|
//text-align: center;
|
||||||
color: #707070;
|
color: #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-bar {
|
.login-bar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: auto;
|
height: auto;
|
||||||
top: 20%;
|
top: 20%;
|
||||||
|
|
@ -182,15 +171,15 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-bar {
|
.form-bar {
|
||||||
//height: 500px;
|
//height: 500px;
|
||||||
width: 360px;
|
width: 360px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-form {
|
.login-form {
|
||||||
//border-radius: 6px;
|
//border-radius: 6px;
|
||||||
//height: 100%;
|
//height: 100%;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
|
|
@ -210,15 +199,15 @@
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-tip {
|
.login-tip {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #bfbfbf;
|
color: #bfbfbf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-code {
|
.login-code {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
@ -227,9 +216,9 @@
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-login-footer {
|
.el-login-footer {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
@ -240,9 +229,9 @@
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-code-img {
|
.login-code-img {
|
||||||
height: 38px;
|
height: 38px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ module.exports = {
|
||||||
// 部署生产环境和开发环境下的URL。
|
// 部署生产环境和开发环境下的URL。
|
||||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
// 例如 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)
|
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||||
outputDir: 'dist',
|
outputDir: 'dist',
|
||||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue