feat: 详情页按入口板块区分展示——文旅场馆显示使用说明,商户折扣显示商品信息+商户优惠
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
c72e08f356
commit
eaadae9e03
@@ -133,7 +133,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goDetail(item) {
|
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() {
|
onSearch() {
|
||||||
this.pageNo = 1
|
this.pageNo = 1
|
||||||
|
|||||||
+31
-8
@@ -42,14 +42,25 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 使用说明(内容取文旅场馆第三方设置里的备注 shop_relation.remark) -->
|
<!-- 商品信息(仅商户折扣板块展示,内容取商铺门票信息字段) -->
|
||||||
<view class="discount-section" v-if="discountList.length">
|
<view class="discount-section" v-if="!isVenue && ticketInfoList.length">
|
||||||
<view class="section-title">
|
<view class="section-title">
|
||||||
<image src="https://aliyunoss.hn12301.net/hhrs/hhrs_qysm.png" style="width: 30rpx;height: 30rpx;"></image>
|
<image src="https://aliyunoss.hn12301.net/hhrs/hhrs_qysm.png" style="width: 30rpx;height: 30rpx;"></image>
|
||||||
<text class="discount-title">使用说明</text>
|
<text class="discount-title">商品信息</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="discount-list">
|
<view class="discount-list">
|
||||||
<text class="discount-item" v-for="(item, index) in discountList" :key="index">{{ item }}</text>
|
<text class="discount-item" v-for="(item, index) in ticketInfoList" :key="index">{{ item }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 文旅场馆显示「使用说明」(1001板块备注),商户折扣显示「商户优惠」(1002板块备注) -->
|
||||||
|
<view class="discount-section" v-if="remarkList.length">
|
||||||
|
<view class="section-title">
|
||||||
|
<image src="https://aliyunoss.hn12301.net/hhrs/hhrs_qysm.png" style="width: 30rpx;height: 30rpx;"></image>
|
||||||
|
<text class="discount-title">{{ isVenue ? '使用说明' : '商户优惠' }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="discount-list">
|
||||||
|
<text class="discount-item" v-for="(item, index) in remarkList" :key="index">{{ item }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -73,13 +84,24 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
store: null,
|
store: null,
|
||||||
loaded: false
|
loaded: false,
|
||||||
|
detailType: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
discountList() {
|
// xuchao: 入口板块:type=2 商户折扣,其余(含缺省)按文旅场馆渲染
|
||||||
if (!this.store || !this.store.merchantDiscount) return []
|
isVenue() {
|
||||||
return this.store.merchantDiscount.split('\n')
|
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位手机号也自动拆开
|
// xuchao: 客服电话列表:按常见分隔符切分;无分隔符连写的多个11位手机号也自动拆开
|
||||||
servicePhoneList() {
|
servicePhoneList() {
|
||||||
@@ -106,6 +128,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
if (options.type) this.detailType = String(options.type)
|
||||||
if (options.id) {
|
if (options.id) {
|
||||||
this.loadDetail(options.id)
|
this.loadDetail(options.id)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user