Fix:5048 【商城小程序】点击体验店,增加跳转到对应体验店详情页的链接
This commit is contained in:
@@ -24,7 +24,8 @@ export default {
|
|||||||
experienceList: [],
|
experienceList: [],
|
||||||
selectedProjectIds: [],
|
selectedProjectIds: [],
|
||||||
userLatitude: null,
|
userLatitude: null,
|
||||||
userLongitude: null
|
userLongitude: null,
|
||||||
|
merId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -131,6 +132,7 @@ export default {
|
|||||||
startTime: this.formatDateByTimestamp(data.startTime),
|
startTime: this.formatDateByTimestamp(data.startTime),
|
||||||
endTime: this.formatDateByTimestamp(data.endTime)
|
endTime: this.formatDateByTimestamp(data.endTime)
|
||||||
}
|
}
|
||||||
|
this.merId = latest.merId || ''
|
||||||
this.setActiveCoupon(latest)
|
this.setActiveCoupon(latest)
|
||||||
if (!this.couponList.length) {
|
if (!this.couponList.length) {
|
||||||
this.couponList = [latest]
|
this.couponList = [latest]
|
||||||
@@ -195,6 +197,7 @@ export default {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
|
experienceMerchantId: item.merId || item.experienceMerchantId || item.storeId || '',
|
||||||
title: item.name || '',
|
title: item.name || '',
|
||||||
subTitle: item.projectName || item.intro || '',
|
subTitle: item.projectName || item.intro || '',
|
||||||
distance,
|
distance,
|
||||||
@@ -204,7 +207,8 @@ export default {
|
|||||||
tags: item.intro || '',
|
tags: item.intro || '',
|
||||||
categoryId: this.activeCategoryId === 'all' ? 'all' : this.activeCategoryId,
|
categoryId: this.activeCategoryId === 'all' ? 'all' : this.activeCategoryId,
|
||||||
image: item.image || item.cover || '',
|
image: item.image || item.cover || '',
|
||||||
selected: selectedSet.has(id)
|
selected: selectedSet.has(id),
|
||||||
|
rawData: item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.selectedCount = this.initialUsedCount + this.selectedProjectIds.length
|
this.selectedCount = this.initialUsedCount + this.selectedProjectIds.length
|
||||||
@@ -238,6 +242,30 @@ export default {
|
|||||||
}
|
}
|
||||||
this.selectedCount = this.initialUsedCount + this.selectedProjectIds.length
|
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() {
|
submitOrder() {
|
||||||
if (!this.activeCouponId) {
|
if (!this.activeCouponId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -384,6 +412,7 @@ export default {
|
|||||||
v-for="item in filteredList"
|
v-for="item in filteredList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
class="card"
|
class="card"
|
||||||
|
@click="goExperienceStoreDetail(item)"
|
||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
:src="item.image"
|
:src="item.image"
|
||||||
|
|||||||
Reference in New Issue
Block a user