Przeglądaj źródła

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

tags/富茂链客4.1.0
刘晖 6 lat temu
rodzic
commit
6fba9f1318
2 zmienionych plików z 36 dodań i 6 usunięć
  1. +34
    -5
      pages/order/detail/index.js
  2. +2
    -1
      pages/order/detail/index.wxml

+ 34
- 5
pages/order/detail/index.js Wyświetl plik

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


+ 2
- 1
pages/order/detail/index.wxml Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz