Browse Source

Merge branch 'master' of http://git.ycjcjy.com/honghe/admin-draw-lots into master

张延森 3 years ago
parent
commit
9a62955343
4 changed files with 4 additions and 5 deletions
  1. 1
    1
      src/api/user.js
  2. 1
    1
      src/store/modules/settings.js
  3. 1
    1
      src/store/modules/user.js
  4. 1
    2
      src/utils/auth.js

+ 1
- 1
src/api/user.js View File

@@ -6,4 +6,4 @@ export function login(data) {
6 6
     method: 'post',
7 7
     data
8 8
   })
9
-}
9
+}

+ 1
- 1
src/store/modules/settings.js View File

@@ -18,7 +18,7 @@ const mutations = {
18 18
 }
19 19
 
20 20
 const actions = {
21
-  changeSetting ({ commit }, data) {
21
+  changeSetting({ commit }, data) {
22 22
     commit('CHANGE_SETTING', data)
23 23
   }
24 24
 }

+ 1
- 1
src/store/modules/user.js View File

@@ -27,7 +27,7 @@ const actions = {
27 27
   login({ commit }, userInfo) {
28 28
     const { userName, password } = userInfo
29 29
     return new Promise((resolve, reject) => {
30
-      login({ userName: userName.trim(), password:md5(password) }).then(response => {
30
+      login({ userName: userName.trim(), password: md5(password) }).then(response => {
31 31
         const { data } = response
32 32
         commit('SET_TOKEN', data.token)
33 33
         setToken(data.token)

+ 1
- 2
src/utils/auth.js View File

@@ -10,7 +10,6 @@ export function setToken(token) {
10 10
   return Cookies.set(TokenKey, token)
11 11
 }
12 12
 
13
-
14 13
 export function removeToken() {
15 14
   return Cookies.remove(TokenKey)
16 15
 }
@@ -22,4 +21,4 @@ export function setUserId(userId) {
22 21
 }
23 22
 export function getUserId() {
24 23
   return Cookies.get(UserIdKey)
25
-}
24
+}