diff --git a/pkg_product/views/experienceCoupon.vue b/pkg_product/views/experienceCoupon.vue index 8a26086..7c65849 100644 --- a/pkg_product/views/experienceCoupon.vue +++ b/pkg_product/views/experienceCoupon.vue @@ -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)" >