Sfoglia il codice sorgente

优化微信小店跳转

yawuga 6 ore fa
parent
commit
20dd45313c
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      pages/trace/detail.vue

+ 7 - 3
pages/trace/detail.vue

@@ -701,7 +701,7 @@ const deviceInfo = reactive({
 	wsFlvStreamUrl: '',       // wss_flv 流地址(安卓 H5 用)
 	hlsStreamUrl: '',         // hls 流地址(iOS H5 / 小程序 / App iOS 用)
 	fmp4StreamUrl: '',        // fmp4 流地址(App Android 用)
-	imageUrl: ''              // 设备图片(如果有)
+	imageUrl: '',              // 设备图片(如果有)
 })
 
 // 气象数据(独立响应式变量,用于土壤养分趋势图)
@@ -1092,6 +1092,7 @@ onLoad((opts) => {
 		console.log('H5 iOS 视频上下文已创建')
 	}, 500)
 	// #endif
+	console.log("traceDetail",traceDetail.value);
 })
 // 加载设备列表
 const loadDeviceList = (currentFieldId) => {
@@ -1905,7 +1906,8 @@ const traceDetail = computed(() => {
 			harvestTime: data.produceDate || '',
 			packTime: data.packageDate || '',
 			emptyTitle: '暂无相关溯源码信息',
-			emptyMessage: getCurrentEmptyMessage()
+			emptyMessage: getCurrentEmptyMessage(),
+			shopUrl:data.shopUrl
 		},
 		report: {
 			status: data.reports && data.reports.length > 0 ? 'uploaded' : 'pending',
@@ -2110,6 +2112,8 @@ const traceDetail = computed(() => {
 			}
 		}
 	}
+	
+	
 })
 
 // 种植现场状态:三态逻辑
@@ -2486,7 +2490,7 @@ function contactCustomer() {
 }
 
 function goToWechatStore() {
-	const url = 'https://store.weixin.qq.com/shop/a/MfixzaIsuMchTDd'
+	const url = traceDetail.value.batch.shopUrl
 	// #ifdef H5
 	window.location.href = url
 	// #endif