linwenxin hai 1 mes
pai
achega
904a6589c9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/store/modules/user/index.js

+ 1 - 1
src/store/modules/user/index.js

@@ -25,7 +25,7 @@ function getQueryVariable(variable) {
 
 const state = {
   openId: getQueryVariable('openId') || getStorage('openId') || '',
-  token: getQueryVariable('x-token') || getStorage('token') || '',
+  token: getStorage('token') || getQueryVariable('x-token') || '',
   name: getQueryVariable('username') || getStorage('name') || '',
   avatar: getQueryVariable('useravatar') || getStorage('avatar') || '',
   userId: getQueryVariable('userId') || getStorage('userId') || '',