Rx goods supported / Product detail multi-specification added / "window" in fetch removed

This commit is contained in:
Vion
2022-01-22 19:20:04 +08:00
parent 79ff28e63d
commit c6267a73ee
10 changed files with 222 additions and 239 deletions

View File

@@ -29,12 +29,13 @@ const mutations = {
logoutSystem(state) {
localStorage.removeItem('userInfo')
},
checkIsLogin() {
checkIsLogin(state) {
let rawUserInfoStr = localStorage.getItem('userInfo');
let rawUserInfo = JSON.parse(rawUserInfoStr);
if(rawUserInfo && rawUserInfo.hasOwnProperty('xaccessToken') && rawUserInfo['xaccessToken'].length>36)
return rawUserInfo;
return false;
state.userInfo = rawUserInfo;
else
state.userInfo = undefined;
},
changemessage(state, val) {
localStorage.setItem('message', val.data);