xuxueyang
2024-08-27 ed6513d69ed4acd982c3596e986dcfe9f5c66d00
add 微信发货
已修改2个文件
88 ■■■■■ 文件已修改
pages/order/order-detail.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/order/order-detail.vue
@@ -149,6 +149,50 @@
                    break
                    case 'confirm': {
                        await this.$message.confirm('是否确定收货')
                        var tryCallWx = false
                        // #ifdef MP
                        let tmp = this
                        if (wx.openBusinessView&&false) {
                            tryCallWx = true
                            wx.openBusinessView({
                                businessType: 'weappOrderConfirm',
                                extraData: {
                                    merchant_id: '1230000109',
                                    merchant_trade_no: '1234323JKHDFE1243252',
                                    transaction_id: '420123123123123123123'
                                },
                                success() {
                                    //dosomething
                                    // 发送请求
                                    tmp.$message.showLoading()
                                    const {
                                        code
                                    } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', {
                                        params: {
                                            id: tmp.id,
                                        }
                                    })
                                    tmp.$message.hideLoading()
                                    if (code === 0) {
                                        tmp.getDetail()
                                    }
                                },
                                fail(e) {
                                    //dosomething
                                    console.log('error fail', e)
                                    tmp.$message.showToast('收货失败')
                                },
                                complete() {
                                    //dosomething
                                }
                            });
                        }
                        // #endif
                        if (!tryCallWx) {
                        // 发送请求
                        this.$message.showLoading()
                        const {
@@ -162,6 +206,7 @@
                        if (code === 0) {
                            this.getDetail()
                        }
                        }
                    }
                    break
pages/order/order.vue
@@ -127,6 +127,48 @@
                    break
                    case 'confirm': {
                        await this.$message.confirm('是否确定收货')
                        var tryCallWx = false
                        // #ifdef MP
                        let tmp = this
                        if (wx.openBusinessView&&false) {
                            tryCallWx = true
                            wx.openBusinessView({
                                businessType: 'weappOrderConfirm',
                                extraData: {
                                    merchant_id: '1230000109',
                                    merchant_trade_no: '1234323JKHDFE1243252',
                                    transaction_id: '420123123123123123123'
                                },
                                success() {
                                    //dosomething
                                    // 发送请求
                                    tmp.$message.showLoading()
                                    const {
                                        code
                                    } = await tmp.$http.request('get', '/api/customer/order/receive/confirm', {
                                        params: {
                                            id: item.id,
                                        }
                                    })
                                    tmp.$message.hideLoading()
                                    if (code === 0) {
                                        tmp.refreshList()
                                    }
                                },
                                fail(e) {
                                    //dosomething
                                    console.log('error fail', e)
                                    tmp.$message.showToast('收货失败')
                                },
                                complete() {
                                    //dosomething
                                }
                            });
                        }
                        // #endif
                        if (!tryCallWx) {
                        // 发送请求
                        this.$message.showLoading()
                        const {
@@ -140,6 +182,7 @@
                        if (code === 0) {
                            this.refreshList()
                        }
                        }
                    }
                    break