|
|
@@ -227,52 +227,63 @@
|
|
|
//礼物支付
|
|
|
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,
|
|
|
- "channel": "WECHAT",
|
|
|
- "channelPromotionInfo": "",
|
|
|
- "channelSpecifiedInfo": "",
|
|
|
- "csUrl": "",
|
|
|
- "expiredTime": "",
|
|
|
- "fundProcessType": "",
|
|
|
- "goodsName": this.boostDetail.presentList[this.current].name,
|
|
|
- "memo": "",
|
|
|
- "notifyUrl": "https://music.nanyue6688.com/ldt/api/yeePay/notify",
|
|
|
- "orderAmount": this.count * this.currentPresentSum,
|
|
|
- "orderId": orderId,
|
|
|
- "payWay": "WECHAT_OFFIACCOUNT",
|
|
|
- "redirectUrl": "",
|
|
|
- "scene": "OFFLINE",
|
|
|
- "uniqueOrderNo": "",
|
|
|
- "userId": uni.getStorageSync("openid"),
|
|
|
- "userIp": "127.0.0.1"
|
|
|
- }
|
|
|
- ));
|
|
|
- _this.$u.api.boost.billRecord({
|
|
|
- userId: _this.senderId,
|
|
|
- orderId:orderId,
|
|
|
- payPath: encodeURIComponent(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));
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ // 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(
|
|
|
+ {
|
|
|
+ "channel": "ALIPAY",
|
|
|
+ "goodsName": this.boostDetail.presentList[this.current].name,
|
|
|
+ "notifyUrl": "1",
|
|
|
+ "orderAmount": this.count * this.currentPresentSum,
|
|
|
+ "orderId": orderId,
|
|
|
+ "payWay": "USER_SCAN",
|
|
|
+ "scene": "OFFLINE",
|
|
|
+ "userIp": "127.0.0.1"
|
|
|
+ }
|
|
|
+ // {
|
|
|
+ // "appId": appId,
|
|
|
+ // "channel": "WECHAT",
|
|
|
+ // "channelPromotionInfo": "",
|
|
|
+ // "channelSpecifiedInfo": "",
|
|
|
+ // "csUrl": "",
|
|
|
+ // "expiredTime": "",
|
|
|
+ // "fundProcessType": "",
|
|
|
+ // "goodsName": this.boostDetail.presentList[this.current].name,
|
|
|
+ // "memo": "",
|
|
|
+ // "notifyUrl": "https://music.nanyue6688.com/ldt/api/yeePay/notify",
|
|
|
+ // "orderAmount": this.count * this.currentPresentSum,
|
|
|
+ // "orderId": orderId,
|
|
|
+ // "payWay": "WECHAT_OFFIACCOUNT",
|
|
|
+ // "redirectUrl": "",
|
|
|
+ // "scene": "OFFLINE",
|
|
|
+ // "uniqueOrderNo": "",
|
|
|
+ // "userId": uni.getStorageSync("openid"),
|
|
|
+ // "userIp": "127.0.0.1"
|
|
|
+ // }
|
|
|
+ ));
|
|
|
+ this.toPay(orderInfo.prePayTn);
|
|
|
+ // _this.$u.api.boost.billRecord({
|
|
|
+ // userId: _this.senderId,
|
|
|
+ // orderId:orderId,
|
|
|
+ // payPath: encodeURIComponent(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));
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
//获取助力详情
|
|
|
getBoostDetail(activityId, receiverId) {
|
|
|
@@ -352,17 +363,18 @@
|
|
|
// this.type = "分享到朋友圈"
|
|
|
},
|
|
|
toPay(info) {
|
|
|
- console.log(info,456789);
|
|
|
- let _this = this;
|
|
|
- WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
|
|
|
- if (res.err_msg == "get_brand_wcpay_request:ok" ) {
|
|
|
- _this.successShow = true;
|
|
|
- } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
|
|
- console.log("cancel");
|
|
|
- } else {
|
|
|
- console.log(res.err_msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ // console.log(info,456789);
|
|
|
+ // let _this = this;
|
|
|
+ // WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
|
|
|
+ // if (res.err_msg == "get_brand_wcpay_request:ok" ) {
|
|
|
+ // _this.successShow = true;
|
|
|
+ // } else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
|
|
+ // console.log("cancel");
|
|
|
+ // } else {
|
|
|
+ // console.log(res.err_msg);
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ location.href = `alipays://platformapi/startapp?saId=10000007&clientVersion=3.7.0.0718&qrcode=${info}`;
|
|
|
},
|
|
|
presentBoost(id) {
|
|
|
this.$u.api.boost.presentDetail({id: id}).then(res => {
|