hookehuyr

fix: 修正跳转商品详情页时传递的参数

将跳转商品详情页的方法参数从订单ID改为整个订单对象,以便获取车辆ID
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-07-24 10:01:18 4 + * @LastEditTime: 2025-07-25 10:55:07
5 * @FilePath: /jgdl/src/pages/myOrders/index.vue 5 * @FilePath: /jgdl/src/pages/myOrders/index.vue
6 * @Description: 订单管理页面 6 * @Description: 订单管理页面
7 --> 7 -->
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
60 </view> 60 </view>
61 61
62 <!-- 车辆信息 --> 62 <!-- 车辆信息 -->
63 - <nut-row :gutter="12" class="vehicle-info" @click="goToProductDetail(order.id)"> 63 + <nut-row :gutter="12" class="vehicle-info" @click="goToProductDetail(order)">
64 <nut-col :span="6"> 64 <nut-col :span="6">
65 <image :src="order.details.vehicle.front_photo || DEFAULT_COVER_IMG" :alt="order.details.vehicle.brand + ' ' + order.details.vehicle.model" class="vehicle-image" 65 <image :src="order.details.vehicle.front_photo || DEFAULT_COVER_IMG" :alt="order.details.vehicle.brand + ' ' + order.details.vehicle.model" class="vehicle-image"
66 mode="aspectFill" /> 66 mode="aspectFill" />
...@@ -331,9 +331,9 @@ const scrollStyle = ref({ ...@@ -331,9 +331,9 @@ const scrollStyle = ref({
331 * 跳转到商品详情页 331 * 跳转到商品详情页
332 * @param {string} orderId - 订单ID 332 * @param {string} orderId - 订单ID
333 */ 333 */
334 -const goToProductDetail = (orderId) => { 334 +const goToProductDetail = ({ details }) => {
335 Taro.navigateTo({ 335 Taro.navigateTo({
336 - url: `/pages/productDetail/index?id=${orderId}` 336 + url: `/pages/productDetail/index?id=${details.vehicle.id}`
337 }) 337 })
338 } 338 }
339 339
......