From e224cffc1c5a8d09c6b9c75e5f66491fcb2632a7 Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Thu, 13 Aug 2020 17:05:02 +0800 Subject: [PATCH] coupon goods 8.13 --- common/api/user.js | 8 ++ components/mine/order-item/index.vue | 6 +- pageC/merchant/index.vue | 5 + pageE/order/Details.vue | 7 + pageE/tool/MineCoupon.vue | 25 ++-- pageE/useCoupon/index.vue | 193 +++++++++++++++++++++++++++ pages.json | 13 ++ 7 files changed, 245 insertions(+), 12 deletions(-) create mode 100644 pageE/useCoupon/index.vue diff --git a/common/api/user.js b/common/api/user.js index 5fc0775..3d62a31 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -411,6 +411,14 @@ export default { attentionMemberList({ page = 1 } = {}) { return vm.$u.post('member/attentionMemberList', { page: page }); }, + // 可用优惠券商品 + couponGoodsList({ voucher_id, page, order }) { + return vm.$u.post('Coupon/couponGoodsList', { + page: page, + voucher_id: voucher_id, + order: order, + }); + }, } } } \ No newline at end of file diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue index 59f5ab4..be5d173 100644 --- a/components/mine/order-item/index.vue +++ b/components/mine/order-item/index.vue @@ -24,7 +24,7 @@ - + 申请退款 查看物流 @@ -56,6 +56,7 @@ export default { methods: { viewState() { let state; + // console.log(this.order.view_type); switch (this.order.view_type) { case 1: state = '待支付'; @@ -84,6 +85,9 @@ export default { case 10: state = '已取消'; break; + case 11: + state = '已拒绝'; + break; default: break; } diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue index e419e37..49a4a9f 100644 --- a/pageC/merchant/index.vue +++ b/pageC/merchant/index.vue @@ -111,6 +111,11 @@ export default { if(e.index == 0) this.$u.route('/pageC/cart/index'); // if(e.index == 0) this.show = true; }, + onNavigationBarSearchInputClicked() { + this.$u.route('pageB/search/index', { + type: 2 + }); + }, methods: { customers(){ console.log(this.$store.state.hasLogin) diff --git a/pageE/order/Details.vue b/pageE/order/Details.vue index e3bb7b9..2fc8bd3 100644 --- a/pageE/order/Details.vue +++ b/pageE/order/Details.vue @@ -125,6 +125,10 @@ export default { text: '已取消', image: '../static/mine/33.png', }, + '10': { + text: '已拒绝', + image: '../static/mine/34.png', + }, }, orderInfo: {}, oid: '', @@ -176,6 +180,9 @@ export default { case 10: state = '9'; break; + case 11: + state = '10'; + break; default: break; } diff --git a/pageE/tool/MineCoupon.vue b/pageE/tool/MineCoupon.vue index bda33d4..37bb627 100644 --- a/pageE/tool/MineCoupon.vue +++ b/pageE/tool/MineCoupon.vue @@ -69,17 +69,20 @@ export default { }) }, useCoupon(coupon) { - // console.log(coupon); - if(coupon.type == 1) { - this.$u.route({ - type: 'switchTab', - url: 'pages/shop/index', - }) - } else if(coupon.type == 2) { - this.$u.route('pageC/merchant/index', { - id: coupon.voucher_store_id, - }); - } + console.log(coupon); + // if(coupon.type == 1) { + // this.$u.route({ + // type: 'switchTab', + // url: 'pages/shop/index', + // }) + // } else if(coupon.type == 2) { + // this.$u.route('pageC/merchant/index', { + // id: coupon.voucher_store_id, + // }); + // } + this.$u.route('pageE/useCoupon/index', { + cid: coupon.voucher_id, + }); }, setViewHeight() { const res = uni.getSystemInfoSync(); diff --git a/pageE/useCoupon/index.vue b/pageE/useCoupon/index.vue new file mode 100644 index 0000000..ec59af4 --- /dev/null +++ b/pageE/useCoupon/index.vue @@ -0,0 +1,193 @@ + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 9c9737c..908c73c 100644 --- a/pages.json +++ b/pages.json @@ -566,6 +566,19 @@ } } }, + { + "path": "useCoupon/index", + "style": { + "navigationBarTitleText": "优惠券商品", + "app-plus": { + "titleSize": "36px", + "titleNView": { + "titleColor": "#333333", + "backgroundColor": "#FFFFFF" + } + } + } + }, { "path": "more/MineHelp", "style": {