Przeglądaj źródła

修改首页无匹配店铺报错

wenjie 6 dni temu
rodzic
commit
99e4aaf83e
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 3 0
      pages/index/index.js
  2. 1 1
      utils/config.js

+ 3 - 0
pages/index/index.js

@@ -865,6 +865,9 @@ Page({
    * 加载热销商品列表
    */
   getHotSalesProds() {
+    if(!this.data.shop_id||this.data.shop_id == 0){
+      return
+    }
     var param = {
       url: "/search/searchProdPage",
       method: "GET",

+ 1 - 1
utils/config.js

@@ -4,7 +4,7 @@
 
 var domain = "https://shop.api.zswlgz.com"; //统一接口域名,测试环境 
 var wsDomain = "wss://shop-h5.dev.zswllife.cn/api"; //统一接口域名,测试环境 
-var domain = "http://12e88ddc.r39.cpolar.top"; //统一接口域名,正式环境 
+// var domain = "http://12e88ddc.r39.cpolar.top"; //统一接口域名,正式环境 
 // var wsDomain = "wss://shop.haimamart.com/api"; //统一接口域名,正式环境 
 
 // var domain = "http://192.168.1.206:8112"; //统一接口域名,测试环境