|
@@ -113,15 +113,10 @@ Page({
|
|
|
* 获取订单参数
|
|
|
*/
|
|
|
async goPay() {
|
|
|
- let res = await WelfareMall.getPayParams({
|
|
|
- mobile: getMobileCache(),
|
|
|
- orderSn: this.data.orderSn,
|
|
|
- openId: wx.getStorageSync('loginInfo').openId,
|
|
|
- thirdPartyName: 'coupon-activity',
|
|
|
- payCode: "HSAY-COUPON",
|
|
|
- });
|
|
|
+ console.log(wx.getStorageSync('loginInfo').openId)
|
|
|
+ let result = await WelfareMall.getOrderParams(this.data.orderSn,wx.getStorageSync('loginInfo').openId);
|
|
|
console.log(res);
|
|
|
- // res = res.wxPrePayVo
|
|
|
+ let res = result.data
|
|
|
wx.requestPayment({
|
|
|
timeStamp: res.wxPrePayVo.timeStamp,
|
|
|
package: res.wxPrePayVo.pack,
|
|
@@ -129,13 +124,11 @@ Page({
|
|
|
signType: res.wxPrePayVo.signType,
|
|
|
paySign: res.wxPrePayVo.paySign,
|
|
|
success: function (res) {
|
|
|
- //支付成功,跳转领取成功页面
|
|
|
- wx.reLaunch({
|
|
|
- url: '/pages/couponSuccess/couponSuccess'
|
|
|
- })
|
|
|
+ //支付成功
|
|
|
+ console.log(res);
|
|
|
+ this.getOrder(this.data.orderSn);
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
- console.log('payerror')
|
|
|
console.log(res);
|
|
|
}
|
|
|
})
|