|
|
@@ -181,41 +181,39 @@
|
|
|
},
|
|
|
//礼物支付
|
|
|
async pay() {
|
|
|
- alert(1)
|
|
|
- let orderInfo = (await this.$u.api.yeePay.initOrder(
|
|
|
- {
|
|
|
- "appId": appId,
|
|
|
- "channel": "WECHAT",
|
|
|
- "channelPromotionInfo": "",
|
|
|
- "channelSpecifiedInfo": "",
|
|
|
- "csUrl": "",
|
|
|
- "expiredTime": "",
|
|
|
- "fundProcessType": "",
|
|
|
- "goodsName": "测试",
|
|
|
- "memo": "",
|
|
|
- "notifyUrl": "https://vote.guosen-fumao.cn/vote-h5/index.html",
|
|
|
- "orderAmount": 0.01,
|
|
|
- "orderId": "363223222169",
|
|
|
- "payWay": "MINI_PROGRAM",
|
|
|
- "redirectUrl": "",
|
|
|
- "scene": "ONLINE",
|
|
|
- "uniqueOrderNo": "",
|
|
|
- "userId": "ofODrjk12F8egZQJELDhcD-kMd2Y",
|
|
|
- "userIp": "127.0.0.1"
|
|
|
+ // if (this.$u.test.isEmpty(this.userId)) {
|
|
|
+ // let path = 'pages/activityList/activity/musicBoost?id=' + this.productId;
|
|
|
+ // window.location.href = authUrl(path);
|
|
|
+ // } else {
|
|
|
+ alert(1)
|
|
|
+ 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://vote.guosen-fumao.cn/vote-h5/index.html",
|
|
|
+ "orderAmount": this.count * this.currentPresentSum,
|
|
|
+ "orderId": new Date().getTime(),
|
|
|
+ "payWay": "WECHAT_OFFIACCOUNT",
|
|
|
+ "redirectUrl": "",
|
|
|
+ "scene": "OFFLINE",
|
|
|
+ "uniqueOrderNo": "",
|
|
|
+ "userId": uni.getStorageSync("openid"),
|
|
|
+ "userIp": "127.0.0.1"
|
|
|
+ }
|
|
|
+ ));
|
|
|
+ console.log(orderInfo,123456);
|
|
|
+ if(typeof orderInfo.prePayTn != 'undefined' ){
|
|
|
+ //调起支付
|
|
|
+ this.toPay(JSON.parse(orderInfo.prePayTn));
|
|
|
}
|
|
|
- )).data;
|
|
|
- if(typeof orderInfo.prePayTn != 'undefined' ){
|
|
|
- //调起支付
|
|
|
- this.toPay(orderInfo.prePayTn);
|
|
|
- }
|
|
|
- },
|
|
|
- pay() {
|
|
|
- if (this.$u.test.isEmpty(this.userId)) {
|
|
|
- let path = 'pages/activityList/activity/musicBoost?id=' + this.productId;
|
|
|
- window.location.href = authUrl(path);
|
|
|
- } else {
|
|
|
- console.log("发起支付");
|
|
|
- }
|
|
|
+ // }
|
|
|
},
|
|
|
//获取助力详情
|
|
|
getBoostDetail(productId, userId) {
|
|
|
@@ -282,6 +280,7 @@
|
|
|
this.type = "分享到朋友圈"
|
|
|
},
|
|
|
toPay(info) {
|
|
|
+ console.log(info,456789);
|
|
|
WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
|
|
|
if (res.err_msg == "get_brand_wcpay_request:ok" ) {
|
|
|
this.$u.api.boost.billRecord({
|