Fix:5048 【商城小程序】点击体验店,增加跳转到对应体验店详情页的链接

This commit is contained in:
linxi
2026-04-02 19:17:02 +08:00
parent d91324c96b
commit 9a1f737988
+31 -2
View File
@@ -24,7 +24,8 @@ export default {
experienceList: [],
selectedProjectIds: [],
userLatitude: null,
userLongitude: null
userLongitude: null,
merId: ''
}
},
computed: {
@@ -131,6 +132,7 @@ export default {
startTime: this.formatDateByTimestamp(data.startTime),
endTime: this.formatDateByTimestamp(data.endTime)
}
this.merId = latest.merId || ''
this.setActiveCoupon(latest)
if (!this.couponList.length) {
this.couponList = [latest]
@@ -195,6 +197,7 @@ export default {
return {
id,
experienceMerchantId: item.merId || item.experienceMerchantId || item.storeId || '',
title: item.name || '',
subTitle: item.projectName || item.intro || '',
distance,
@@ -204,7 +207,8 @@ export default {
tags: item.intro || '',
categoryId: this.activeCategoryId === 'all' ? 'all' : this.activeCategoryId,
image: item.image || item.cover || '',
selected: selectedSet.has(id)
selected: selectedSet.has(id),
rawData: item
}
})
this.selectedCount = this.initialUsedCount + this.selectedProjectIds.length
@@ -238,6 +242,30 @@ export default {
}
this.selectedCount = this.initialUsedCount + this.selectedProjectIds.length
},
goExperienceStoreDetail(item) {
const merchantId = this.merId
if (!merchantId) {
uni.showToast({
title: '未找到体验店信息',
icon: 'none'
})
return
}
const query = []
query.push('experienceMerchantId=' + encodeURIComponent(merchantId))
query.push('name=' + encodeURIComponent(item.title || ''))
query.push('cover=' + encodeURIComponent(item.image || ''))
query.push('intro=' + encodeURIComponent(item.tags || item.subTitle || ''))
query.push('serviceTime=' + encodeURIComponent((item.rawData && item.rawData.serviceTime) || ''))
query.push('serviceEndTime=' + encodeURIComponent((item.rawData && item.rawData.serviceEndTime) || ''))
query.push('address=' + encodeURIComponent((item.rawData && item.rawData.address) || ''))
query.push('cityName=' + encodeURIComponent((item.rawData && item.rawData.cityName) || ''))
query.push('latitude=' + encodeURIComponent(item.latitude || ''))
query.push('longitude=' + encodeURIComponent(item.longitude || ''))
uni.navigateTo({
url: '/pkg_product/views/experienceProjectDetail?' + query.join('&')
})
},
submitOrder() {
if (!this.activeCouponId) {
uni.showToast({
@@ -384,6 +412,7 @@ export default {
v-for="item in filteredList"
:key="item.id"
class="card"
@click="goExperienceStoreDetail(item)"
>
<image
:src="item.image"