Commit 7abe14f0 by maolipeng

fix:加上企业id参数,防止报错

parent ddb5b961
...@@ -27,7 +27,8 @@ interface HeadersType{ ...@@ -27,7 +27,8 @@ interface HeadersType{
storeId?:any, storeId?:any,
storeUserId?:any, storeUserId?:any,
userId?:any, userId?:any,
xmtoken?:any xmtoken?:any,
EnterpriseId?:any
} }
class Axios { class Axios {
static post( static post(
...@@ -51,6 +52,9 @@ class Axios { ...@@ -51,6 +52,9 @@ class Axios {
if(User.getToken()){ if(User.getToken()){
headerObject.xmtoken = User.getToken(); headerObject.xmtoken = User.getToken();
} }
if(User.getEnterpriseId()) {
headerObject.EnterpriseId = User.getEnterpriseId();
}
const instance: AxiosInstance = axios.create({ const instance: AxiosInstance = axios.create({
timeout: TIME_OUT, timeout: TIME_OUT,
responseType: 'json', responseType: 'json',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment