From 7d226e1a9cb08350483ed1ac304d722863466635 Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Fri, 9 Dec 2022 18:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E6=88=B7=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/shop/shop.ttml | 121 ++++++++++++++++++++++++-- pages/coupon/detail/index.js | 5 ++ pages/index/searchbar/detail/index.js | 7 +- pages/order/detail/index.js | 2 +- 4 files changed, 125 insertions(+), 10 deletions(-) diff --git a/components/shop/shop.ttml b/components/shop/shop.ttml index 21b5b56..2cbfd67 100644 --- a/components/shop/shop.ttml +++ b/components/shop/shop.ttml @@ -13,15 +13,19 @@ + - {{item.merchantVoList.length+'家门店适用'}} - - - + + {{item.merchantVoList.length+'家门店适用'}} + + + + - + + + + + + + + + {{item.addr}} + + + + + + + + {{item.addr}} + + + + + + + + {{item.addr}} + + + + + + + + {{item.merchantVoList.length+'家门店适用,展开全部'}} + + + + \ No newline at end of file diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index cf73fad..8cdac91 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -601,6 +601,7 @@ Page({ }).then(res => { const keys = Object.keys(res.data) const mallList = [] + let i = 0 keys.forEach(item => { const arr = item.split('|') const obj = { @@ -609,7 +610,11 @@ Page({ merchantVoList: res.data[item], expand: false } + if (i == 0) { + obj.expand = true + } mallList.push(obj) + i++ }) this.setData({ mallList: mallList diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index bacca6a..803597c 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -54,7 +54,7 @@ Page({ id: options.id }); that.getList(options.id, options.mallTenantId); - that.getCouponList(options.id); + that.getCouponList(options.id, options.mallTenantId); this.setData({ currentTab: 0 }) @@ -186,14 +186,15 @@ Page({ * 获取商户活动信息 券类型(1.满减券,2.代金券,3.团购券,4.礼品券,5.停车券,6.多商户券,8.砍价券,9.团购券,50.积分券,51.积分停车券 100.消费卡) * 投放频道:(1.列表, 2.限时抢购, 3. banner图 4. 游戏 5.卡频道 6.砍价频道 7.拼团频道 8专题) */ - getCouponList: function (id) { + getCouponList: function (id, mallTenantId) { let that = this; let data; data = { status: 0, - // merchantId: id, + merchantId: id, pageNum: that.data.page, pageSize: 15, + mallTenantId: mallTenantId } Http.post({ url: config.api.listByMerchant, diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index 7a3ea4e..b62fda4 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -168,7 +168,7 @@ Page({ tenantId: arr[0], mallName: arr[1], merchantVoList: res.data[item], - expand: false + expand: true } mallList.push(obj) })