diff --git a/pages/discount/discount.vue b/pages/discount/discount.vue index e1056bf..ff8930e 100644 --- a/pages/discount/discount.vue +++ b/pages/discount/discount.vue @@ -133,7 +133,8 @@ export default { } }, goDetail(item) { - uni.navigateTo({ url: '/pages/venue/detail?id=' + item.shopId }) + // xuchao: type=2 标记商户折扣入口,详情页据此展示商品信息+商户优惠模块 + uni.navigateTo({ url: '/pages/venue/detail?id=' + item.shopId + '&type=2' }) }, onSearch() { this.pageNo = 1 diff --git a/pages/venue/detail.vue b/pages/venue/detail.vue index 8964b12..94e3fbd 100644 --- a/pages/venue/detail.vue +++ b/pages/venue/detail.vue @@ -42,14 +42,25 @@ - - + + - 使用说明 + 商品信息 - {{ item }} + {{ item }} + + + + + + + + {{ isVenue ? '使用说明' : '商户优惠' }} + + + {{ item }} @@ -73,13 +84,24 @@ export default { data() { return { store: null, - loaded: false + loaded: false, + detailType: '1' } }, computed: { - discountList() { - if (!this.store || !this.store.merchantDiscount) return [] - return this.store.merchantDiscount.split('\n') + // xuchao: 入口板块:type=2 商户折扣,其余(含缺省)按文旅场馆渲染 + isVenue() { + return this.detailType !== '2' + }, + ticketInfoList() { + if (!this.store || !this.store.ticketInfo) return [] + return this.store.ticketInfo.split('\n') + }, + remarkList() { + if (!this.store) return [] + const text = this.isVenue ? this.store.usageNote : this.store.merchantDiscount + if (!text) return [] + return text.split('\n') }, // xuchao: 客服电话列表:按常见分隔符切分;无分隔符连写的多个11位手机号也自动拆开 servicePhoneList() { @@ -106,6 +128,7 @@ export default { } }, onLoad(options) { + if (options.type) this.detailType = String(options.type) if (options.id) { this.loadDetail(options.id) }