xiaomei 1 жил өмнө
parent
commit
99a27a1a83

+ 6 - 0
src/pages.json

@@ -607,6 +607,12 @@
 						"navigationBarTitleText": "店铺海报",
 						"navigationStyle": "custom"
 					}
+				},
+				{
+					"path": "consumerGold/exchange",
+					"style": {
+						"navigationBarTitleText": "消费金兑换"
+					}
 				}
 			]
 		}

+ 5 - 0
src/pages/pay-agreement/index.vue

@@ -33,6 +33,11 @@ export default {
       uni.setNavigationBarTitle({
         title: "天天捡漏协议",
       });
+    } else if(option.type == 7) {
+      this.type = 29;
+      uni.setNavigationBarTitle({
+        title: "消费金兑换协议",
+      });
     }
     this.loadData();
   },

+ 17 - 2
src/pages/product/p_details.vue

@@ -10,6 +10,11 @@
                 <span v-if="Number(detail.cha_bao) != 0 && Number(detail.cost_price) != 0">+</span>
                 <span v-if="Number(detail.cha_bao) != 0">{{ detail.cha_bao }}茶宝</span>
             </view>
+            <view v-else-if="type == 7" class="price">
+                <span v-if="Number(detail.cost_price) != 0">{{ detail.cost_price }}元</span>
+                <span v-if="Number(detail.consume) != 0 && Number(detail.cost_price) != 0">+</span>
+                <span v-if="Number(detail.consume) != 0">{{ detail.consume }}消费金</span>
+            </view>
             <view v-else-if="type == 1" class="price flex_c">
                 <text class="p_favour_teac" v-if="type == 1">¥: {{ $h.Add(detail.teac,$h.Mul(detail.trade_teac, 2))||0 }} TeaC +{{ detail.treasure_price||0 }} 茶宝</text>
                 <text class="p_trade_teac" v-if="type == 1">寄卖服务费:{{$h.Mul(detail.service,2)}} 元</text>
@@ -47,6 +52,13 @@
                     <text class="red">分享约获得 {{ detail.first_teac }} {{type==3?'TeaC':'现金'}}</text>
                 </view>
             </view>
+            <view class="goods_teac flex_r flex_jb" v-if="['7'].includes(type)">
+                <view class="product-txt"></view>
+                <view class="product-txt fenxiang">
+                    <text class="iconfont red">&#xe62b;</text>
+                    <text class="red">分享约获得 {{ detail.first_int }} 现金</text>
+                </view>
+            </view>
             <view class="goods_subName">{{ detail.goodsMsg }}</view>
         </view>
         <!-- 标题信息栏-end -->
@@ -61,7 +73,7 @@
         <!-- 产品简介-end -->
         <!-- 底部导航组件 -->
         <view class="option">
-            <uni-goods-nav :fill="true" :options="options" :buttonGroup="type == 5 ? buttonGroupTea : buttonGroup" @click="onClick" @buttonClick="buttonClick" />
+            <uni-goods-nav :fill="true" :options="options" :buttonGroup="type == 5 || type == 7? buttonGroupTea : buttonGroup" @click="onClick" @buttonClick="buttonClick" />
         </view>
         <!-- 底部导航组件-end -->
         <!-- 购买或加入购物车弹窗 -->
@@ -77,6 +89,7 @@
                         <view class="goods_msg" v-if="type == 1">¥: {{ $h.Add(detail.teac,$h.Mul(detail.trade_teac, 2))||0 }}TeaC + {{ detail.treasure_price }}茶宝</view>
                         <view class="goods_smsg" v-if="type == 1">寄卖服务费:{{$h.Mul(detail.service,2)}} 元</view>
                         <view class="goods_msg" v-else-if="type == 2">{{ detail.trade_price }}元+{{ detail.trade_num }}批发券+{{ detail.treasure_price }}茶宝</view>
+                        <view class="goods_msg" v-else-if="type == 7">{{ detail.cost_price }}元+{{ detail.consume }}消费金</view>
                         <view class="goods_msg" v-else>¥{{ afterSpecPrice }}</view>
                         <view class="num_con flex_r flex_je" v-if="type != 6">
                             <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>
@@ -126,13 +139,15 @@
                 <checkbox-group class="flex_r flex_ac flex_jc" @change="checkboxChange">
                     <label class="option_box">
                         <checkbox value="1" :checked="checked" color="#2DB389" style="transform: scale(0.7)" />
-                        我已阅读同意<text @tap.stop="getProPage" v-if="type != 5 && type != 6">《购买协议》</text>
+                        我已阅读同意<text @tap.stop="getProPage" v-if="type != 5 && type != 6 && type != 7">《购买协议》</text>
                         <text @tap.stop="getProPage" v-else-if="type == 5">《兑换协议》</text>
                         <text @tap.stop="getProPage" v-else-if="type == 6">《天天捡漏协议》</text>
+                        <text @tap.stop="getProPage" v-else-if="type == 7">《消费金兑换协议》</text>
                     </label>
                 </checkbox-group>
                 <view class="confim flex_r flex_ac flex_jc" v-if="type == 1" @tap="ToPayPage">立即支付</view>
                 <view class="confim flex_r flex_ac flex_jc" v-else-if="type == 5" @tap="ToPayPage">确认订单</view>
+                <view class="confim flex_r flex_ac flex_jc" v-else-if="type == 7" @tap="ToPayPage">确认订单</view>
                 <view class="confim flex_r flex_ac flex_jc" v-else @tap="ToPayPage">立即支付 ¥{{afterSpecPrice * buyNum}}</view>
             </view>
         </uni-popup>

+ 6 - 0
src/pages/szw-order-list/index.vue

@@ -253,6 +253,7 @@ export default {
                         }).then((res) => {
                             if (res.code === 0) {
                                 that.$toast(res.msg);
+                                page = 1
                                 that.loadData();
                             }
                         });
@@ -585,6 +586,11 @@ page {
     color: rgb(245, 8, 8);
 }
 
+.tagcolor7 {
+    border-color: #b44ddd;
+    color: #b44ddd;
+}
+
 // 商品规格-start
 .goods_spec{
     font-size: 24rpx;

+ 8 - 1
src/pages/to-pay-list/index.vue

@@ -97,6 +97,13 @@
                 <view class="list_con" v-if="Data.type != 5">{{ goodsInfo.treasure_price * Data.num }} 茶宝</view>
                 <view class="list_con" v-else>{{ $h.Mul(goodsInfo.cha_bao, Data.num) }} 茶宝</view>
             </view>
+            <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 7">
+                <view class="flex_r flex_ac">
+                    <view class="list_name">消费金</view>
+                    <view class="list_con p_color">(可用{{ localInfo.integral }})</view>
+                </view>
+                <view class="list_con">{{ $h.Mul(goodsInfo.consume, Data.num) }} 消费金</view>
+            </view>
             <view class="order_list flex_r flex_ac flex_jb" v-if="Data.type == 2">
                 <view class="flex_r flex_ac">
                     <view class="list_name">批发券</view>
@@ -356,7 +363,7 @@ export default {
                         obligation = b2 > 0 ? b2 : 0;
                     } else obligation = a;
                 }
-                else if (["5", "6"].includes(type)) obligation = a;
+                else if (["5", "6", "7"].includes(type)) obligation = a;
                 else if (["3"].includes(type)) obligation = b1 > 0 ? this.$h.Add(b1, ys) : ys;
                 else obligation = b > 0 ? b : 0;
                 this.obligation = obligation;

+ 191 - 0
src/pagesC/consumerGold/exchange.vue

@@ -0,0 +1,191 @@
+<template>
+    <view class="container">
+        <!-- 批发专区 -->
+        <view class="who_list flex_r" v-for="(item, index) in who_list" :key="index" @tap="NavToGoodsDetail(item.id)">
+            <image class="list_img" :src="item.original_img"></image>
+            <view class="list_info flex_c flex_jb">
+                <view class="info_name">{{ item.goods_name }}</view>
+                <view class="info_msg">
+                    <view></view>
+                    <span v-if="Number(item.price) != 0">{{ item.price }}元</span>
+                    <span v-if="Number(item.cha_bao_price) != 0 && Number(item.price) != 0">+</span>
+                    <span v-if="Number(item.cha_bao_price) != 0">{{ item.consume_price }}消费金</span>
+                </view>
+                <view class="info_btn_con flex_r flex_ae flex_jb">
+                    <view class="product-txt fenxiang">
+                        <text class="iconfont red">&#xe62b;</text>
+                        <text class="red">分享约获得{{item.first_int}}现金</text>
+                    </view>
+                    <view class="info_btn flex_r flex_ac flex_jc">兑换</view>
+                </view>
+            </view>
+        </view>
+    </view>
+</template>
+<script>
+let page = 1;
+import { post } from "@/request/api.js";
+export default {
+    data() {
+        return {
+            who_list: [], // 茶宝兑换商品列表
+            type: "",
+        };
+    },
+    onLoad(e) {
+        this.type = e.type;
+    },
+    onShow() {
+        page = 1;
+        this.who_list = [];
+        this.loadData();
+    },
+    methods: {
+        loadData() {
+            let that = this;
+            uni.showLoading({ mask: true });
+            let data = {
+                page: page,
+                type: this.type,
+            };
+            post("v1/goods/goodsList", data).then((res) => {
+                uni.hideLoading();
+                if (res.code === 0) {
+                    let obj = res.data.data;
+                    if (page == 1) that.who_list = [];
+                    if (obj.length > 0) {
+                        obj.forEach((e) => {
+                            that.who_list.push(e);
+                        });
+                    } else {
+                        page = -1;
+                        this.$toast("暂无更多");
+                    }
+                } else {
+                    page = -1;
+                    this.$toast("暂无更多");
+                }
+            });
+        },
+        // 跳转到商品详情页
+        NavToGoodsDetail: function(id) {
+            uni.navigateTo({
+                url: "/pages/product/p_details?id=" + id + "&type=" + this.type,
+            });
+        },
+    },
+
+    onShareAppMessage() {
+        let userinfo = uni.getStorageSync("userinfo");
+        var path = "/pages/product/productWholesale";
+        if (userinfo.invite) path = "/pages/product/productWholesale?invite=" + userinfo.invite;
+        var title = `让数字经济赋能美好生活!`;
+        return {
+            title: title,
+            path: path,
+        };
+    },
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function() {
+        if (page != -1) {
+            var that = this;
+            setTimeout(function() {
+                ++page;
+                that.loadData();
+            }, 800);
+        }
+    },
+};
+</script>
+<style lang="scss">
+// 页面配置
+page {
+    background: #f5f5f5;
+}
+
+.container {
+    padding: 18rpx 30rpx 0;
+    box-sizing: border-box;
+}
+
+// 页面配置-end
+
+// 批发商品列表
+.info_btn_con {
+    width: 100%;
+    overflow: hidden;
+    .product-txt{
+        font-size: 22rpx;
+        color: #787878;
+
+        .iconfont {
+        margin-right: 6rpx;
+        }
+    }
+    .red {
+        color: #fa2e18;
+    }
+    .fenxiang {
+        font-size: 20rpx;
+        background: rgba(250, 46, 24, 0.08);
+        border: 8rpx solid #F4F6F8;
+        display: inline-block;
+        border-radius: 6rpx;
+        padding: 2rpx 16rpx;
+    }
+}
+
+.list_info {
+    width: calc(100% - 200rpx);
+    overflow: hidden;
+}
+
+.list_img {
+    width: 200rpx;
+    height: 180rpx;
+    margin-right: 35rpx;
+    border-radius: 12rpx;
+}
+
+.info_btn {
+    width: 134rpx;
+    height: 50rpx;
+    background: #2db48a;
+    font-size: 30rpx;
+    color: #fff;
+    border-radius: 12rpx;
+}
+
+.info_msg {
+    width: 100%;
+    overflow: hidden;
+    font-size: 28rpx;
+    color: #18bb88;
+    font-family: "SourceHanSansCN-Medium";
+    font-weight: 500;
+}
+
+.info_name {
+    width: 100%;
+    overflow: hidden;
+    font-size: 34rpx;
+    color: #1b1b1b;
+    font-family: "SourceHanSansCN-Bold";
+    font-weight: bold;
+}
+
+.who_list {
+    width: 100%;
+    overflow: hidden;
+    background: #fff;
+    padding: 20rpx 16rpx;
+    box-sizing: border-box;
+    border-radius: 12rpx;
+    margin-bottom: 18rpx;
+    align-items: initial;
+}
+
+// 批发商品列表-end
+</style>

+ 1 - 0
src/utils/myfun.js

@@ -76,6 +76,7 @@ export function tidyTpye(va) {
         case 4: return "消费金电商";
         case 5: return "茶宝兑换";
         case 6: return "天天捡漏";
+        case 7: return "消费金兑换";
         default: return ""
     }
 }