linwenxin пре 1 месец
родитељ
комит
904a6589c9
1 измењених фајлова са 1 додато и 1 уклоњено
  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') || '',