Commit 6100dccf authored by mengcuiguang's avatar mengcuiguang

接入签约支付

parent 809e16d7
......@@ -188,10 +188,46 @@
showLoading: true,
success: ({
data
}) => {
that.ttPrePay(data, vipBean.largeType);
}) => {
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));
}
})
},
ttPrePay(ttData, largeType) {
if (!tt.canIUse('requestOrder')) {
......
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