Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-08-08 17:45:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f8dcf097a510ec9f50dff1041caeb7a653983ffc
f8dcf097
1 parent
a78cf906
feat(订单管理): 添加微信小程序确认收货功能
使用微信开放能力实现确认收货流程,当微信版本不支持时提示用户升级
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
12 deletions
src/pages/myOrders/index.vue
src/pages/myOrders/index.vue
View file @
f8dcf09
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-0
6 15:30:03
* @LastEditTime: 2025-08-0
8 17:38:16
* @FilePath: /jgdl/src/pages/myOrders/index.vue
* @Description: 订单管理页面
-->
...
...
@@ -52,7 +52,8 @@
<view class="tab-item" :class="{ active: activeTab === 9 }" @click="setActiveTab(9)">
待收货
</view>
<view class="tab-item" :class="{ active: activeTab === 'profit_sharing' }" @click="setActiveTab('profit_sharing')">
<view class="tab-item" :class="{ active: activeTab === 'profit_sharing' }"
@click="setActiveTab('profit_sharing')">
分账
</view>
<view class="tab-item" :class="{ active: activeTab === 7 }" @click="setActiveTab(7)">
...
...
@@ -1290,20 +1291,35 @@ const performConfirmReceive = async (orderId) => {
try {
const order = boughtOrders.value.find(o => o.id === orderId)
// 调用确认收货API
if (order) {
// 调用买家查询收货状态接口
const response = await receiveOrderAPI({ order_id: order.id })
if (response.code) {
order.status = 11 // 更新为已完成状态
if (wx.openBusinessView) {
wx.openBusinessView({
businessType: 'weappOrderConfirm',
extraData: {
merchant_id: order.merchant_id || '',
merchant_trade_no: order.id,
transaction_id: order.transaction_id || ''
},
success() {
// 确认收货组件调用成功
},
fail(err) {
Taro.showToast({
title: '确认收货成功
',
icon: 'success
',
title: '确认收货失败
',
icon: 'error
',
duration: 2000
})
},
complete() {
receivingOrderId.value = ''
}
});
} else {
// 引导用户升级微信版本
Taro.showModal({
title: '提示',
content: '当前微信版本过低,请升级微信版本后重试',
showCancel: false
})
}
} catch (error) {
Taro.showToast({
...
...
Please
register
or
login
to post a comment