Showing
1 changed file
with
34 additions
and
18 deletions
| 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-08-06 15:30:03 | 4 | + * @LastEditTime: 2025-08-08 17:38:16 |
| 5 | * @FilePath: /jgdl/src/pages/myOrders/index.vue | 5 | * @FilePath: /jgdl/src/pages/myOrders/index.vue |
| 6 | * @Description: 订单管理页面 | 6 | * @Description: 订单管理页面 |
| 7 | --> | 7 | --> |
| ... | @@ -52,7 +52,8 @@ | ... | @@ -52,7 +52,8 @@ |
| 52 | <view class="tab-item" :class="{ active: activeTab === 9 }" @click="setActiveTab(9)"> | 52 | <view class="tab-item" :class="{ active: activeTab === 9 }" @click="setActiveTab(9)"> |
| 53 | 待收货 | 53 | 待收货 |
| 54 | </view> | 54 | </view> |
| 55 | - <view class="tab-item" :class="{ active: activeTab === 'profit_sharing' }" @click="setActiveTab('profit_sharing')"> | 55 | + <view class="tab-item" :class="{ active: activeTab === 'profit_sharing' }" |
| 56 | + @click="setActiveTab('profit_sharing')"> | ||
| 56 | 分账 | 57 | 分账 |
| 57 | </view> | 58 | </view> |
| 58 | <view class="tab-item" :class="{ active: activeTab === 7 }" @click="setActiveTab(7)"> | 59 | <view class="tab-item" :class="{ active: activeTab === 7 }" @click="setActiveTab(7)"> |
| ... | @@ -118,7 +119,7 @@ | ... | @@ -118,7 +119,7 @@ |
| 118 | <text v-if="order.details.vehicle.battery_capacity_ah" class="vehicle-battery">电池容量:{{ | 119 | <text v-if="order.details.vehicle.battery_capacity_ah" class="vehicle-battery">电池容量:{{ |
| 119 | order.details.vehicle.battery_capacity_ah }}Ah</text> | 120 | order.details.vehicle.battery_capacity_ah }}Ah</text> |
| 120 | <text v-if="order.details.vehicle.price" class="vehicle-price">¥{{ order.details.vehicle.price | 121 | <text v-if="order.details.vehicle.price" class="vehicle-price">¥{{ order.details.vehicle.price |
| 121 | - }}</text> | 122 | + }}</text> |
| 122 | </view> | 123 | </view> |
| 123 | </nut-col> | 124 | </nut-col> |
| 124 | </nut-row> | 125 | </nut-row> |
| ... | @@ -376,7 +377,7 @@ | ... | @@ -376,7 +377,7 @@ |
| 376 | {{ | 377 | {{ |
| 377 | currentOrderDetail?.details?.vehicle?.range_km }}km/h</text> | 378 | currentOrderDetail?.details?.vehicle?.range_km }}km/h</text> |
| 378 | <text class="product-detail-battery">电池容量: {{ currentOrderDetail?.details?.vehicle?.battery_capacity_ah | 379 | <text class="product-detail-battery">电池容量: {{ currentOrderDetail?.details?.vehicle?.battery_capacity_ah |
| 379 | - }}Ah</text> | 380 | + }}Ah</text> |
| 380 | <text v-if="currentOrderDetail?.details?.vehicle?.price" class="product-detail-price">¥ {{ | 381 | <text v-if="currentOrderDetail?.details?.vehicle?.price" class="product-detail-price">¥ {{ |
| 381 | currentOrderDetail?.details?.vehicle?.price }}</text> | 382 | currentOrderDetail?.details?.vehicle?.price }}</text> |
| 382 | </view> | 383 | </view> |
| ... | @@ -1290,20 +1291,35 @@ const performConfirmReceive = async (orderId) => { | ... | @@ -1290,20 +1291,35 @@ const performConfirmReceive = async (orderId) => { |
| 1290 | try { | 1291 | try { |
| 1291 | const order = boughtOrders.value.find(o => o.id === orderId) | 1292 | const order = boughtOrders.value.find(o => o.id === orderId) |
| 1292 | 1293 | ||
| 1293 | - // 调用确认收货API | 1294 | + if (wx.openBusinessView) { |
| 1294 | - if (order) { | 1295 | + wx.openBusinessView({ |
| 1295 | - // 调用买家查询收货状态接口 | 1296 | + businessType: 'weappOrderConfirm', |
| 1296 | - const response = await receiveOrderAPI({ order_id: order.id }) | 1297 | + extraData: { |
| 1297 | - | 1298 | + merchant_id: order.merchant_id || '', |
| 1298 | - if (response.code) { | 1299 | + merchant_trade_no: order.id, |
| 1299 | - order.status = 11 // 更新为已完成状态 | 1300 | + transaction_id: order.transaction_id || '' |
| 1300 | - | 1301 | + }, |
| 1301 | - Taro.showToast({ | 1302 | + success() { |
| 1302 | - title: '确认收货成功', | 1303 | + // 确认收货组件调用成功 |
| 1303 | - icon: 'success', | 1304 | + }, |
| 1304 | - duration: 2000 | 1305 | + fail(err) { |
| 1305 | - }) | 1306 | + Taro.showToast({ |
| 1306 | - } | 1307 | + title: '确认收货失败', |
| 1308 | + icon: 'error', | ||
| 1309 | + duration: 2000 | ||
| 1310 | + }) | ||
| 1311 | + }, | ||
| 1312 | + complete() { | ||
| 1313 | + receivingOrderId.value = '' | ||
| 1314 | + } | ||
| 1315 | + }); | ||
| 1316 | + } else { | ||
| 1317 | + // 引导用户升级微信版本 | ||
| 1318 | + Taro.showModal({ | ||
| 1319 | + title: '提示', | ||
| 1320 | + content: '当前微信版本过低,请升级微信版本后重试', | ||
| 1321 | + showCancel: false | ||
| 1322 | + }) | ||
| 1307 | } | 1323 | } |
| 1308 | } catch (error) { | 1324 | } catch (error) { |
| 1309 | Taro.showToast({ | 1325 | Taro.showToast({ | ... | ... |
-
Please register or login to post a comment