Compare commits

...
4 Commits
3 changed files with 36 additions and 13 deletions
+9 -1
View File
@@ -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
@@ -154,6 +155,10 @@ export default {
.search-area {
background-color: #ffffff;
padding: 6px 12px;
// xuchao: 滚动时固定在页面顶部
position: sticky;
top: 0;
z-index: 10;
}
.nav-row {
@@ -253,6 +258,9 @@ export default {
font-size: 14px;
color: #727272;
margin-top: 8px;
// xuchao: 分类为空也预留一行高度,防止卡片内容底部对齐时名称上下跳动
min-height: 20px;
line-height: 20px;
}
.card-address-row {
+20 -12
View File
@@ -15,7 +15,7 @@
<view class="store-info">
<text class="store-name">{{ store.name }}</text>
<text class="store-category">{{ store.category }}</text>
<text class="store-hours">营业时间:{{ store.businessTime }}</text>
<text class="store-hours" v-if="store.businessTime">营业时间:{{ store.businessTime }}</text>
</view>
</view>
<view class="divider"></view>
@@ -42,8 +42,8 @@
</view>
</view>
<!-- 商品信息(内容取商铺门票信息字段) -->
<view class="discount-section" v-if="ticketInfoList.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>
@@ -53,14 +53,14 @@
</view>
</view>
<!-- 商户优惠 -->
<view class="discount-section">
<!-- 文旅场馆显示「使用说明」(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">商户优惠</text>
<text class="discount-title">{{ isVenue ? '使用说明' : '商户优惠' }}</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 remarkList" :key="index">{{ item }}</text>
</view>
</view>
</view>
@@ -84,17 +84,24 @@ export default {
data() {
return {
store: null,
loaded: false
loaded: false,
detailType: '1'
}
},
computed: {
// xuchao: 入口板块:type=2 商户折扣,其余(含缺省)按文旅场馆渲染
isVenue() {
return this.detailType !== '2'
},
ticketInfoList() {
if (!this.store || !this.store.ticketInfo) return []
return this.store.ticketInfo.split('\n')
},
discountList() {
if (!this.store || !this.store.merchantDiscount) return []
return this.store.merchantDiscount.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() {
@@ -121,6 +128,7 @@ export default {
}
},
onLoad(options) {
if (options.type) this.detailType = String(options.type)
if (options.id) {
this.loadDetail(options.id)
}
@@ -251,7 +259,7 @@ export default {
color: #999999;
}
/* 商户优惠 */
/* 使用说明 */
.discount-section {
background-color: #ffffff;
margin: 12px;
+7
View File
@@ -144,6 +144,10 @@ export default {
.search-area {
background-color: #ffffff;
padding: 6px 12px;
/* xuchao: 滚动时固定在页面顶部 */
position: sticky;
top: 0;
z-index: 10;
}
.nav-row {
@@ -234,6 +238,9 @@ export default {
font-size: 14px;
color: #727272;
margin-top: 8px;
/* xuchao: 分类为空也预留一行高度,防止卡片内容底部对齐时名称上下跳动 */
min-height: 20px;
line-height: 20px;
}
.card-address {