Commit 174dd9e9 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent a75301cc
......@@ -16,7 +16,7 @@
</view>
<view class="section">
<view>支付方式</view>
<view>微信</view>
<view>抖音</view>
</view>
<text class="unsignbutton" @click="unsign">取消自动续费</text>
......
......@@ -224,14 +224,19 @@
if (!tt.canIUse('sign')) {
message.notify('请升级抖音APP版本.');
return
}
}
tt.showLoading({
title: '加载中...'
});
let that = this;
tt.createSignOrder({
businessType: ttData.params.businessType,
data: ttData.params.data,
byteAuthorization: ttData.params.byteAuthorization,
success: (res) => {
success: (res) => {
tt.hideLoading();
tt.sign({
businessType: ttData.params.businessType,
orderId: res.authOrderId,
......@@ -244,7 +249,8 @@
}
})
},
fail: (res) => {
fail: (res) => {
tt.hideLoading();
// this.slotParam = JSON.stringify(res);
// this.$refs.select.open('center');
// console.log('createSignOrdercreateSignOrder->:', JSON.stringify(res));
......@@ -256,7 +262,11 @@
if (!tt.canIUse('requestOrder')) {
message.notify('请升级抖音APP版本!');
return
}
}
tt.showLoading({
title: '加载中...'
});
let that = this;
tt.requestOrder({
......@@ -265,13 +275,16 @@
success(res) {
that.ttPay(largeType, res.orderId, ttData);
},
fail(res) {
fail(res) {
tt.hideLoading();
// message.notify(res.errMsg);
console.log('requestOrder res.errMsg', res)
},
});
},
ttPay(largeType, oid, ttData) {
ttPay(largeType, oid, ttData) {
tt.hideLoading();
if (!tt.canIUse('getOrderPayment')) {
message.notify('请升级抖音APP版本~');
return
......
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