|
@@ -249,7 +249,9 @@
|
|
|
total_detail: that.total_detail,
|
|
|
coupon: that.coupon,
|
|
|
type: that.type,
|
|
|
- group: that.group_id
|
|
|
+ }
|
|
|
+ if (that?.group_id) {
|
|
|
+ data.group = that.group_id
|
|
|
}
|
|
|
const arr = await that.$api(`/order`, 'POST', data)
|
|
|
if (arr.errcode == '0') {
|
|
@@ -265,14 +267,26 @@
|
|
|
uni.requestPayment({
|
|
|
"provider": "wxpay",
|
|
|
...res.data,
|
|
|
- success(res) {
|
|
|
- if (that.type == '1' && res.data?.group_id) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesHome/group/share?group_id=${res.data.group_id}`
|
|
|
+ async success(res) {
|
|
|
+ const group = await that.$api('/group/getGroup',
|
|
|
+ 'get', {
|
|
|
+ order_id: arr.data,
|
|
|
})
|
|
|
+ if (group.errcode == '0') {
|
|
|
+ console.log(group.data);
|
|
|
+ // if (that.type == '1' && res.data?.group_id) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: `/pagesHome/group/share?group_id=${res.data.group_id}`
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: `/pagesMy/order/index?status=${'1'}`
|
|
|
+ // })
|
|
|
+ // }
|
|
|
} else {
|
|
|
- uni.reLaunch({
|
|
|
- url: `/pagesMy/order/index?status=${'1'}`
|
|
|
+ uni.showToast({
|
|
|
+ title: group.errmsg,
|
|
|
+ icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
},
|