浏览代码

消费金电商增加二级页面
添加二级界面特殊小分类(中间模块)页面

2662043119@qq.com 1 年之前
父节点
当前提交
7b6127289e

+ 19 - 13
src/pages.json

@@ -211,6 +211,18 @@
 			"style": {
 				"navigationBarTitleText": "公告列表"
 			}
+		},
+		{
+			"path": "pages/consumerGold/index",
+			"style": {
+				"navigationBarTitleText": "消费金电商"
+			}
+		},
+		{
+			"path": "pages/consumerGold/specialCategory",
+			"style": {
+				"navigationBarTitleText": "消费金电商"
+			}
 		}
 	],
 	"subPackages": [
@@ -536,18 +548,6 @@
 					"style": {
 						"navigationBarTitleText": "修改信息"
 					}
-				},
-				{
-					"path": "consumerGold/index",
-					"style": {
-						"navigationBarTitleText": "消费金电商"
-					}
-				},
-				{
-					"path": "consumerGold/specialCategory",
-					"style": {
-						"navigationBarTitleText": "消费金电商"
-					}
 				}
 			]
 		}
@@ -572,9 +572,15 @@
 			},
 			{
 				"pagePath": "pages/settledMerchant/index",
+				"iconPath": "static/nav/live_.png",
+				"selectedIconPath": "static/nav/live.png",
+				"text": "本地生活"
+			},
+			{
+				"pagePath": "pages/consumerGold/index",
 				"iconPath": "static/nav/local_.png",
 				"selectedIconPath": "static/nav/local.png",
-				"text": "本地生活"
+				"text": "消费金电商"
 			},
 			{
 				"pagePath": "pages/sign/index",

+ 5 - 2
src/pagesC/consumerGold/index.vue → src/pages/consumerGold/index.vue

@@ -150,13 +150,16 @@ export default {
     };
   },
   onLoad(option) {
-    this.getCategory();
     // uni.Luserfun()
   },
   onShow() {
     this.page = 1;
+    this.activeShow = true;
+    this.categoryId = 1;
+    this.categoryTitle = "今日推荐"
     this.productList = [];
     this.loadData();
+    this.getCategory();
     this.gethomeImg(); //活动列表
   },
   onHide() {},
@@ -228,7 +231,7 @@ export default {
     // 金刚区跳转
     setPageUrl(item) {
       this.goto(
-        "/pagesC/consumerGold/specialCategory?name=" +
+        "/pages/consumerGold/specialCategory?name=" +
           item.name +
           "&id=" +
           item.id +

+ 0 - 1
src/pagesC/consumerGold/specialCategory.vue → src/pages/consumerGold/specialCategory.vue

@@ -74,7 +74,6 @@ export default {
     };
   },
   onLoad(e) {
-    console.log(e);
     this.type = e.type;
     this.categoryId = e.id;
     this.titleName = e.name;

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

@@ -40,7 +40,7 @@
             <!-- 专区-end -->
             <!-- 活动 -->
             <view class="activity" v-if="homeImg.length">
-                <image class="act_img act_one_img" :src="homeImg[0].image" @click="goto('/pagesC/consumerGold/index')" mode=""></image>
+                <image class="act_img act_one_img" :src="homeImg[0].image" @click="toConsumerGold" mode=""></image>
                 <view class="act_other">
                     <image class="act_img act_two_img" :src="homeImg[1].image" @click="goto('/pages/product/productTeaBaby?type=5')" mode=""></image>
                     <image class="act_img act_two_img" :src="homeImg[2].image" mode="" @click="goVipGift"></image>
@@ -189,6 +189,11 @@ export default {
                 return false;
             }
         },
+        toConsumerGold(){
+            uni.switchTab({
+                url: "/pages/consumerGold/index"
+            })
+        },
         goVipGift() {
             this.goto("/pages/product/productRetail", { type: 4, is_vip: 1 });
         },

+ 57 - 6
src/pages/sign/index.vue

@@ -7,7 +7,8 @@
                 <view class="user_info flex_c flex_jc">
                     <view class="user_name">{{ userinfo.nickname }}</view>
                     <view class="level_con flex_r flex_ac">
-                        <view class="level">{{ userinfo.level_name }}</view>
+                        <!-- <image src="@/static/my/huangguan.png" class="live_ico" /> -->
+                        <view class="level">{{ typeto(localInfo.level_id) }}</view>
                     </view>
                 </view>
             </view>
@@ -36,6 +37,16 @@
             </view>
             <!-- 签到信息-end -->
         </view>
+        <!-- 天天捡漏-start -->
+        <view class="pick">
+            <image
+              class="pick_img"
+              mode="widthFix"
+              :src="pick.image"
+              @click="goto('/pages/product/productRetail', { type: pick.type })"
+            ></image>
+        </view>
+        <!-- 天天捡漏-end -->
         <!-- 精品推荐 -->
         <view class="bou_head flex_r flex_ac flex_jc">
             <image class="bou_img" src="/static/sgin/left.png" mode=""></image>
@@ -94,12 +105,16 @@ export default {
             totalSign: 0, //累计签到数
             nextSign: 0, //剩余签到时间 秒
             canClick: true,
+            localInfo: {},
+            pick: {}, // 天天捡漏
         };
     },
-    onShow() {
+    async onShow() {
         this.userinfo = uni.getStorageSync("userinfo");
         this.loadData();
         this.goodsDay();
+        this.getPick();
+        this.localInfo = await uni.Luserfun()
     },
     onLoad(da) {},
     onHide() {},
@@ -129,7 +144,27 @@ export default {
                 }
             });
         },
-
+        // 天天捡漏
+        getPick() {
+            post("v1/goods/simple").then((res) => {
+                if (res.code === 0) {
+                    this.pick = res.data.data
+                } else {
+                    this.$toast(res.msg);
+                }
+            });
+        },
+        typeto(va) {
+            switch (va) {
+                case 1: return "消费商";
+                case 2: return "链接大使";
+                case 3: return "合伙人";
+                case 4: return "联合创始人";
+                case 5: return "联合发起人";
+                default:
+                    return ""
+            }
+        },
         // 获取消费金电商
         goodsDay() {
             let that = this;
@@ -203,12 +238,18 @@ page {
     border-radius: 50%;
 }
 
-.level {
+.level_con {
     background: rgba(0, 0, 0, 0.18);
     padding: 6rpx 24rpx;
     font-size: 24rpx;
     color: #fff;
     border-radius: 100rpx;
+
+    .live_ico {
+        width: 26rpx;
+        height: 26rpx;
+        margin-right: 6rpx;
+    }
 }
 
 .user_name {
@@ -356,12 +397,21 @@ page {
 }
 
 // 动画效果-end
-
+// 天天捡漏-start
+.pick{
+    padding: 0 30rpx;
+    
+    &_img{
+        width: 100%;
+        border-radius: 16rpx;
+    }
+}
+// 天天捡漏-end
 // 精彩推荐
 .bou_head {
     width: 100%;
     height: 114rpx;
-    margin-top: 50rpx;
+    margin-top: 10rpx;
 
     .bou_img {
         width: 92rpx;
@@ -479,4 +529,5 @@ page {
         padding: 0 16rpx;
     }
 }
+
 </style>

二进制
src/static/nav/live.png


二进制
src/static/nav/live_.png