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
+31
-8
@@ -42,14 +42,25 @@
|
||||
</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">
|
||||
<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 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>
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user