浏览代码

订单详情拼团券支付跳转修改

tags/富茂链客4.1.0
刘晖 6 年前
父节点
当前提交
6fba9f1318
共有 2 个文件被更改,包括 36 次插入6 次删除
  1. +34
    -5
      pages/order/detail/index.js
  2. +2
    -1
      pages/order/detail/index.wxml

+ 34
- 5
pages/order/detail/index.js 查看文件

@@ -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'){


+ 2
- 1
pages/order/detail/index.wxml 查看文件

@@ -72,7 +72,8 @@
</view>
<!-- 待付款 显示立即购买的按钮 -->
<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 class='game' bindtap="gotogame" wx-if="{{showIf&&order.orderStatus!=0}}">
<view class='game-entry'>


正在加载...
取消
保存