ソースを参照

福利活动专区布局修改

vvv vvv 1 年間 前
コミット
b120409575
2 ファイル変更56 行追加9 行削除
  1. 48 9
      src/pages/sign/index.vue
  2. 8 0
      src/pagesB/orderingfood/orderlist.vue

+ 48 - 9
src/pages/sign/index.vue

@@ -38,15 +38,24 @@
             <!-- 签到信息-end -->
         </view>
         <!-- 天天捡漏等活动区-start -->
-        <view class="pick" v-for="(item,index) in activityList" :key="index">
+        <view class="pick">
             <image
               class="pick_img"
               mode="widthFix"
-              :src="item.image"
-              @click="toPage(item.type)"
+              :src="activityList[0].image"
+              @click="toPage(activityList[0].url)"
             ></image>
         </view>
         <!-- 天天捡漏等活动区-end -->
+        <!-- 活动 -->
+        <view class="activity" v-if="activityList.length">
+                <image class="act_img act_one_img" :src="activityList[1].image" @click="toPage(activityList[1].url)" mode=""></image>
+                <view class="act_other">
+                    <image class="act_img act_two_img" :src="activityList[2].image" mode="" @click="toPage(activityList[2].url)"></image>
+                    <image class="act_img act_two_img" :src="activityList[3].image" @click="toPage(activityList[3].url)" mode=""></image>
+                </view>
+            </view>
+            <!-- 活动-end -->
         <!-- 精品推荐 -->
         <view class="bou_head flex_r flex_ac flex_jc">
             <image class="bou_img" src="/static/sgin/left.png" mode=""></image>
@@ -154,12 +163,17 @@ export default {
                 }
             });
         },
-        toPage(type){
-            if(type == 1){
-                this.goto("/pagesB/specialregion/index")
-            }else{
-                this.goto("/pages/product/productRetail", { type: type })
-            }
+        toPage(url){
+            this.goto(url);
+            // if(type == 1){
+            //     this.goto("/pagesB/specialregion/index")
+            // }else if(type==4){
+            //     this.goto("/pages/consumerGold/specialCategory", { type: type });
+            // }else if(type==5){
+            //     this.goto("/pages/product/productTeaBaby", { type: type });
+            // }else{
+            //     this.goto("/pages/product/productRetail", { type: type })
+            // }
         },
         typeto(va) {
             switch (va) {
@@ -539,5 +553,30 @@ page {
         padding: 0 16rpx;
     }
 }
+// 活动
+.activity {
+    padding: 0 30rpx;
+    .act_one_img {
+        display: inline-block;
+        width: 300rpx;
+        height: 378rpx;
+        margin-right: 10rpx;
+    }
+
+    .act_other {
+        display: inline-block;
+        width: calc(100% - 300rpx - 10rpx);
+    }
+
+    .act_two_img {
+        width: 100%;
+        height: 185rpx;
+    }
+
+    .act_img {
+        border-radius: 10rpx;
+    }
+}
 
+// 活动-end
 </style>

+ 8 - 0
src/pagesB/orderingfood/orderlist.vue

@@ -182,6 +182,14 @@ export default {
     onReachBottom() {
         if (this.Query.page < this.pageData.last_page) this.getList();
     },
+    // 监听卸载页面  同等于  返回拦截
+    onUnload() {
+        let pages = getCurrentPages();
+        let prevPage = pages[pages.length - 2]?.route
+        if (prevPage == "pagesB/orderingfood/payTheBill") {
+            uni.switchTab({ url: "/pages/my/index" });
+        }
+    },
 };
 </script>
 <style scoped lang='scss'>