cr лет назад: 4
Родитель
Сommit
ed4afe0013
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      src/common/api/ajax.js

+ 5 - 5
src/common/api/ajax.js

@@ -65,15 +65,15 @@ const http = {
65 65
         }
66 66
 
67 67
         // 发送请求
68
-
68
+        console.log(store.state.user,'ajax')
69 69
         let header = {
70 70
             'Accept': 'application/json',
71 71
             'Content-Type': ContentType,
72
-            'appId': store.state.user.user ? store.state.user.user.appId : '',
73
-            'companyId': store.state.user.user ? store.state.user.user.companyId : '',
74
-            'userId': store.state.user.user ? store.state.user.user.id : '',
72
+            'appId': store.state.user.user ? (store.state.user.user.appId || '') : '',
73
+            'companyId': store.state.user.user ? (store.state.user.user.companyId || '') : '',
74
+            'userId': store.state.user.user ? (store.state.user.user.id || '') : '',
75 75
             'Authorization': 'Bearer ' + store.state.user.token,
76
-            'StoreId': store.state.common.curShop.id || ''
76
+            // 'StoreId': store.state.common.curShop.id || ''
77 77
         }
78 78
         if (store.state.user && store.state.user.user) {
79 79
             header.StoreId = store.state.user.user.storeId || '';