|
|
@@ -195,6 +195,31 @@ Page({ |
|
|
|
showButton: false |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 去拼团 |
|
|
|
*/ |
|
|
|
goToOrderGroup(orderId, orderGroupId, _this) { |
|
|
|
console.log(22222222) |
|
|
|
let that = this; |
|
|
|
// 支付成功 |
|
|
|
Http.post({ |
|
|
|
url: config.api.toOrderGroup, |
|
|
|
data: { |
|
|
|
id: orderGroupId, |
|
|
|
orderId, |
|
|
|
couponId: _this.data.order.productId |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
wx.redirectTo({ |
|
|
|
url: `/pages/spellDetail/index?orderId=${orderId}&couponId=${_this.data.order.productId}&orderGroupId=${res.data.orderGroupId}` |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log(err); |
|
|
|
}) |
|
|
|
// return; |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 发起支付 |
|
|
|
*/ |
|
|
@@ -310,11 +335,15 @@ Page({ |
|
|
|
setTimeout(function () { |
|
|
|
wx.hideLoading(); |
|
|
|
}, 1600); |
|
|
|
setTimeout(() => { |
|
|
|
wx.redirectTo({ |
|
|
|
url: `/pages/order/detail/index?orderId=${orderId}` |
|
|
|
}); |
|
|
|
}, 1600); |
|
|
|
if (_this.data.order.type==9){ |
|
|
|
_this.goToOrderGroup(orderId, 0, _this) |
|
|
|
}else{ |
|
|
|
setTimeout(() => { |
|
|
|
wx.redirectTo({ |
|
|
|
url: `/pages/order/detail/index?orderId=${orderId}` |
|
|
|
}); |
|
|
|
}, 1600); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} else if (type == 'free'){ |
|
|
|