|
@@ -1,7 +1,7 @@
|
|
|
import Vue from 'vue'
|
|
|
import Vuex from 'vuex'
|
|
|
import storage from '../utils/storage'
|
|
|
-import axios from 'axios'
|
|
|
+import axios from '../utils/axios'
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
const KEY_LAST_ROUTE = 'last_route'
|
|
@@ -56,7 +56,8 @@ const store = new Vuex.Store({
|
|
|
},
|
|
|
actions: {
|
|
|
async loadUserInfo(context,{token}){
|
|
|
- let res = await axios.get('/server/userInfo', {params: {token: token, _t: +new Date()}})
|
|
|
+ let res = await axios.get('/server/userInfo', {params: {token: token}})
|
|
|
+ // debugger
|
|
|
console.log(res)
|
|
|
if(res.data.result == 'success') {
|
|
|
// commit 到vuex, 供全局使用
|