mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-21 09:56:54 +08:00
Rx goods supported / Product detail multi-specification added / "window" in fetch removed
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user