|
|
@@ -193,6 +193,7 @@
|
|
|
title: res.msg
|
|
|
})
|
|
|
} else {
|
|
|
+ this.$u.toast('打榜成功')
|
|
|
this.getBoostDetail(this.activityId, this.receiverId);
|
|
|
}
|
|
|
})
|
|
|
@@ -200,10 +201,12 @@
|
|
|
},
|
|
|
//礼物支付
|
|
|
async pay() {
|
|
|
+ let _this = this;
|
|
|
if (this.$u.test.isEmpty(this.senderId)) {
|
|
|
let path = 'pages/activityList/activity/authorBoost?activityId=' + this.activityId + '&receiverId=' + this.receiverId;
|
|
|
window.location.href = authUrl(path);
|
|
|
} else {
|
|
|
+ let orderId=new Date().getTime()
|
|
|
let orderInfo = (await this.$u.api.yeePay.initOrder(
|
|
|
{
|
|
|
"appId": appId,
|
|
|
@@ -217,7 +220,7 @@
|
|
|
"memo": "",
|
|
|
"notifyUrl": "https://yyzs.nanyue6688.com/ldt/api/yeePay/notify",
|
|
|
"orderAmount": this.count * this.currentPresentSum,
|
|
|
- "orderId": new Date().getTime(),
|
|
|
+ "orderId": orderId,
|
|
|
"payWay": "WECHAT_OFFIACCOUNT",
|
|
|
"redirectUrl": "",
|
|
|
"scene": "OFFLINE",
|
|
|
@@ -226,10 +229,24 @@
|
|
|
"userIp": "127.0.0.1"
|
|
|
}
|
|
|
));
|
|
|
- if(typeof orderInfo.prePayTn != 'undefined' ){
|
|
|
- //调起支付
|
|
|
- this.toPay(JSON.parse(orderInfo.prePayTn));
|
|
|
- }
|
|
|
+ _this.$u.api.boost.billRecord({
|
|
|
+ userId: _this.senderId,
|
|
|
+ orderId:orderId,
|
|
|
+ payPath: window.location.href,
|
|
|
+ openId: uni.getStorageSync("openid"),
|
|
|
+ activityId: _this.activityId,
|
|
|
+ price: _this.count * _this.currentPresentSum,
|
|
|
+ presentId: _this.boostDetail.presentList[_this.current].id,
|
|
|
+ presentCount: _this.count,
|
|
|
+ relationId: _this.receiverId,
|
|
|
+ type: 2,
|
|
|
+ payStatus: 0,
|
|
|
+ }).then(res=>{
|
|
|
+ if(typeof orderInfo.prePayTn != 'undefined' ){
|
|
|
+ //调起支付
|
|
|
+ this.toPay(JSON.parse(orderInfo.prePayTn));
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
//获取助力详情
|
|
|
@@ -309,17 +326,6 @@
|
|
|
let _this = this;
|
|
|
WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
|
|
|
if (res.err_msg == "get_brand_wcpay_request:ok" ) {
|
|
|
- _this.$u.api.boost.billRecord({
|
|
|
- userId: _this.senderId,
|
|
|
- openId: uni.getStorageSync("openid"),
|
|
|
- activityId: _this.activityId,
|
|
|
- price: _this.count * _this.currentPresentSum,
|
|
|
- presentId: _this.boostDetail.presentList[_this.current].id,
|
|
|
- presentCount: _this.count,
|
|
|
- relationId: _this.receiverId,
|
|
|
- type: 2,
|
|
|
- payStatus: 1,
|
|
|
- })
|
|
|
_this.$u.api.boost.doReward({
|
|
|
activityId: _this.activityId,
|
|
|
presentId: _this.boostDetail.presentList[_this.current].id,
|
|
|
@@ -331,17 +337,7 @@
|
|
|
_this.successShow = true;
|
|
|
})
|
|
|
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
|
|
- _this.$u.api.boost.billRecord({
|
|
|
- userId: _this.senderId,
|
|
|
- openId: uni.getStorageSync("openid"),
|
|
|
- activityId: _this.activityId,
|
|
|
- price: _this.count * _this.currentPresentSum,
|
|
|
- presentId: _this.boostDetail.presentList[_this.current].id,
|
|
|
- presentCount: _this.count,
|
|
|
- relationId: _this.receiverId,
|
|
|
- type: 2,
|
|
|
- payStatus: 2,
|
|
|
- })
|
|
|
+ console.log("cancel");
|
|
|
} else {
|
|
|
console.log(res.err_msg);
|
|
|
}
|