|
@@ -110,6 +110,9 @@ const actions = {
|
|
console.log(res)
|
|
console.log(res)
|
|
const { access_token, refresh_token, ...user } = res
|
|
const { access_token, refresh_token, ...user } = res
|
|
const expires = new Date(jwt_decode(refresh_token).exp * 1000)
|
|
const expires = new Date(jwt_decode(refresh_token).exp * 1000)
|
|
|
|
+ if (Date.parse(expires) - Date.parse(new Date()) > 0) {
|
|
|
|
+ console.log('服务器或浏览器时间存在问题,请注意!')
|
|
|
|
+ }
|
|
commit('SET_ACCESS_TOKEN', access_token)
|
|
commit('SET_ACCESS_TOKEN', access_token)
|
|
commit('SET_REFRESH_TOKEN', refresh_token)
|
|
commit('SET_REFRESH_TOKEN', refresh_token)
|
|
commit('SET_PARTID', res.last_login_shopid)
|
|
commit('SET_PARTID', res.last_login_shopid)
|