浏览代码

feat:天天捡漏 活动专区

DaMowang 3 年之前
父节点
当前提交
db0aa238cc

+ 12 - 0
src/main.js

@@ -23,6 +23,18 @@ Vue.mixin(share)
 import highPrecision from "@/utils/highPrecision";
 Vue.prototype.$h = highPrecision;
 
+Vue.prototype.tidyTpye = (da) => {
+    switch(da) {
+        case '1': return "零售专区";
+        case '2': return "批发专区";
+        case '3': return "精品专区";
+        case '4': return "今日值得买";
+        case '5': return "茶宝兑换";
+        case '6': return "天天捡漏";
+        default: return ""
+    }
+}
+
 // 自动适配接口域名
 import hosts from "@/request/config";
 Vue.prototype.$hosts = hosts;

+ 14 - 8
src/pages/index/index.vue

@@ -36,7 +36,7 @@
             <view class="activity" v-if="spc_list.length > 0">
                 <image class="act_one_img" :src="spc_list[0].url" @click="setPageUrl({ type: 4 })" mode=""></image>
                 <view class="act_other">
-                    <image class="act_two_img" :src="spc_list[1].url" mode=""></image>
+                    <image class="act_two_img" :src="spc_list[1].url" @click="setPageUrl({ type: 6 })" mode=""></image>
                     <image class="act_two_img" :src="spc_list[2].url" mode="" @click="goNoticeList"></image>
                 </view>
             </view>
@@ -49,13 +49,15 @@
                     <view class="image-view">
                         <image class="product-image" :src="i.original_img"></image>
                     </view>
-                    <view :class="['product-title', 'ellipsis1']">{{ i.goods_name }}</view>
-                    <view class="product-price">
-                        <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
-                        <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
-                        <!-- <text class="product-tip">{{i.tip}}</text> -->
+                    <view class="content-view">
+                        <view :class="['product-title', 'ellipsis1']">{{ i.goods_name }}</view>
+                        <view class="product-price">
+                            <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
+                            <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
+                            <!-- <text class="product-tip">{{i.tip}}</text> -->
+                        </view>
+                        <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + "批发积分" : i.give_cha_bao + "茶宝" }}</view>
                     </view>
-                    <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + "批发积分" : i.give_cha_bao + "茶宝" }}</view>
                 </view>
                 <view class="fz_w_text mar_t20 mar_b20">让数字经济赋能美好生活!</view>
             </view>
@@ -164,7 +166,7 @@ export default {
         goList(e) {},
         // 金刚区跳转
         setPageUrl(item) {
-            if ([1, 3, 4].includes(item.type)) {
+            if ([1, 3, 4, 6].includes(item.type)) {
                 this.goto("/pages/product/productRetail", { type: item.type });
             } else if (item.type == 2) {
                 this.goto("/pages/product/productWholesale", { type: 2 });
@@ -347,6 +349,10 @@ export default {
         object-fit: cover;
     }
 
+    .content-view{
+        padding: 0 16rpx;
+    }
+
     .product-title {
         width: 100%;
         overflow: hidden;

+ 1 - 13
src/pages/product/p_details.vue

@@ -13,19 +13,7 @@
             <view v-else class="price" :class="type == 2 ? 'samll' : ''">¥{{ type == 2 ? detail.trade_price : detail.cost_price }}</view>
             <view class="price_span flex_r flex_ac flex_je">
                 <view class="triangle"></view>
-                <view class="span_conten flex_r flex_ac flex_jc">{{
-                    goodsDa.type == 1
-                    ? "零售专区"
-                    : goodsDa.type == 2
-                    ? "批发专区"
-                    : goodsDa.type == 3
-                    ? "精品专区"
-                    : goodsDa.type == 4
-                    ? "今日值得买"
-                    : goodsDa.type == 5
-                    ? "茶宝兑换"
-                    : ""
-                    }}</view>
+                <view class="span_conten flex_r flex_ac flex_jc">{{ tidyTpye(goodsDa.type) }}</view>
             </view>
         </view>
         <!-- 价格信息栏-end -->

+ 3 - 5
src/pages/product/productRetail.vue

@@ -33,7 +33,7 @@ export default {
     },
     onLoad(e) {
         this.type = e.type;
-        this.title = e.type == 1 ? "零售专区" : e.type == 3 ? "精品优选" : "今日值得买";
+        this.title = this.tidyTpye(e.type);
         uni.setNavigationBarTitle({
             title: this.title
         })
@@ -92,9 +92,7 @@ export default {
             path: path
         }
     },
-    /**
-     * 页面上拉触底事件的处理函数
-     */
+    //页面上拉触底事件的处理函数
     onReachBottom: function() {
         if (page != -1) {
             var that = this;
@@ -103,7 +101,7 @@ export default {
                 that.loadData();
             }, 800);
         }
-    }
+    },
 }
 </script>
 <style lang="scss">

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

@@ -46,13 +46,15 @@
                 <view class="image-view">
                     <image class="product-image" :src="i.original_img"></image>
                 </view>
-                <view :class="['product-title', 'ellipsis1']">{{ i.goods_name }}</view>
-                <view class="product-price">
-                    <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
-                    <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
-                    <!-- <text class="product-tip">{{i.tip}}</text> -->
+                <view class="content-view">
+                    <view :class="['product-title', 'ellipsis1']">{{ i.goods_name }}</view>
+                    <view class="product-price">
+                        <text class="product-price-original"><text class="product-unit">¥</text>{{ i.price }}</text>
+                        <!-- <text class="product-price-favour">¥{{i.originalPrice}}</text> -->
+                        <!-- <text class="product-tip">{{i.tip}}</text> -->
+                    </view>
+                    <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + '批发积分' : i.give_cha_bao + '茶宝'}}</view>
                 </view>
-                <view class="product-txt">赠送{{ i.give_integral ? i.give_integral + '批发积分' : i.give_cha_bao + '茶宝'}}</view>
             </view>
             <view class='fz_w_text mar_t20 mar_b20'>让数字经济赋能美好生活!</view>
         </view>
@@ -494,6 +496,10 @@ page {
     object-fit: cover;
   }
 
+    .content-view{
+        padding: 0 16rpx;
+    }
+
   .product-title {
     width: 100%;
     overflow: hidden;

+ 2 - 9
src/pages/to-pay-list/index.vue

@@ -117,14 +117,7 @@ export default {
 
         this.userinfo = uni.getStorageSync("userinfo");
         // 1零售 2批发 3精品 4今日值买
-        this.modularName =
-            e.type == 1 ?
-            "零售专区" :
-            e.type == 2 ?
-            "批发专区" :
-            e.type == 3 ?
-            "精品专区" :
-            "今日值买";
+        this.modularName = this.tidyTpye(e.type)
     },
     mounted() {
         // this.$refs.popup.open('top');
@@ -145,7 +138,7 @@ export default {
                         let y = this.Data.is_sell == 1 ? 0 : this.freight; // 运费   寄售的话退运费为0
                         let a = (p * this.Data.num + y * this.Data.num) * 100; //商品总价
                         let b = (a - this.userinfo.user_money * 100) / 100; //待支付金额
-                        if (this.Data.type == 4) this.obligation = a / 100;
+                        if (['4','6'].includes(this.Data.type)) this.obligation = a / 100;
                         else if (this.Data.type == 5) {
                             this.obligation = a / 100;
                         } else this.obligation = b > 0 ? b : 0;

+ 0 - 0
src/pagesB/product/leakyRoof.vue