feat:登录密码md5传输

This commit is contained in:
不做码农 2023-05-07 10:38:25 +08:00
parent 1217f1abdc
commit bce4daa01d
2 changed files with 3 additions and 3 deletions

View File

@ -28,6 +28,7 @@
"fuse.js": "6.4.6",
"highlight.js": "^11.5.1",
"js-cookie": "3.0.1",
"js-md5": "^0.7.3",
"jsencrypt": "3.2.1",
"md-editor-v3": "^1.11.11",
"nprogress": "0.2.0",

View File

@ -1,8 +1,7 @@
import { login, logout, getInfo, oauthCallback } from '@/api/system/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import defAva from '@/assets/images/profile.jpg'
import Cookies from 'js-cookie'
import { encrypt } from '@/utils/jsencrypt'
import md5 from 'js-md5'
const useUserStore = defineStore('user', {
state: () => ({
userInfo: '',
@ -22,7 +21,7 @@ const useUserStore = defineStore('user', {
// 登录
login(userInfo) {
const username = userInfo.username.trim()
const password = userInfo.password
const password = md5(userInfo.password)
const code = userInfo.code
const uuid = userInfo.uuid
return new Promise((resolve, reject) => {