From 7b9479d56cc48801f6703cd4d4d95f3167c1a8fe Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Fri, 17 Jul 2020 17:34:42 +0800 Subject: [PATCH] coupon --- common/api/shop.js | 35 ++++-- components/mine/coupon/index.vue | 35 +++--- components/shop/list/index.vue | 78 ++++++++----- components/shop/recommend/index.vue | 6 +- components/shop/youhq/index.vue | 175 ++++++++++++++++++---------- components/shop/youhq/item.vue | 83 ------------- pageE/mine/MemberServe.vue | 15 ++- pageE/mine/MemberServeCoupon.vue | 69 +++++------ pageE/tool/MineCoupon.vue | 49 ++++---- pages/shop/index.vue | 54 +++++---- 10 files changed, 308 insertions(+), 291 deletions(-) delete mode 100644 components/shop/youhq/item.vue diff --git a/common/api/shop.js b/common/api/shop.js index 98611b8..34f4a3a 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -78,9 +78,10 @@ export default { return vm.$u.post('Goods/getGoodsClassifyList'); }, // 商品推荐 - getGoodsRecommend({page}){ + getGoodsRecommend({page, gc_id}){ return vm.$u.post('Goods/getGoodsRecommend', { - page: page + page: page, + gc_id: gc_id, }); }, // 购物车商品列表 @@ -188,14 +189,25 @@ export default { }); }, // 拼团列表 - getPinTuanList() { - return vm.$u.post('Specialci/pintuanList'); + getPinTuanList({ page, gc_id }) { + return vm.$u.post('Specialci/pintuanList', { + page: page, + gc_id: gc_id, + }); }, // 拼团商品详情 getPinTuanDetails({ pintuan_id }) { return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id }); }, - // 优惠券列表 + // pintuanPush + getPinTuanPush() { + return vm.$u.post('Specialci/pintuanPush'); + }, + // 商品分类(拼团分类) + getGoodsClass() { + return vm.$u.post('Specialci/goodsClass'); + }, + // 优惠券列表(要兑换的) getCouponList({ page, store_id, type, gc_id }) { return vm.$u.post('Coupon/CouponList', { page: page, @@ -205,9 +217,18 @@ export default { }); }, // 领取优惠券 - getCoupon({ vouchertemplate_id }) { + getCoupon({ id }) { return vm.$u.post('Coupon/getCoupon', { - vouchertemplate_id: vouchertemplate_id, + vouchertemplate_id: id, + }); + }, + // 我的优惠券(已有的) + getMemberCouponList({ store_id, gc_id, type, status }) { + return vm.$u.post('Coupon/getMemberCouponList', { + store_id: store_id, + gc_id: gc_id, + type: type, + status: status, }); } } diff --git a/components/mine/coupon/index.vue b/components/mine/coupon/index.vue index 3448072..01f2aa5 100644 --- a/components/mine/coupon/index.vue +++ b/components/mine/coupon/index.vue @@ -1,24 +1,24 @@ \ No newline at end of file diff --git a/components/shop/youhq/item.vue b/components/shop/youhq/item.vue deleted file mode 100644 index f9a6923..0000000 --- a/components/shop/youhq/item.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - \ No newline at end of file diff --git a/pageE/mine/MemberServe.vue b/pageE/mine/MemberServe.vue index af082c6..39a3303 100644 --- a/pageE/mine/MemberServe.vue +++ b/pageE/mine/MemberServe.vue @@ -37,11 +37,11 @@ - {{ item.pl_desc }} + {{ item.pl_desc }} {{ item.pl_addtime }} - - {{ item.pl_addtime > 0 ? item.pl_addtime : '+' + 10.00 }} + + {{ Number(item.pl_points) > 0 ? '+' + item.pl_points : item.pl_points }} @@ -75,6 +75,14 @@ export default { components: { CouponView }, + onLoad(option) { + if(option.current) this.current = option.current; + }, + watch: { + current(value) { + this.swiperCurrent = value; + } + }, onShow() { this.getMemberPointsStat(); this.getPointslogList(); @@ -186,6 +194,7 @@ export default { justify-content: space-between; .item-left { .item-title { + width: 450rpx; font-size: 32rpx; color: rgba(51,51,51,1); margin-bottom: 23rpx; diff --git a/pageE/mine/MemberServeCoupon.vue b/pageE/mine/MemberServeCoupon.vue index 796aad4..4ca97f4 100644 --- a/pageE/mine/MemberServeCoupon.vue +++ b/pageE/mine/MemberServeCoupon.vue @@ -1,6 +1,6 @@