Bladeren bron

“消费金电商”区域购买指定产品自动升级“群主“

DaMowang 2 jaren geleden
bovenliggende
commit
cfc72f0102
2 gewijzigde bestanden met toevoegingen van 10 en 1 verwijderingen
  1. 4 1
      src/pages/index/index.vue
  2. 6 0
      src/pages/product/productRetail.vue

+ 4 - 1
src/pages/index/index.vue

@@ -41,7 +41,7 @@
                 <image class="act_img act_one_img" :src="homeImg[0].image" @click="setPageUrl({ type: 4 })" mode=""></image>
                 <view class="act_other">
                     <image class="act_img act_two_img" :src="homeImg[1].image" @click="goto('/pagesB/specialregion/index')" mode=""></image>
-                    <image class="act_img act_two_img" :src="homeImg[2].image" mode="" @click="goNoticeList"></image>
+                    <image class="act_img act_two_img" :src="homeImg[2].image" mode="" @click="goVipGift"></image>
                 </view>
             </view>
             <!-- 活动-end -->
@@ -203,6 +203,9 @@ export default {
                 return false;
             }
         },
+        goVipGift(){
+            this.goto("/pages/product/productRetail", { type: 4, is_vip: 1 });
+        },
         // 是否激活数智生活
         isActivation(url) {
             uni.Location();

+ 6 - 0
src/pages/product/productRetail.vue

@@ -45,11 +45,16 @@ export default {
             type: '',
             goods: [], // 商品列表
             haveGoods: false, // 是否有商品
+            is_vip: undefined, //是否筛选“群主礼包”专区
         };
     },
     onLoad(e) {
         this.type = e.type;
         this.title = this.tidyTpye(e.type);
+        if(e.is_vip) {
+            this.is_vip = e.is_vip;
+            this.title = "群主礼包";
+        }
         uni.setNavigationBarTitle({
             title: this.title
         })
@@ -66,6 +71,7 @@ export default {
                 page: page,
                 type: this.type
             }
+            if(this.is_vip) data.is_vip = this.is_vip;
             post("v1/goods/goodsList", data).then(res => {
                 if (res.code === 0) {
                     let obj = res.data.data