export function checkToken (vm) { let expiresTime = vm.$store.state.user.vuex_loginInfo.expiresTime let nowTime = new Date() * 1 console.log('超时了') console.log(expiresTime) if(nowTime>expiresTime*1) { vm.$store.commit('goLogin') // 如果小于20分钟就刷新一下token && }else if((expiresTime*1 - nowTime) / 60000 < 10 ) { vm.$store.dispatch('refreshToken') } }