Commit 1d7db962 authored by mengcuiguang's avatar mengcuiguang

添加快手支付

parent 361662c2
......@@ -157,7 +157,19 @@
// 快手支付
// #ifdef MP-KUAISHOU
this.post({
url: '/vip/getVipPayParams/kuaishou',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid
},
showLoading: true,
success: ({
data
}) => {
that.ksPay(data, vipBean.largeType);
}
});
// #endif
// 抖音支付
......@@ -195,6 +207,20 @@
// #endif
},
ksPay(ksData, largeType) {
let that = this;
ks.pay({
serviceId: ksData.params.serviceId,
orderInfo: ksData.params.orderInfo,
paymentChannel: ksData.params.paymentChannel,
success() {
that.queryOrderStatus(largeType, ksData.tidStr)
},
fail() {
message.notify('支付失败');
},
})
},
ttPay(ttData, largeType) {
let that = this;
......@@ -204,14 +230,13 @@
order_token: ttData.params.order_token,
},
service: 5,
success(res) {
success(res) {
if (res.code == 0) {
// 拉取服务器,是否支付成功
that.queryOrderStatus(largeType, ttData.tidStr)
}
},
fail(res) {
fail(res) {
message.notify(res.errMsg);
},
});
......
......@@ -193,7 +193,8 @@
"mp-kuaishou" : {
"uniStatistics" : {
"enable" : false
}
},
"appid" : "ks702843017315155644"
},
"mp-lark" : {
"uniStatistics" : {
......
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