Эх сурвалжийг харах

feat:开放今日值得买

DaMowang 3 жил өмнө
parent
commit
e6fc8b75fd

+ 2 - 2
src/pages.json

@@ -224,8 +224,8 @@
 			}
 		},
 		{
-			"path" : "pages/integral-list/index",
-			"style" : {
+			"path": "pages/integral-list/index",
+			"style": {
 				"navigationBarTitleText": "积分专区"
 			}
 		}

+ 5 - 13
src/pages/index/index.vue

@@ -38,7 +38,7 @@
 
             <!-- 活动 -->
             <view class="activity" v-if="spc_list.length > 0">
-                <image class="act_one_img" :src="spc_list[0].url" mode=""></image>
+                <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[2].url" mode=""></image>
@@ -127,7 +127,6 @@ export default {
                     res.data.data.forEach(e => {
                         if(e.image) this.BannerImg.push(e.image)
                     });
-                    // this.BannerImg = res.list;
                 }
             });
         },
@@ -157,21 +156,14 @@ export default {
             });
         },
         // 轮播图跳转
-        goList(e) {
-            let id = e.id;
-            // uni.navigateTo({
-            //     url: "/pages/prefecture-list/index?id=" + id + "&type=1",
-            // });
-        },
+        goList(e) {},
         // 金刚区跳转
         setPageUrl(item){
-            if(item.type == 1){
+            if([1,3,4].includes(item.type)){
                 this.goto('/pages/product/productRetail',{type:item.type})
-            }else if(item.type == 2){
-                this.goto('/pages/product/productWholesale',{type:item.type})
             }
-            else if(item.type == 3){
-                this.goto('/pages/product/productRetail',{type:item.type})
+            else if(item.type == 2){
+                this.goto('/pages/product/productWholesale',{type:2})
             }
             else if(item.type == 5){
                 this.goto('/pages/product/productTeaBaby',{type:item.type})

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

@@ -265,31 +265,8 @@ import authorizeModule from '@/components/authorize-module/index'
 			},
 			// 点击立即购买或加入购物车
 			buttonClick:function(e){
-						// this.toPayOrder()
-				let that = this;
-                    // if(this.userinfo.is_authentication == 1){
-                        that.btnIndex = e.index
-                        that.$refs.shopping.open()
-                    // }else{
-                        // appEv.errTips('您还未实名')
-
-                        // const infor = reqApi.identifyUserPayment()
-                        // if(infor){
-                        //     infor.then(rea => {
-                        //         if(rea.status == 200){
-                        //             uni.navigateTo({
-                        //                 url:'/pages/autonym-submit/index'
-                        //             })
-                        //         }else if(rea.status == 999){
-                        //             uni.navigateTo({
-                        //                 url:'/pages/autonym-pay/index'
-                        //             })
-                        //         }else{
-                        //             appEv.errTip(rea.msg)
-                        //         }
-                        //     })
-                        // }
-                    // }
+				this.btnIndex = e.index
+				this.$refs.shopping.open()
 			},
 			// 点击关闭弹窗
 			closeBtn:function(){

+ 7 - 84
src/pages/product/productRetail.vue

@@ -5,50 +5,21 @@
             <view class="goods" v-for="(item,index) in goods" :key="index" @tap="NavToGoodsDetail(item.id)">
                 <image class="goods_img" :src="item.original_img" mode=""></image>
                 <view class="goods_info">
-                    <view class="info_title">{{item.goods_name}}</view>
-                    <!-- <view class="info_msg ellipsis">{{item.goodsMsg}}</view> -->
+                    <view class="info_title ellipsis2">{{item.goods_name}}</view>
                     <view class="info_option flex_r flex_ac flex_jb">
                         <view class="info_price"><text>¥</text>{{item.price}}</view>
-                        <!-- <image class="info_cart" src="/static/cart.png" mode="" @tap.stop="OpenShopping(index)"></image> -->
                     </view>
                     <view class="info_hint">赠送{{item.give_integral ? item.give_integral + '批发积分' : item.give_cha_bao + '茶宝'}}</view>
                 </view>
             </view>
         </view>
         <!-- 商品列表-end -->
-        <!-- 购买或加入购物车弹窗 -->
-        <uni-popup ref="shopping" type="bottom">
-            <view class="shopping">
-                <view class="close_con flex_r flex_je">
-                    <image class="close_img" src="/static/close.png" @tap="closeBtn" mode=""></image>
-                </view>
-                <view class="goods_infos flex_r">
-                    <image class="goods_imgs" :src="goodsIndex.goodsThumbnailUrl" mode=""></image>
-                    <view class="goods_cons flex_c flex_jb">
-                        <view class="shop_names">{{goodsIndex.goodsName}}</view>
-                        <view class="goods_msg">{{'¥' + goodsIndex.price}}</view>
-                        <view class="num_con flex_r flex_je">
-                            <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>
-                        </view>
-                    </view>
-                </view>
-                <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">《购买协议》</text>
-                    </label>
-                </checkbox-group>
-                <view class="confim flex_r flex_ac flex_jc" @tap="ToPayPage">确定</view>
-            </view>
-        </uni-popup>
-        <!-- 购买或加入购物车弹窗-end -->
     </view>
 </template>
 <script>
 let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
-// let reqApi = new ReqApi();
-// import { ReqApi } from "@/utils/reqTools.js";
 import { get, post, u_post } from "@/request/api.js";
 import uniPopup from '@/components/uni-popup/uni-popup.vue'
 export default {
@@ -56,14 +27,16 @@ export default {
     data() {
         return {
             goods: [], // 商品列表
-            goodsIndex: '', // 选中猜你喜欢的下标
-            buyNum: 1, // 购买数量
-            checked: false, // 是否同意协议
             type: '',
+            title: '',
         };
     },
     onLoad(e) {
-        this.type = e.type
+        this.type = e.type;
+        this.title = e.type == 1 ? "零售专区" : e.type == 3 ? "精品优选" : "今日值得买";
+        uni.setNavigationBarTitle({
+            title: this.title
+        })
     },
     onShow() {
         page = 1;
@@ -102,60 +75,10 @@ export default {
                 url: '/pages/product/p_details?id=' + id + '&type=' + this.type
             })
         },
-        // 打开加入购物车窗口
-        OpenShopping(index) {
-            this.checked = false
-            this.goodsIndex = this.goods[index]
-            this.$refs.shopping.open()
-        },
-        // 购买数量更改
-        bindChange: function(e) {
-            this.buyNum = e;
-        },
         // 点击关闭弹窗
         closeBtn: function() {
             this.$refs.shopping.close()
         },
-        // 点击同意协议
-        checkboxChange: function(e) {
-            let index = e.detail.value.indexOf('1');
-            if (index != -1) {
-                this.checked = true
-            } else {
-                this.checked = false
-            }
-        },
-        // 点击添加购物车
-        ToPayPage: function() {
-            if (!this.checked) {
-                appEv.errTips('请勾选同意购买协议')
-                return false
-            }
-            let that = this;
-            let data = {
-                goodsId: this.goodsIndex.goodsId,
-                buyCount: this.buyNum,
-                specialArea: 1
-            }
-            const info = reqApi.conShoppingCart(data)
-            if (info) {
-                info.then(res => {
-                    if (res.data.status == 200) {
-                        appEv.errTips('添加成功')
-                        that.checked = false
-                        that.buyNum = 1
-                        that.$refs.shopping.close()
-                    } else {
-                        appEv.errTips(res.data.msg)
-                    }
-                })
-            }
-        },
-        getProPage: function() {
-            uni.navigateTo({
-                url: '/pages/protocol/index?type=' + 1
-            })
-        }
     },
     onShareAppMessage: function() {
         let userinfo = uni.getStorageSync('userinfo');

+ 394 - 0
src/pages/product/productToDay.vue

@@ -0,0 +1,394 @@
+<template>
+    <view class="container">
+        <!-- 商品列表 -->
+        <view class="goods_con flex_r flex_ac flex_wrap">
+            <view class="goods" v-for="(item,index) in goods" :key="index" @tap="NavToGoodsDetail(item.id)">
+                <image class="goods_img" :src="item.original_img" mode=""></image>
+                <view class="goods_info">
+                    <view class="info_title">{{item.goods_name}}</view>
+                    <!-- <view class="info_msg ellipsis">{{item.goodsMsg}}</view> -->
+                    <view class="info_option flex_r flex_ac flex_jb">
+                        <view class="info_price"><text>¥</text>{{item.price}}</view>
+                        <!-- <image class="info_cart" src="/static/cart.png" mode="" @tap.stop="OpenShopping(index)"></image> -->
+                    </view>
+                    <view class="info_hint">赠送{{item.give_integral ? item.give_integral + '批发积分' : item.give_cha_bao + '茶宝'}}</view>
+                </view>
+            </view>
+        </view>
+        <!-- 商品列表-end -->
+        <!-- 购买或加入购物车弹窗 -->
+        <uni-popup ref="shopping" type="bottom">
+            <view class="shopping">
+                <view class="close_con flex_r flex_je">
+                    <image class="close_img" src="/static/close.png" @tap="closeBtn" mode=""></image>
+                </view>
+                <view class="goods_infos flex_r">
+                    <image class="goods_imgs" :src="goodsIndex.goodsThumbnailUrl" mode=""></image>
+                    <view class="goods_cons flex_c flex_jb">
+                        <view class="shop_names">{{goodsIndex.goodsName}}</view>
+                        <view class="goods_msg">{{'¥' + goodsIndex.price}}</view>
+                        <view class="num_con flex_r flex_je">
+                            <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>
+                        </view>
+                    </view>
+                </view>
+                <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">《购买协议》</text>
+                    </label>
+                </checkbox-group>
+                <view class="confim flex_r flex_ac flex_jc" @tap="ToPayPage">确定</view>
+            </view>
+        </uni-popup>
+        <!-- 购买或加入购物车弹窗-end -->
+    </view>
+</template>
+<script>
+let page = 1;
+let app = getApp();
+var appEv = app.$vm.$options;
+// let reqApi = new ReqApi();
+// import { ReqApi } from "@/utils/reqTools.js";
+import { get, post, u_post } from "@/request/api.js";
+import uniPopup from '@/components/uni-popup/uni-popup.vue'
+export default {
+    components: { uniPopup },
+    data() {
+        return {
+            goods: [], // 商品列表
+            goodsIndex: '', // 选中猜你喜欢的下标
+            buyNum: 1, // 购买数量
+            checked: false, // 是否同意协议
+            type: '',
+        };
+    },
+    onLoad(e) {
+        this.type = e.type
+    },
+    onShow() {
+        page = 1;
+        this.goods = [];
+        this.loadData()
+    },
+    methods: {
+        loadData() {
+            let that = this;
+            let data = {
+                page: page,
+                type: this.type
+            }
+            post("goods/goodsList", data).then(res => {
+                if (res.code === 0) {
+                    let obj = res.data.data
+                    if(page == 1) that.goods = []
+                    if (obj.length > 0) {
+                        obj.forEach(e => {
+                            that.goods.push(e)
+                        });
+                    } else {
+                        page = -1;
+                        appEv.errTips('暂无更多')
+                    }
+                } else {
+                    page = -1;
+                    appEv.errTips('暂无更多')
+                }
+
+            })
+        },
+        // 跳转到商品详情页
+        NavToGoodsDetail(id, type) {
+            uni.navigateTo({
+                url: '/pages/product/p_details?id=' + id + '&type=' + this.type
+            })
+        },
+        // 打开加入购物车窗口
+        OpenShopping(index) {
+            this.checked = false
+            this.goodsIndex = this.goods[index]
+            this.$refs.shopping.open()
+        },
+        // 购买数量更改
+        bindChange: function(e) {
+            this.buyNum = e;
+        },
+        // 点击关闭弹窗
+        closeBtn: function() {
+            this.$refs.shopping.close()
+        },
+        // 点击同意协议
+        checkboxChange: function(e) {
+            let index = e.detail.value.indexOf('1');
+            if (index != -1) {
+                this.checked = true
+            } else {
+                this.checked = false
+            }
+        },
+        // 点击添加购物车
+        ToPayPage: function() {
+            if (!this.checked) {
+                appEv.errTips('请勾选同意购买协议')
+                return false
+            }
+            let that = this;
+            let data = {
+                goodsId: this.goodsIndex.goodsId,
+                buyCount: this.buyNum,
+                specialArea: 1
+            }
+            const info = reqApi.conShoppingCart(data)
+            if (info) {
+                info.then(res => {
+                    if (res.data.status == 200) {
+                        appEv.errTips('添加成功')
+                        that.checked = false
+                        that.buyNum = 1
+                        that.$refs.shopping.close()
+                    } else {
+                        appEv.errTips(res.data.msg)
+                    }
+                })
+            }
+        },
+        getProPage: function() {
+            uni.navigateTo({
+                url: '/pages/protocol/index?type=' + 1
+            })
+        }
+    },
+    onShareAppMessage: function() {
+        let userinfo = uni.getStorageSync('userinfo');
+        var path = '/pages/product/productRetail?agentId=1';
+        if (userinfo.user_id) {
+            path = '/pages/product/productRetail?agentId=' + userinfo.user_id;
+        }
+        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: #F4F4F4;
+}
+
+.container {
+    padding: 22rpx 30rpx;
+    box-sizing: border-box;
+}
+
+// 页面配置-end
+
+// 商品列表
+.goods:nth-child(2n) {
+    margin-right: 0;
+}
+
+.info_cart {
+    width: 46rpx;
+    height: 45rpx;
+}
+
+.goods_con {
+    width: 100%;
+    overflow: hidden;
+}
+
+.info_hint {
+    font-size: 22rpx;
+    color: #787878;
+}
+
+.info_option {
+    width: 100%;
+    overflow: hidden;
+}
+
+.goods_img {
+    width: 100%;
+    height: 232rpx;
+    display: block;
+}
+
+.info_msg {
+    font-size: 24rpx;
+    color: #787878;
+    margin-top: 8rpx;
+}
+
+.goods_info {
+    padding: 20rpx 16rpx;
+    width: 100%;
+    box-sizing: border-box;
+}
+
+.info_price {
+    font-size: 32rpx;
+    color: #18BB87;
+    font-family: "SourceHanSansCN-Bold";
+}
+
+.info_title {
+    font-size: 28rpx;
+    color: #1B1A1A;
+    font-family: "SourceHanSansCN-Bold";
+    font-weight: bold;
+}
+
+.info_price text {
+    font-size: 22rpx;
+    color: #18BB87;
+    font-family: "SourceHanSansCN-Bold";
+    font-weight: bold;
+}
+
+.goods {
+    width: calc((100% - 22rpx) / 2);
+    overflow: hidden;
+    margin-right: 22rpx;
+    margin-bottom: 22rpx;
+    background: #fff;
+    border-radius: 12rpx;
+}
+
+// 商品列表-end
+
+// 购买或加入购物车弹窗
+.option_box text {
+    color: #2DB389;
+}
+
+.goods_raido {
+    margin-right: 180rpx;
+}
+
+.close_img {
+    width: 36rpx;
+    height: 36rpx;
+}
+
+.option_box {
+    font-size: 26rpx;
+    margin-top: 80rpx;
+}
+
+.goods_raido:nth-last-child(1) {
+    margin-right: 0;
+}
+
+.num_con {
+    width: 100%;
+    overflow: hidden;
+    padding-bottom: 3rpx;
+}
+
+.goods_option {
+    width: 100%;
+    overflow: hidden;
+    padding-top: 50rpx;
+}
+
+.close_con {
+    width: 100%;
+    overflow: hidden;
+    margin-bottom: 35rpx;
+}
+
+.raido_text {
+    font-size: 26rpx;
+    color: #545454;
+    margin-left: 30rpx;
+}
+
+.goods_cons {
+    width: calc(100% - 202rpx - 30rpx);
+    overflow: hidden;
+}
+
+.goods_imgs {
+    width: 202rpx;
+    height: 183rpx;
+    margin-right: 30rpx;
+    border-radius: 12rpx;
+}
+
+.confim {
+    width: 100%;
+    height: 60rpx;
+    border-radius: 30rpx;
+    background: #2DB389;
+    color: #fff;
+    font-size: 26rpx;
+    margin-top: 44rpx;
+}
+
+.shopping {
+    width: 100%;
+    overflow: hidden;
+    padding: 20rpx;
+    box-sizing: border-box;
+    border-radius: 30rpx 30rpx 0 0;
+    background: #fff;
+}
+
+.goods_infos {
+    width: 100%;
+    overflow: hidden;
+    align-items: inherit;
+    padding-bottom: 48rpx;
+    border-bottom: 3rpx solid rgba(0, 0, 0, .12);
+}
+
+.shop_names {
+    width: 100%;
+    overflow: hidden;
+    font-family: "SourceHanSansCN-Bold";
+    font-weight: bold;
+    color: #1B1B1B;
+    font-size: 32rpx;
+}
+
+.goods_msg {
+    width: 100%;
+    overflow: hidden;
+    font-size: 28rpx;
+    color: #18BB88;
+    font-family: "SourceHanSansCN-Medium";
+    font-weight: 500;
+}
+
+.raido_img {
+    width: 39rpx;
+    height: 35rpx;
+    background: url(~@/static/img/weixuanzhong.png);
+    background-repeat: no-repeat;
+    background-size: 35rpx 35rpx;
+    background-position: center center;
+}
+
+.raido_box {
+    background: url(~@/static/img/consent.png);
+    background-repeat: no-repeat;
+    background-size: 39rpx 35rpx;
+    background-position: center center;
+}
+
+// 购买或加入购物车弹窗-end
+</style>

+ 106 - 363
src/pages/sign/index.vue

@@ -1,8 +1,5 @@
 <template>
     <view class="container">
-        <!-- 页面标题 -->
-        <!-- <view class="pageTitle flex_r flex_ac flex_jc">签到</view> -->
-        <!-- 页面标题-end -->
         <!-- 用户信息 -->
         <view class="userinfo flex_r flex_ac">
             <image class="user_img" :src="userinfo.head_pic" mode=""></image>
@@ -38,68 +35,27 @@
         <!-- 签到信息-end -->
         
         <!-- 精品推荐 -->
-        <view class="Boutique" v-if="goods.length">
-            <view class="bou_head flex_r flex_ac flex_jc">
-                <image class="bou_img" src="/static/sgin/left.png" mode=""></image>
-                <view class="bou_title">精品推荐</view>
-                <image class="bou_img" src="/static/sgin/right.png" mode=""></image>
-            </view>
-            <view class="bou_con flex_r flex_ac flex_wrap">
-                <view class="bou_list" v-for="(item,index) in goods" :key="index" @tap="openConversion(item.id)">
-                    <image class="bou_l_img" :src="item.original_img" mode=""></image>
-                    <view class="bou_l_con">
-                        <view class="bou_l_name ellipsis">{{item.goods_name}}</view>
-                        <view class="bou_l_msg">{{item.give_cha_bao}}茶宝</view>
-                    </view>
+        <view class="bou_head flex_r flex_ac flex_jc">
+            <image class="bou_img" src="/static/sgin/left.png" mode=""></image>
+            <view class="bou_title">精品推荐</view>
+            <image class="bou_img" src="/static/sgin/right.png" mode=""></image>
+        </view>
+        <view class="product-list">
+            <view class="product" v-for="(i, s) in goods" :key="s" @click="NavToGoodsDetail(i.id,i.type)">
+                <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>
+                <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>
-        <view class='fz_w_text mar_b20 mar_t20'>让数字经济赋能美好生活!</view>
         <!-- 精品推荐-end -->
-
-        <!-- 兑换弹窗 -->
-        <uni-popup type="center" ref="conversion">
-            <view class="const_con">
-                <image class="closePopup" src="/static/sgin/f_close.png" mode="" @tap="closePopup"></image>
-                <view class="const_head flex_r flex_ac flex_jc">请选择兑换方式</view>
-                <view class="const_info">
-                    <view class="frist_info flex_r flex_wrap">
-                        <view class="frist_list flex_c mar_b30" v-for="(item,index) in way_list" :key="index" @tap="setCurrent(index)">
-                            <view class="flex_r flex_ac">
-                                <image class="frist_img" :src="currrent == index ? '/static/sgin/xuanzhong_icon.png' : '/static/sgin/weixuanzhong_icon.png'" mode=""></image>
-                                <view class="frist_text">{{item.name}}</view>
-                            </view>
-                            <view class="surplus">剩余({{item.Integral}}积分)</view>
-                        </view>
-                    </view>
-                    <view class="hint" v-if="isShow">积分不足请用余额或现金支付</view>
-                    <view class="pay_way flex_r flex_ac flex_wrap mar_t30" v-if="isShow">
-                        <view class="frist_list flex_c">
-                            <view class="flex_r flex_ac" @tap="setPayWay(0)">
-                                <image class="frist_img" :src="pay_way == 0 ? '/static/sgin/xuanzhong_icon.png' : '/static/sgin/weixuanzhong_icon.png'" mode=""></image>
-                                <view class="frist_text">余额</view>
-                            </view>
-                        </view>
-                        <view class="frist_list flex_c">
-                            <view class="flex_r flex_ac" @tap="setPayWay(1)">
-                                <image class="frist_img" :src="pay_way == 1 ? '/static/sgin/xuanzhong_icon.png' : '/static/sgin/weixuanzhong_icon.png'" mode=""></image>
-                                <view class="frist_text">现金</view>
-                            </view>
-                        </view>
-                    </view>
-                    <checkbox-group class="flex_r flex_ac flex_jc" @change="checkboxChange">
-                        <label class="option_box mar_t30">
-                            <checkbox value="1" :checked="checked" color="#2DB389" style="transform:scale(0.7)" /> 我已阅读同意<text @tap.stop="getProPage">《购买协议》</text>
-                        </label>
-                    </checkbox-group>
-                    <view class="conversion flex_r flex_ac flex_jc" @tap="confimConver">确认兑换</view>
-                </view>
-            </view>
-        </uni-popup>
-        <!-- 兑换弹窗-end -->
-        <!-- 授权 -->
-        <!-- <authorize-module v-if="showAuth" :shopInfo="shopInfo" @authSuccess="onAuthSuccess" @onGotUserInfo="onGotUserInfo"></authorize-module> -->
-        <!-- 授权-end -->
     </view>
 </template>
 <script>
@@ -107,13 +63,13 @@ var tim
 let page = 1;
 let app = getApp();
 var appEv = app.$vm.$options;
-import uniPopup from '@/components/uni-popup/uni-popup.vue'
-// import authorizeModule from '@/components/authorize-module/index'
+import uniPopup from '@/components/uni-popup/uni-popup'
+import goodsLista from "@/components/goodsLista"
 import { get, post, u_post } from "@/request/api.js";
 export default {
     components: { 
         uniPopup,
-        // authorizeModule
+        goodsLista,
     },
     data() {
         return {
@@ -128,7 +84,6 @@ export default {
             pay_way: 0, //选中的支付方式
             isShow: false, // 是否显示现金支付
             goodsId: '', // 选中的商品Id
-            // showAuth: false, //是否显示授权弹窗
             shopInfo: {}, // 商户信息
             userinfo:undefined, //用户信息
             todaySign:0, //今日签到数
@@ -141,7 +96,6 @@ export default {
         this.userinfo = uni.getStorageSync("userinfo")
         
         this.loadData()
-
         this.goodsDay()
     },
     onHide: function() {
@@ -160,21 +114,10 @@ export default {
                 }
             })
         },
-        //授权并登录
-        // onAuthSuccess: function() {
-        //     var that = this;
-        //     uni.showLoading({ mask: true })
-        //     appEv.setData((res) => {
-        //         uni.hideLoading()
-        //         that.loadData()
-        //         that.showAuth = false
-        //     });
-        // },
         // 距可以签到倒计时
         setTime() {
             var date;
             let timer = this.nextSign
-            console.log(timer,'timer');
             tim = setInterval(() => {
                 if (timer >= 1) {
                     timer--
@@ -203,18 +146,17 @@ export default {
             })
         },
 
-        // 获取精品推荐
-        goodsDay: function() {
+        // 获取今日值得买
+        goodsDay() {
             let that = this;
             let data = {
                 page: page,
-                type: 3
+                type: 4
             }
             post("goods/goodsList", data).then(res => {
-                console.log(page);
                 if (res.code === 0) {
                     let obj = res.data.data
-                    if(page <= 1) that.goods = []
+                    if(page == 1) that.goods = []
                     if (obj.length > 0) {
                         obj.forEach(e => {
                             that.goods.push(e)
@@ -239,111 +181,18 @@ export default {
                 }
             })
         },
-        // 获取兑换方式
-        integralMethodChange: function() {
-            let that = this;
-            u_post("ShuZiTeaIntegral/integral/integralMethodChange").then(res => {
-                if (res.status == 200) {
-                    that.way_list = res.data
-                }
-            })
-        },
-        // 更改方式
-        setCurrent: function(e) {
-            this.currrent = e;
-            this.pay_way = '';
-            this.isShow = false;
-        },
-        // 更改支付方式
-        setPayWay: function(e) {
-            this.pay_way = e;
-        },
-        // 确认兑换
-        confimConver: function() {
-            let that = this;
-            let isShow = this.isShow;
-            let pay_way = this.pay_way;
-            let checked = this.checked;
-            let currrent = this.currrent;
-            if (currrent === '') {
-                appEv.errTips('请选择兑换方式')
-                return false;
-            }
-            if (isShow && pay_way === '') {
-                appEv.errTips('请选择支付方式')
-                return false;
-            }
-            if (!checked) {
-                appEv.errTips('请阅读并同意购买协议')
-                return false;
-            }
-            let data = {
-                goodsId: this.goodsId,
-                xyType: 1,
-                integralType: this.way_list[this.currrent].type,
-                count: 1
-            }
-            if (isShow) {
-                data.jeType = this.pay_way == 0 ? 4 : 5
-            } else {
-                data.jeType = 3
-            }
-            u_post("ShuZiTeaIntegral/integral/integralMethodChange",data).then(res => {
-                if (res.status == 200) {
-                    appEv.errTips(res.msg)
-                    let goodsId = that.goodsId;
-                    let count = 1;
-                    let goodsType = 5;
-                    let ojsType = 1;
-                    let payType = !isShow ? 3 : isShow && pay_way == 0 ? 4 : isShow && pay_way == 1 ? 5 : isShow && that.way_list[that.currrent].Integral == 0 ? 6 : ''
-                    setTimeout(() => {
-                        uni.navigateTo({
-                            url: '/pages/to-pay-list/index?goodsId=' + goodsId + "&count=" + count + '&goodsType=' + goodsType + '&ojsType=' + ojsType + '&payType=' + payType
-                        })
-                    }, 800)
-                } else {
-                    appEv.errTips(res.msg)
-                    that.isShow = true;
-                }
-            })
-        },
-        // 更改协议选中情况
-        checkboxChange: function(e) {
-            let index = e.detail.value.indexOf('1');
-            if (index != -1) {
-                this.checked = true
-            } else {
-                this.checked = false
-            }
-        },
-        // 点击立即兑换打开弹窗
-        openConversion: function(id) {
-            uni.navigateTo({
-                url: '/pages/product/p_details?id=' + id + '&type=' + 3
-            })
-            // this.goodsId = e
-            // this.$refs.conversion.open()
-        },
-        // 关闭立即兑换弹窗
-        closePopup: function() {
-            this.$refs.conversion.close()
-        },
-        // 跳转到积分明细列表
-        NavToSignList: function() {
-            uni.navigateTo({
-                url: '/pages/sign-list/index'
-            })
+        // 跳转到商品详情页
+        NavToGoodsDetail(id, type) {
+            this.goto("/pages/product/p_details", { id, type });
         },
-        // 跳转到积分列表页面
-        goToIntegralList: function() {
-            uni.navigateTo({
-                url: '/pages/integral-list/index'
-            })
-        },
-        getProPage: function() {
-            uni.navigateTo({
-                url: '/pages/protocol/index?type=' + 4
-            })
+    },
+    //页面上拉触底事件的处理函数
+    onReachBottom() {
+        if (page != -1) {
+            setTimeout(() => {
+                ++page;
+                this.goodsDay();
+            }, 500);
         }
     }
 }
@@ -364,15 +213,6 @@ page {
 
 // 页面配置-end
 
-// 页面标题
-.pageTitle {
-    font-size: 28rpx;
-    color: #fff;
-    height: 64rpx;
-}
-
-// 页面标题-end
-
 // 用户信息
 .userinfo {
     width: 100%;
@@ -610,194 +450,97 @@ page {
 
 // 积分兑好礼-end
 
-// 精品推荐
-.bou_img {
-    width: 89rpx;
-    height: 30rpx;
-}
 
-.bou_head {
+// 精彩推荐
+.bou_head{
     width: 100%;
     height: 114rpx;
-}
-
-.bou_con {
-    width: 100%;
-    overflow: hidden;
-}
-
-.Boutique {
-    width: 100%;
-    overflow: hidden;
     margin-top: 50rpx;
+    .bou_img{
+        width: 89rpx;
+        height: 30rpx;
+    }
+    .bou_title{
+        font-size: 36rpx;
+        color:#121212;
+        font-family: "SourceHanSansSC-Bold";
+        font-weight: bold;
+        margin: 0 36rpx;
+    }
 }
 
-.bou_list:nth-child(2n) {
-    margin-right: 0;
-}
-
-.bou_l_info {
-    width: 100%;
-    overflow: hidden;
-}
+.product-list {
+//   padding: 0 20rpx;
+  display: flex;
+  width: 100%;
+  flex-wrap: wrap;
+  flex-direction: row;
+  .product {
+    // width: 50%;
+    // padding: 20rpx 10rpx;
+    // display: flex;
+    // flex-direction: column;
+
+    margin-bottom: 20rpx;
+    width: 48.5%;
+    padding-bottom: 6px;
+    // border: 1px solid #eee;
+    border-radius: 5px;
+    box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.08);
+    &:nth-child(2n){
+        margin-left: 3%;
+    }
+  }
 
-.bou_l_img {
+  .product-image {
+    border-radius: 10rpx 10rpx 0 0;
     width: 100%;
-    height: 238rpx;
-    display: block;
-}
-
-.bou_l_price text {
-    font-size: 24rpx;
-    color: #F15C21;
-    line-height: 1;
-}
+    height: 260rpx;
+    object-fit: cover;
+  }
 
-.bou_l_name {
+  .product-title {
     width: 100%;
     overflow: hidden;
+    line-height: 1.5;
     font-size: 28rpx;
     color: #121212;
-}
+  }
 
-.bou_l_con {
-    width: 100%;
-    overflow: hidden;
-    padding: 20rpx;
-    box-sizing: border-box;
-}
-
-.bou_l_msg {
-    width: 100%;
-    overflow: hidden;
-    font-size: 22rpx;
-    color: #F15C21;
-    margin-top: 10rpx;
-}
-
-.bou_l_cost {
-    font-size: 24rpx;
-    color: #CCCCCC;
-    text-decoration: line-through;
-    line-height: 1;
-    margin-left: 11rpx;
-}
-
-.bou_l_price {
-    font-size: 32rpx;
-    color: #F15C21;
-    font-size: "SourceHanSansSC-Bold";
-    font-weight: bold;
-    line-height: 1;
-}
-
-.bou_title {
-    font-size: 36rpx;
+  .product-price {
     color: #121212;
-    font-family: "SourceHanSansSC-Bold";
-    font-weight: bold;
-    margin: 0 49rpx;
-}
-
-.bou_list {
-    width: calc((100% - 10rpx) / 2);
-    margin-right: 10rpx;
-    margin-bottom: 30rpx;
-    background: #fff;
-    border-radius: 6rpx;
-    overflow: hidden;
-}
-
-// 精品推荐-end
-
-
-// 兑换弹窗
-.option_box {
-    font-size: 26rpx;
-}
-
-.option_box text {
-    color: #2DB389;
-}
-
-.hint {
-    font-size: 20rpx;
-    color: #D54912;
-}
-
-.pay_way {
-    width: 100%;
-    overflow: hidden;
-}
-
-.frist_list {
-    width: 50%;
-    overflow: hidden;
-}
-
-.surplus {
-    font-size: 22rpx;
-    color: #A8A8A8;
-}
-
-.frist_text {
     font-size: 28rpx;
-    color: #302F2F;
-}
+    position: relative;
+  }
 
-.frist_img {
-    width: 35rpx;
-    height: 35rpx;
-    margin-right: 32rpx;
-}
+  .product-price-original {
+    color: #18bb88;
+    font-size: 32rpx;
+  }
 
-.frist_info {
-    width: 100%;
-    overflow: hidden;
-    align-items: initial;
-}
+  .product-price-favour {
+    color: #888888;
+    text-decoration: line-through;
+    margin-left: 10upx;
+  }
 
-.closePopup {
-    width: 42rpx;
-    height: 42rpx;
+  .product-tip {
     position: absolute;
-    right: 0;
-    top: -65rpx;
-}
-
-.const_con {
-    width: 689rpx;
-    border-radius: 10rpx;
-    background: #fff;
-    position: relative;
-}
-
-.const_info {
-    width: 100%;
-    overflow: hidden;
-    padding: 30rpx 50rpx;
-    box-sizing: border-box;
-}
-
-.const_head {
-    width: 100%;
-    height: 97rpx;
-    border-bottom: 3rpx solid rgba(0, 0, 0, .15);
-    font-size: 40rpx;
-    color: #1BBD89;
-    font-family: "SourceHanSansCN-Medium";
-}
+    right: 10upx;
+    background-color: #ff3333;
+    color: #ffffff;
+    padding: 0 10upx;
+    border-radius: 5upx;
+  }
+
+  .product-unit {
+    font-size: 24rpx;
+    color: #18bb88;
+  }
 
-.conversion {
-    width: 269rpx;
-    height: 68rpx;
-    background: #1BBE8A;
-    font-family: "SourceHanSansCN-Medium";
-    color: #fff;
-    font-size: 32rpx;
-    border-radius: 34rpx;
-    margin: 40rpx auto 0;
+  .product-txt {
+    font-size: 22rpx;
+    color: #787878;
+  }
 }
-
-// 兑换弹窗-end
 </style>