@@ -195,6 +195,31 @@ Page({ | |||||
showButton: false | 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 () { | setTimeout(function () { | ||||
wx.hideLoading(); | wx.hideLoading(); | ||||
}, 1600); | }, 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'){ | } else if (type == 'free'){ | ||||
@@ -72,7 +72,8 @@ | |||||
</view> | </view> | ||||
<!-- 待付款 显示立即购买的按钮 --> | <!-- 待付款 显示立即购买的按钮 --> | ||||
<view wx:if="{{order.orderStatus==0&&order.salePrice!=0||order.orderStatus==7&&order.salePrice!=0}}" class="buy-view app-border-top"> | <view wx:if="{{order.orderStatus==0&&order.salePrice!=0||order.orderStatus==7&&order.salePrice!=0}}" class="buy-view app-border-top"> | ||||
<button bindtap='orderFunc' hover-class='active' data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button> | |||||
<button bindtap='orderFunc' hover-class='active' wx:if="{{order.type != 9}}" data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>立即支付</button> | |||||
<button bindtap='orderFunc' hover-class='active' wx:if="{{order.type == 9}}" data-couponChannelId="{{order.id}}" disabled='{{showButton}}' class='buy'>支付并发起拼团</button> | |||||
</view> | </view> | ||||
<view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}"> | <view class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}"> | ||||
<view class='game-entry'> | <view class='game-entry'> | ||||