Commit 9f54cfb3 by xinla

密码加密

1 parent 091177cd
......@@ -42,7 +42,7 @@
├── .env.js # 环境变量配置
├── index.html # html模板
├── jsconfig.json # jsconfig 配置 快捷路径等
└── package.json # package.json
├── package.json # package.json
├── vite.config.js # vite 配置
├── linkwe-mobile // 移动端项目包含移动工作台、任务宝、群裂变等H5
├── linkwe-uniapp // uniapp短链小程序项目
......
......@@ -161,8 +161,10 @@ export default {
Cookies.remove('password')
Cookies.remove('rememberMe')
}
let loginForm = JSON.parse(JSON.stringify(this.loginForm))
loginForm.password = encrypt(this.loginForm.password)
this.$store
.Login(this.loginForm)
.Login(loginForm)
.then(() => {
this.$router.push({ path: this.redirect || window.lwConfig.BASE_URL })
})
......
......@@ -18,6 +18,7 @@
<script>
import { updateUserPwd } from '@/api/system/user'
import { encrypt, decrypt } from '@/utils/jsencrypt'
export default {
data() {
......@@ -53,7 +54,7 @@ export default {
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then((response) => {
updateUserPwd(encrypt(this.user.oldPassword), encrypt(this.user.newPassword)).then((response) => {
if (response.code === 200) {
this.msgSuccess('修改成功')
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!