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

@@ -19,13 +19,15 @@ export default async(url = '', data = {}, type = 'GET', method = 'fetch') => {
}
}
if (window.fetch && method === 'fetch') {
if (fetch && method === 'fetch') {
let token='';
let tokenStr = localStorage.getItem("userInfo");
if(tokenStr){
tokenStr = JSON.parse(tokenStr);
if(tokenStr && tokenStr.xaccessToken)
token=tokenStr.xaccessToken;
if(process.client) {
let tokenStr = localStorage.getItem("userInfo");
if(tokenStr){
tokenStr = JSON.parse(tokenStr);
if(tokenStr && tokenStr.xaccessToken)
token=tokenStr.xaccessToken;
}
}
let requestConfig = {
method: type,