Просмотр исходного кода

fix:获取店铺接口添加deptId

tremble 3 лет назад
Родитель
Сommit
5a9b27741b
2 измененных файлов с 3 добавлено и 7 удалено
  1. 1 1
      .env.bendi
  2. 2 6
      src/apis/index.js

+ 1 - 1
.env.bendi

@@ -19,5 +19,5 @@ VUE_APP_STATIC_DIR=viewer
 VUE_APP_REGION_URL=aws
 
 # 接口请求地址
-VUE_APP_APIS_URL=http://221.4.210.172:18888/
+VUE_APP_APIS_URL=https://zhongmian.4dage.com/
 

+ 2 - 6
src/apis/index.js

@@ -1,11 +1,7 @@
 import { http } from "@/utils/request";
 import browser from "@/utils/browser";
 import store from "@/store";
-
 let deptId = null
-if (store.getters['scene/cdfRegionData']) {
-  deptId = store.getters['scene/cdfRegionData'].deptId
-}
 
 export const get_goods_list = (data) => {
   return http.get("/back/product/list", data);
@@ -18,7 +14,7 @@ export const get_category_list = (data) => {
 export const get_shop_list = (data) => {
   return http.get("/api/getShopByCategory", {
     ...data,
-    deptId
+    deptId:store.getters['scene/cdfRegionData'].deptId || null
   });
 };
 
@@ -57,7 +53,7 @@ export const burying_point = (data) => {
       whereUrl: url,
       type: data.type,
       productId: data.productId,
-      deptId
+      deptId:store.getters['scene/cdfRegionData'].deptId || null
     });
   }