Commit 38b1c38f authored by mengcuiguang's avatar mengcuiguang

接入签约支付

parent 2f2f1a2f
......@@ -199,10 +199,10 @@
this.handlePay();
},
handlePay() {
// if (this.os == 'ios') {
// message.notify('暂不支持ios支付');
// return
// }
if (this.os == 'ios') {
message.notify('暂不支持ios支付');
return
}
let that = this;
let vipBean = this.vipList[this.selectedIndex];
......@@ -217,10 +217,46 @@
success: ({
data
}) => {
if (vipBean.trial == 1) {
// 签约
that.ttCreateSignOrder(data, vipBean.largeType);
} else {
that.ttPrePay(data, vipBean.largeType);
}
}
});
},
ttCreateSignOrder(ttData, largeType) {
if (!tt.canIUse('createSignOrder')) {
message.notify('请升级抖音APP版本.');
return
}
if (!tt.canIUse('sign')) {
message.notify('请升级抖音APP版本.');
return
}
let that = this;
tt.createSignOrder({
businessType: 2,
data: ttData.params.data,
byteAuthorization: ttData.params.byteAuthorization,
success: (res) => {
tt.sign({
businessType: 2,
orderId: res.authOrderId,
success: (res) => {
that.queryOrderStatus(largeType, ttData.tidStr);
}
})
},
fail: (res) => {
console.log('createSignOrdercreateSignOrder->:', JSON.stringify(res));
}
})
},
onVip() {
navigateTo(`/pagesA/vipPay/vipPay`)
this.handleClose();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment