Jelajahi Sumber

首页显示修改

qng 3 tahun lalu
induk
melakukan
14a16cbf92
1 mengubah file dengan 13 tambahan dan 5 penghapusan
  1. 13 5
      wx-mall/pages/index/index.js

+ 13 - 5
wx-mall/pages/index/index.js

@@ -293,6 +293,8 @@ Page({
   // 此时 storeId已经保存到本地缓存中
   getStoreByIdWithMerch: function(callback) {
     let that = this;
+    var storeNameNew;
+    var isMapShowNew;
     util.request(api.StoreByIdWithMerch, {
       storeId: wx.getStorageSync('storeId'),
     }).then((res) => {
@@ -300,19 +302,25 @@ Page({
         if(res.data) {
           let storeVo = res.data.storeVo;
           let storeWithThirdMerchBizVo = res.data.storeWithThirdMerchBizVo;
-
+           if(storeWithThirdMerchBizVo.id == 161){
+            storeNameNew = '';
+            isMapShowNew = 0;
+           }else{
+            storeNameNew = storeWithThirdMerchBizVo.storeName
+            isMapShowNew = storeWithThirdMerchBizVo.isMapShow;
+           }
          that.setData({
            storeId: storeWithThirdMerchBizVo.id,
-           storeName: storeWithThirdMerchBizVo.storeName,
-           isMapShow: storeWithThirdMerchBizVo.isMapShow
+           storeName: storeNameNew,
+           isMapShow: isMapShowNew
          })
           console.log('获取第三方商户及门店信息,storeId:', storeWithThirdMerchBizVo.id)
           console.log('获取第三方商户及门店信息,storeName:', storeWithThirdMerchBizVo.storeName)
           console.log('获取第三方商户及门店信息,isMapShow:', storeWithThirdMerchBizVo.isMapShow)
 
           wx.setStorageSync('storeId', storeWithThirdMerchBizVo.id);
-          wx.setStorageSync('storeName', storeWithThirdMerchBizVo.storeName);
-          wx.setStorageSync('isMapShow', storeWithThirdMerchBizVo.isMapShow);
+          wx.setStorageSync('storeName', storeNameNew);
+          wx.setStorageSync('isMapShow', isMapShowNew);
           wx.setStorageSync('storeVo', JSON.stringify(storeVo));
         }
         if(callback){