From 252e84ab8fdf280772f549e66a9e76797299f9be Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Fri, 9 Dec 2022 17:36:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E7=94=A8=E9=97=A8=E5=BA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/itemImg/merchantImgCover.png | Bin 0 -> 8454 bytes components/shop/shop.js | 85 ++++++++++- components/shop/shop.less | 211 ++++++++++++++++++++++++++ components/shop/shop.ttml | 58 ++++++- components/shop/shop.ttss | 179 +++++++++++++++++++++- components/store/index.js | 47 +++--- components/store/index.ttml | 16 +- pages/coupon/detail/index.js | 11 +- pages/coupon/detail/index.ttml | 2 +- pages/couponorder/detail/index.js | 40 +++++ pages/couponorder/detail/index.json | 15 +- pages/couponorder/detail/index.ttml | 28 ++-- pages/index/searchbar/detail/index.js | 77 +++++----- pages/order/detail/index.js | 44 +++++- pages/order/detail/index.json | 15 +- pages/order/detail/index.ttml | 2 +- project.config.json | 50 +++--- 17 files changed, 750 insertions(+), 130 deletions(-) create mode 100644 assets/itemImg/merchantImgCover.png create mode 100644 components/shop/shop.less diff --git a/assets/itemImg/merchantImgCover.png b/assets/itemImg/merchantImgCover.png new file mode 100644 index 0000000000000000000000000000000000000000..ac6476dc1e984d77cb0552b75b7ae5c405d52301 GIT binary patch literal 8454 zcmV+hA^F~kP)PyA07*naRCr$PT?>#LM|uAK?%BJQ?@n*ovJ}~}FxU~6W%~#TaqK7wAv^-1f)T+a z0Sbr`9tH_)3+GW=A#wa55;iuJ0|Y}L0UJXwgh#@|#Br23oNY;tj4?>E6bad~BujT^ z?cGlIpPD({-tOJr?aXe^OwV3Vm8w*=-T(jh*Zo~jPyY{sdlEr_?|Qw&@ZkcU{#gOK z%R`Unp*$kt6(ocw!Ad}LS0v?vMnO_T`wD(Vq1df3?E4U-K2ATgf}SN6T7S2SB+E65 zg#g8B?HW%(AS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` z2m%%FDcU?x&41Re4x$j)y`-VB}hn; zjFUaI1CHx!IRY_~FSI(6#0e6T#+>yl8^vyCk0XZHRI6!wpr8V+Y2@;YdNMm|%wKC9woDkQrS5iQ`Y1O3jnx2y#J?>MNJa;F#oE zNJqAzjECtMn~^V8JA>mO7qA#z;&zjEP|Tojuxse9!?bDJ$qcl&tTI4lc( zJpGPsmLN#q;0cYnB}jNS35xja>0S&^_ht#A(>)CWz8JzeBhR#2yv7Dxb4`%y*(9i$ z*fnPnGa4dx&?rVv9%-c}pl#T71VO4q2})F#3ya(>d`8PGxD78>j?g=I9?QrA z<7zvKAmM9Q2?D+S3qk%u<7hd7(<8v%Q49?nr4n=}!PIdCsqQAFbsiQTUx12U&`A?! z-B=3Z7>>?6My30F>ufV%P{$IaN|Yc5e&6l|Zbvb&TIxO{dPi~As$*%#h#MY7Q*j+n zkSbAv=*1h>%tukqbBFn+>!NXk;P72m$FX_mvsp&@wP<}y-DV9z>i+lziM8i+&vl=N zBd(d?bM48I6SldcN3_1JX0wtY)m`O|{sN8+&xPmBhm^7{Bs;CMQVPEREEe^gpbZ0+ zP8(j-@yu$1)a@#P3yT`=gU7wl!ix%EN3|2$hfhP0J%f332}x=m96=f&8~S^BG<?*>q6d|Y(Q$)JWHCNyj$|#SPF*10PN_)%c z8jx>ojv#H$Uzlt7$;XT6;VulRZgkD*%FGo%a48=>If`C6f?*oP+2@rz{hp%D>1*2E z5u_f`h?E9hBLaYSfso|^Uge{dHFgBP|PSO5S307*qoM6N<$f+0ZaRsaA1 literal 0 HcmV?d00001 diff --git a/components/shop/shop.js b/components/shop/shop.js index 0b8744e..722c487 100644 --- a/components/shop/shop.js +++ b/components/shop/shop.js @@ -1,11 +1,92 @@ Component({ + properties: { + mallList: { + value: [], + type: Array + } + }, + data: { + list: [], // 广场、商户列表 + mallNum: 0, // 适用商户数量 + }, + + methods: { + // 跳转详情页 + gotoDetail(e) { + console.log(e); + tt.navigateTo({ + url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}&mallTenantId=${e.currentTarget.dataset.tenantid}` + }) + }, + + // 跳转资质页面 + goCertification(e) { + tt.navigateTo({ + url: `/pages/shopCertification/shopCertification?id=${e.currentTarget.dataset.id}` + }) + }, + //跳转地图页面 + goMap(e) { + let { + latitude, + longitude + } = e.currentTarget.dataset.item + console.log(latitude, longitude); + tt.openLocation({ + latitude: Number(latitude), + longitude: Number(longitude), + scale: 18, + success() { + console.log("打开地图成功"); + }, + fail(err) { + console.log("打开地图失败:", err.errMsg); + }, + }); + }, + + goFitShop() { + const arr = [] + this.data.list.forEach(item => { + item.merchantVoList.forEach(el => { + arr.push(el) + }) + }) + tt.navigateTo({ + url: `/pages/fitShop/fitShop?list=${JSON.stringify(arr)}`, + success: (res) => {}, + fail: (res) => {}, + }); + }, + + expandList(e) { + const index = e.currentTarget.dataset.index + const arr = this.data.list + arr[index].expand = !arr[index].expand + this.setData({ + list: arr + }) + } }, - properties: { + ready() { + this.setData({ + list: JSON.parse(JSON.stringify(this.properties.mallList)) + }) + + console.log(this.data.mallList, 'mallList'); + let mallNum = 0 + this.data.list.forEach(item => { + mallNum += item.merchantVoList.length + }) + this.setData({ + mallNum: mallNum + }) }, - methods: { + + created() { } }) \ No newline at end of file diff --git a/components/shop/shop.less b/components/shop/shop.less new file mode 100644 index 0000000..8d3089f --- /dev/null +++ b/components/shop/shop.less @@ -0,0 +1,211 @@ +.components { + display: block; + height: auto; + margin-top: 15rpx; + background-color: #fff; + + .header { + height: 70rpx; + + .applyshop { + float: left; + font-size: 30rpx; + line-height: 70rpx; + text-indent: 1em; + color: #333; + background: #fff; + font-weight: bold; + } + + .goShop { + float: right; + font-size: 22rpx; + height: 70rpx; + line-height: 70rpx; + text-indent: 1em; + color: #a6a6a6; + background: #fff; + font-weight: bold; + margin-right: 25rpx; + } + + .rightArrow { + float: right; + display: block; + width: 14rpx; + margin: 24rpx 30rpx 0 10rpx; + } + } + + .body { + border-bottom: 10rpx solid #f4f5f9; + + .mall { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 15rpx; + margin-bottom: 15rpx; + padding-left: 25rpx; + padding-right: 65rpx; + + .img { + width: 120rpx; + height: 120rpx; + } + + .mallItem { + display: flex; + justify-content: space-between; + align-items: center; + + .title { + font-size: 35rpx; + } + } + } + + .goExpand { + text-align: center; + font-size: 25rpx; + color: #a6a6a6; + + .rightArrowDown { + position: relative; + left: 50%; + transform: translate(-50%); + display: block; + width: 14rpx; + transform: rotate(90deg); + } + + .rightArrowUp { + position: relative; + left: 50%; + transform: translate(-50%); + display: block; + width: 14rpx; + transform: rotate(-90deg); + } + } + + .shop { + .posi { + /* position: relative; */ + width: 100%; + background: #FFF; + margin-bottom: 20rpx; + + .posi_logo { + position: relative; + width: 92%; + display: flex; + padding: 20rpx 0; + background: #fff; + margin: 0 auto; + + view { + &:nth-child(1) { + image { + display: block; + width: 100rpx; + height: 100rpx; + border-radius: 16rpx; + margin-right: 16rpx; + border: 1px solid #e5e5e5; + } + } + } + + .name { + font-size: 32rpx; + color: #333; + letter-spacing: 0; + width: 500rpx; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + } + + .shopVoList { + white-space: nowrap !important; + overflow-y: scroll; + height: 90rpx !important; + width: 360rpx; + font-size: 16px; + color: #333; + letter-spacing: 0; + + text { + font-size: 20rpx !important; + color: #b8b8b8 !important; + } + } + + .telBox { + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; + + .telImg { + width: 50rpx; + height: 50rpx; + margin-top: 20rpx; + } + + .telText { + text-align: center; + color: #b8b8b8 !important; + font-size: 20rpx; + } + } + + .certificationBox { + position: absolute; + right: 80rpx; + top: 0; + bottom: 0; + margin: auto; + + .certificationImg { + width: 50rpx; + height: 50rpx; + margin-top: 20rpx; + } + + .telText { + text-align: center; + color: #b8b8b8 !important; + font-size: 20rpx; + } + } + } + + .siteBox { + overflow: hidden; + width: 92%; + margin: 0 auto 1rpx auto; + padding-bottom: 10rpx; + + .siteText { + width: 90%; + float: left; + font-size: 24rpx; + color: #333; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .siteImg { + float: right; + width: 40rpx; + height: 40rpx; + } + } + } + } + } +} \ No newline at end of file diff --git a/components/shop/shop.ttml b/components/shop/shop.ttml index 5a955a7..21b5b56 100644 --- a/components/shop/shop.ttml +++ b/components/shop/shop.ttml @@ -1 +1,57 @@ -123 \ No newline at end of file + + + 适用门店 + + {{'共'+mallNum+'家门店适用'}} + + + + + + {{item.mallName}} + + + + + {{item.merchantVoList.length+'家门店适用'}} + + + + + + + + + + {{item.addr}} + + + + + + \ No newline at end of file diff --git a/components/shop/shop.ttss b/components/shop/shop.ttss index 1d36417..61ecf76 100644 --- a/components/shop/shop.ttss +++ b/components/shop/shop.ttss @@ -1 +1,178 @@ -/* c:\Users\Holy-Knight-IX\Desktop\Working Space\3.TikTok-MiniPro\ttc\components\shop\shop.ttss */ \ No newline at end of file +.components { + display: block; + height: auto; + margin-top: 15rpx; + background-color: #fff; +} +.components .header { + height: 70rpx; +} +.components .header .applyshop { + float: left; + font-size: 30rpx; + line-height: 70rpx; + text-indent: 1em; + color: #333; + background: #fff; + font-weight: bold; +} +.components .header .goShop { + float: right; + font-size: 22rpx; + height: 70rpx; + line-height: 70rpx; + text-indent: 1em; + color: #a6a6a6; + background: #fff; + font-weight: bold; + margin-right: 25rpx; +} +.components .header .rightArrow { + float: right; + display: block; + width: 14rpx; + margin: 24rpx 30rpx 0 10rpx; +} +.components .body { + border-bottom: 10rpx solid #f4f5f9; +} +.components .body .mall { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 15rpx; + margin-bottom: 15rpx; + padding-left: 25rpx; + padding-right: 65rpx; +} +.components .body .mall .img { + width: 120rpx; + height: 120rpx; +} +.components .body .mall .mallItem { + display: flex; + justify-content: space-between; + align-items: center; +} +.components .body .mall .mallItem .title { + font-size: 35rpx; +} +.components .body .goExpand { + text-align: center; + font-size: 25rpx; + color: #a6a6a6; +} +.components .body .goExpand .rightArrowDown { + position: relative; + left: 50%; + transform: translate(-50%); + display: block; + width: 14rpx; + transform: rotate(90deg); +} +.components .body .goExpand .rightArrowUp { + position: relative; + left: 50%; + transform: translate(-50%); + display: block; + width: 14rpx; + transform: rotate(-90deg); +} +.components .body .shop .posi { + /* position: relative; */ + width: 100%; + background: #FFF; + margin-bottom: 20rpx; +} +.components .body .shop .posi .posi_logo { + position: relative; + width: 92%; + display: flex; + padding: 20rpx 0; + background: #fff; + margin: 0 auto; +} +.components .body .shop .posi .posi_logo view:nth-child(1) image { + display: block; + width: 100rpx; + height: 100rpx; + border-radius: 16rpx; + margin-right: 16rpx; + border: 1px solid #e5e5e5; +} +.components .body .shop .posi .posi_logo .name { + font-size: 32rpx; + color: #333; + letter-spacing: 0; + width: 500rpx; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.components .body .shop .posi .posi_logo .shopVoList { + white-space: nowrap !important; + overflow-y: scroll; + height: 90rpx !important; + width: 360rpx; + font-size: 16px; + color: #333; + letter-spacing: 0; +} +.components .body .shop .posi .posi_logo .shopVoList text { + font-size: 20rpx !important; + color: #b8b8b8 !important; +} +.components .body .shop .posi .posi_logo .telBox { + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; +} +.components .body .shop .posi .posi_logo .telBox .telImg { + width: 50rpx; + height: 50rpx; + margin-top: 20rpx; +} +.components .body .shop .posi .posi_logo .telBox .telText { + text-align: center; + color: #b8b8b8 !important; + font-size: 20rpx; +} +.components .body .shop .posi .posi_logo .certificationBox { + position: absolute; + right: 80rpx; + top: 0; + bottom: 0; + margin: auto; +} +.components .body .shop .posi .posi_logo .certificationBox .certificationImg { + width: 50rpx; + height: 50rpx; + margin-top: 20rpx; +} +.components .body .shop .posi .posi_logo .certificationBox .telText { + text-align: center; + color: #b8b8b8 !important; + font-size: 20rpx; +} +.components .body .shop .posi .siteBox { + overflow: hidden; + width: 92%; + margin: 0 auto 1rpx auto; + padding-bottom: 10rpx; +} +.components .body .shop .posi .siteBox .siteText { + width: 90%; + float: left; + font-size: 24rpx; + color: #333; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +.components .body .shop .posi .siteBox .siteImg { + float: right; + width: 40rpx; + height: 40rpx; +} diff --git a/components/store/index.js b/components/store/index.js index f0043a9..ab7d9cd 100644 --- a/components/store/index.js +++ b/components/store/index.js @@ -15,47 +15,49 @@ Component({ */ data: { teljpgUrl: imgurl.teljpg.url, - showMore:false, + showMore: false, more: "点击查看更多", - hidden:"hidden", + hidden: "hidden", height: "" }, - + /** * 组件的方法列表 */ methods: { /** - * 跳转到门店列表的详情页面 - */ + * 跳转到门店列表的详情页面 + */ gotoDetail(e) { tt.navigateTo({ url: `/pages/index/searchbar/detail/index?id=${e.currentTarget.dataset.id}` }) }, - goCertification(e){ + goCertification(e) { tt.navigateTo({ url: `/pages/shopCertification/shopCertification?id=${e.currentTarget.dataset.id}` }) }, - goFitShop(){ + goFitShop() { tt.navigateTo({ url: `/pages/fitShop/fitShop?list=${JSON.stringify(this.data.merchantVoList)}`, - success: (res) => { - + success: (res) => { + }, fail: (res) => { - + }, }); }, - goMap(e){ - - let {latitude,longitude} = e.currentTarget.dataset.item - console.log(latitude,longitude); + goMap(e) { + let { + latitude, + longitude + } = e.currentTarget.dataset.item + console.log(latitude, longitude); tt.openLocation({ - latitude:Number(latitude), - longitude:Number(longitude), + latitude: Number(latitude), + longitude: Number(longitude), scale: 18, success() { console.log("打开地图成功"); @@ -64,11 +66,10 @@ Component({ console.log("打开地图失败:", err.errMsg); }, }); - }, // 点击查看更多 more: function () { - console.log(this.properties.merchantVoList,"merchantVoList"); + console.log(this.properties.merchantVoList, "merchantVoList"); let that = this; if (that.data.more == '点击查看更多') { this.setData({ @@ -92,17 +93,17 @@ Component({ phoneNumber: e.target.dataset.merchantlinkphone }); }, - + }, - + ready: function () { let merchantVoList = this.properties.merchantVoList; - if (merchantVoList.length>0){ + if (merchantVoList.length > 0) { if (merchantVoList.length <= 4) { this.setData({ height: merchantVoList.length * 140 + 'rpx', showMore: false, - hidden:"hidden" + hidden: "hidden" }) } else if (merchantVoList && merchantVoList.length > 4) { this.setData({ @@ -111,4 +112,4 @@ Component({ } } } -}); +}); \ No newline at end of file diff --git a/components/store/index.ttml b/components/store/index.ttml index 93fe529..0617844 100644 --- a/components/store/index.ttml +++ b/components/store/index.ttml @@ -1,10 +1,9 @@ - 适用门店 - + {{merchantVoList.length+'家店适用'}} - + @@ -22,15 +21,18 @@ - + 电话 - - + + 资质 - + {{merchantVoList[0].addr}} diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 53d39ab..cf73fad 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -96,7 +96,8 @@ Page({ idList: [], showBox: false, //手机号授权框 spuIdObj: {}, - mallTenantId: '' + mallTenantId: '', + mallList: [] }, /** @@ -598,7 +599,6 @@ Page({ couponChannelId: couponChannelId } }).then(res => { - console.log(res.data, 'Merchant') const keys = Object.keys(res.data) const mallList = [] keys.forEach(item => { @@ -606,11 +606,14 @@ Page({ const obj = { tenantId: arr[0], mallName: arr[1], - merchantVoList: res.data[item] + merchantVoList: res.data[item], + expand: false } mallList.push(obj) }) - console.log(mallList, 'mallList'); + this.setData({ + mallList: mallList + }) // if (res.data && res.data.length) { // let merchantVoList = res.data // let idList = [] diff --git a/pages/coupon/detail/index.ttml b/pages/coupon/detail/index.ttml index d262581..f9b47d8 100644 --- a/pages/coupon/detail/index.ttml +++ b/pages/coupon/detail/index.ttml @@ -136,7 +136,7 @@ - + 购买须知 diff --git a/pages/couponorder/detail/index.js b/pages/couponorder/detail/index.js index 5237656..91c9545 100644 --- a/pages/couponorder/detail/index.js +++ b/pages/couponorder/detail/index.js @@ -60,6 +60,46 @@ Page({ } }, + + getCouponMerchant(couponChannelId) { //获取适用门店 + Http.get({ + url: config.api.couponMerchant, + data: { + couponChannelId: couponChannelId + } + }).then(res => { + const keys = Object.keys(res.data) + const mallList = [] + keys.forEach(item => { + const arr = item.split('|') + const obj = { + tenantId: arr[0], + mallName: arr[1], + merchantVoList: res.data[item], + expand: true + } + mallList.push(obj) + }) + this.setData({ + mallList: mallList + }) + // if (res.data && res.data.length) { + // let merchantVoList = res.data + // let idList = [] + // merchantVoList.map(item => { + // idList.push(item.id) + // }) + // this.setData({ + // idList: idList + // }) + // this.getCouponList(idList) //获取推荐列表 + // } + // this.setData({ + // merchantVoList: res.data + // }) + }) + }, + getHtml(couponOrderId) { Http.get({ url: config.api.couponHtmlDetailForPkg, diff --git a/pages/couponorder/detail/index.json b/pages/couponorder/detail/index.json index 33b5282..1cc9c5f 100644 --- a/pages/couponorder/detail/index.json +++ b/pages/couponorder/detail/index.json @@ -1,9 +1,10 @@ { - "navigationBarTitleText": "使用优惠券", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black", - "usingComponents": { - "navbar": "../../../components/navbar/navbar", - "store":"../../../components/store/index" - } + "navigationBarTitleText": "使用优惠券", + "navigationBarBackgroundColor": "#fff", + "navigationBarTextStyle": "black", + "usingComponents": { + "navbar": "../../../components/navbar/navbar", + "store": "../../../components/store/index", + "shop": "../../../components/shop/shop" + } } \ No newline at end of file diff --git a/pages/couponorder/detail/index.ttml b/pages/couponorder/detail/index.ttml index b78959c..039b2d6 100644 --- a/pages/couponorder/detail/index.ttml +++ b/pages/couponorder/detail/index.ttml @@ -1,11 +1,11 @@ - + - + - + {{data.title}} @@ -13,7 +13,7 @@ ¥{{data.couponPrice/100}} ¥{{data.price/100}} - 过期不退款 + 过期不退款 有效期至:{{expiredTime}} 满{{data.usePrice/100}}元可用 @@ -23,7 +23,8 @@ - + @@ -34,24 +35,25 @@ 点一点刷新二维码 二维码在 - {{expiredSeconds}}s - 后失效 + {{expiredSeconds}}s + 后失效 {{showIdFalg?code:codeS}} - + - - - + + + 实付金额: - + {{data.couponPrice/100}} {{createDate}} @@ -65,7 +67,7 @@ 购买须知 {{data.remark}} - + diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index c5e2e36..bacca6a 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -34,7 +34,7 @@ Page({ canvasScale: 1.0, // 画布放大的倍数,因为如果保存的是一倍的分享图片的话,分享图会有点虚。所以保存的时候,canvasScale设置为2.0,wxss 里面的left: 500%;打开注释。就可保存两倍的分享图 }, //关闭海报 - closePoste: function() { + closePoste: function () { this.setData({ showpost: false }) @@ -47,13 +47,13 @@ Page({ /** * 生命周期函数--监听页面加载 */ - onLoad: function(options) { + onLoad: function (options) { let that = this; if (options && options.id) { this.setData({ id: options.id }); - that.getList(options.id); + that.getList(options.id, options.mallTenantId); that.getCouponList(options.id); this.setData({ currentTab: 0 @@ -63,7 +63,7 @@ Page({ /** * 拨打电话 */ - phone: function(e) { + phone: function (e) { let that = this; tt.makePhoneCall({ phoneNumber: e.target.dataset.merchantlinkphone @@ -72,7 +72,7 @@ Page({ /** * 显示分享弹框 */ - showshare: function() { + showshare: function () { this.setData({ isshare: true, }) @@ -80,13 +80,13 @@ Page({ /** * 隐藏分享弹框 */ - hidemodal: function() { + hidemodal: function () { this.setData({ isshare: false, }) }, //滑动切换 - swiperTabView: function(e) { + swiperTabView: function (e) { this.setData({ currentTab: e.detail.current }); @@ -100,32 +100,32 @@ Page({ url: `/pages/canvas/index?merchantId=${this.data.id}` }) }, */ - showPoster: function() { + showPoster: function () { //跳转到海报生成页 let that = this; - Http.get({ - url: config.api.checkUserStatus, - data: { - token: app.globalData.token - } - }).then(res => { - tt.navigateTo({ - url: `/pages/canvas/index?merchantId=${that.data.id}` - }) - }).catch(err => { - console.log(err) - if (err.code == 11004) { - // 用户昵称未授权 - tt.redirectTo({ - url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster` - }) - - } + Http.get({ + url: config.api.checkUserStatus, + data: { + token: app.globalData.token + } + }).then(res => { + tt.navigateTo({ + url: `/pages/canvas/index?merchantId=${that.data.id}` }) - + }).catch(err => { + console.log(err) + if (err.code == 11004) { + // 用户昵称未授权 + tt.redirectTo({ + url: `/pages/getuserinfo/index?couponChannelId=${that.data.id}&fromflag=poster` + }) + + } + }) + }, //点击切换 - clickTab: function(e) { + clickTab: function (e) { if (this.data.currentTab === e.target.dataset.current) { return false; } else { @@ -137,24 +137,25 @@ Page({ /** * 获取商户详情 */ - getList: function(id) { + getList: function (id, mallTenantId) { let that = this; let data; data = { pageNum: that.data.page, pageSize: 15, - id: id + id: id, + mallTenantId: mallTenantId } Http.get({ url: config.api.merchantList, data: data }).then(res => { - if (res.data.list.length==0){ + if (res.data.list.length == 0) { tt.showModal({ title: '提示', content: '此商户已经停用', confirmText: "返回", - showCancel:false, + showCancel: false, success: function (res) { if (res.confirm) { tt.navigateBack({ @@ -185,12 +186,12 @@ 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) { let that = this; let data; data = { status: 0, - merchantId: id, + // merchantId: id, pageNum: that.data.page, pageSize: 15, } @@ -201,7 +202,7 @@ Page({ that.setData({ couponList: res.data.page.list, }) - + // if (res.data && res.data.qrCode){ // that.setData({ // qrCode: res.data.qrCode, @@ -220,16 +221,16 @@ Page({ /** * 获取多商铺列表 */ - onShareAppMessage: function(res) { + onShareAppMessage: function (res) { app.globalData.previewFlag = true let that = this; let shareObj = { title: that.data.data.merchantName, path: `/pages/index/index?id=${that.data.id}&frommd=md&type=md`, - success: function(res) { + success: function (res) { if (res.errMsg == 'shareAppMessage:ok') {} }, - fail: function(error) { + fail: function (error) { if (res.errMsg == 'shareAppMessage:fail cancel') {} else if (res.errMsg == 'shareAppMessage:fail') {} } }; diff --git a/pages/order/detail/index.js b/pages/order/detail/index.js index dbac5f0..7a3ea4e 100644 --- a/pages/order/detail/index.js +++ b/pages/order/detail/index.js @@ -51,7 +51,8 @@ Page({ cardIf: false, contentType: 0, orderFlag: false, //判断是不是线上配送 - tenantId: '' + tenantId: '', + mallList: [] }, handleRefund(event) { const { @@ -144,6 +145,42 @@ Page({ }) }, + getCouponMerchant() { //获取适用门店 + Http.get({ + url: config.api.orderDetail, + data: { + orderId: this.data.orderId, + mallTenantId: this.data.mallTenantId || '' + } + }).then(res => { + const couponChannelId = res.data.orders[0].couponChannelId + Http.get({ + url: config.api.couponMerchant, + data: { + couponChannelId: couponChannelId + } + }).then(res => { + const keys = Object.keys(res.data) + const mallList = [] + keys.forEach(item => { + const arr = item.split('|') + const obj = { + tenantId: arr[0], + mallName: arr[1], + merchantVoList: res.data[item], + expand: false + } + mallList.push(obj) + }) + this.setData({ + mallList: mallList + }) + }) + }).catch(err => { + + }) + }, + goDetail() { tt.navigateTo({ url: `/pages/coupon/detail/index?couponChannelId=${this.data.order.couponChannelId}&mallTenantId=${this.data.mallTenantId}`, @@ -648,7 +685,6 @@ Page({ */ onLoad: function (options) { this.getSeUrl() - if (options.mallTenantId) { this.setData({ mallTenantId: options.mallTenantId, @@ -664,7 +700,6 @@ Page({ // } that.setData({ orderId: options.orderId, - }); tt.hideShareMenu() if (options.cardIf) { //转赠 展示不需 @@ -676,8 +711,7 @@ Page({ title: "加载中" }); - - + this.getCouponMerchant() //获取可用商户 }, onShow: function () { let that = this; diff --git a/pages/order/detail/index.json b/pages/order/detail/index.json index d477d35..40cb223 100644 --- a/pages/order/detail/index.json +++ b/pages/order/detail/index.json @@ -1,9 +1,10 @@ { "navigationBarTitleText": "订单详情", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black", - "usingComponents": { - "navbar": "../../../components/navbar/navbar", - "store": "../../../components/store/index" - } - } \ No newline at end of file + "navigationBarBackgroundColor": "#fff", + "navigationBarTextStyle": "black", + "usingComponents": { + "navbar": "../../../components/navbar/navbar", + "store": "../../../components/store/index", + "shop": "../../../components/shop/shop" + } +} \ No newline at end of file diff --git a/pages/order/detail/index.ttml b/pages/order/detail/index.ttml index b6e6ab0..5fc6c48 100644 --- a/pages/order/detail/index.ttml +++ b/pages/order/detail/index.ttml @@ -161,7 +161,7 @@ - + 团购详情 diff --git a/project.config.json b/project.config.json index 53ef8c6..1c3787c 100644 --- a/project.config.json +++ b/project.config.json @@ -1,24 +1,34 @@ { - "setting": { - "urlCheck": false, - "es6": true, - "newFeature": false, - "postcss": false, - "mockUpdate": true, - "minified": false, - "autoPush": false, - "scripts": false, - "mockLogin": false, - "autoCompile": true, - "localPlugins": false, - "IDEPreviewHotRestartCache": false - }, - "appid": "ttde7ca8c141425a2301", - "projectname": "tt富茂C", - "condition": { - "miniprogram": { - "current": -1, - "list": [] + "setting": { + "urlCheck": false, + "es6": true, + "newFeature": false, + "postcss": false, + "mockUpdate": true, + "minified": false, + "autoPush": false, + "scripts": false, + "mockLogin": false, + "autoCompile": true, + "localPlugins": false, + "IDEPreviewHotRestartCache": false + }, + "appid": "ttde7ca8c141425a2301", + "projectname": "tt富茂C", + "condition": { + "miniprogram": { + "current": -1, + "list": [ + { + "id": 1670551556787, + "name": "pages/coupon/detail/index", + "pathName": "pages/coupon/detail/index", + "query": "couponChannelId=760764417613029376&couponId=760349248090595328", + "scene": "990001", + "launchFrom": "scan", + "location": "qr_code" } + ] } + } }