From 48113c84c865e9fb3ca5a5bcf4e387b1019e8a6c Mon Sep 17 00:00:00 2001 From: dqjdda <201507802@qq.com> Date: Sun, 1 Dec 2019 18:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AFrsa=E5=85=AC=E9=92=A5?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E4=BC=A0=E8=BE=93=E7=99=BB=E5=BD=95=E5=AF=86?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=90=8E=E7=AB=AFrsa=E7=A7=81=E9=92=A5?= =?UTF-8?q?=E8=A7=A3=E5=AF=86=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 6a19860..beb351a 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,6 +1,5 @@ import { login, getInfo, logout } from '@/api/login' import { getToken, setToken, removeToken } from '@/utils/auth' -import { decrypt } from '@/utils/rsaEncrypt' const user = { state: { @@ -29,13 +28,9 @@ const user = { actions: { // 登录 Login({ commit }, userInfo) { - const username = userInfo.username - const password = decrypt(userInfo.password) - const code = userInfo.code - const uuid = userInfo.uuid const rememberMe = userInfo.rememberMe return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => { setToken(res.token, rememberMe) commit('SET_TOKEN', res.token) setUserInfo(res.user, commit) @@ -59,7 +54,6 @@ const user = { }) }) }, - // 登出 LogOut({ commit }) { return new Promise((resolve, reject) => {