培训班修改+充值支付方式

This commit is contained in:
liuyuan
2025-04-18 09:07:37 +08:00
parent 8c83683966
commit 06f8fcc1a0
15 changed files with 1133 additions and 900 deletions

View File

@@ -76,7 +76,7 @@
<text v-else> {{ v.text }}</text>
</view>
<template v-if="isDefaultCurrency">
<radio :value="v.value" color="#7dc1f0" v-if="i == 2"
<radio :value="v.value" color="#7dc1f0" v-if="$platform != 'ios'&&i == 2||$platform == 'ios'&&i == 0"
:checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" />
</template>
<template v-else>
@@ -133,8 +133,8 @@
<template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box"><text class="number">{{ number }}</text>
<text class="price">合计
<text class="total">{{ actualPayment }}</text>
<text class="total" v-if="actualPayment==0">{{jfNumber}}积分</text>
<text class="total" v-else>{{ actualPayment }}</text>
</text>
</view>
</template>
@@ -231,6 +231,7 @@ export default {
initData: {}, //积分
user: {},
name: '', //姓名
buyStatus: false
};
},
onLoad(options) {
@@ -392,14 +393,20 @@ export default {
},
//下单
async goBuyJie() {
if(!this.name){
uni.showToast({
title: "培训姓名不能为空",
icon: 'none'
});
return
}
debounce(async () => {
uni.showLoading({
title: '加载中'
});
if(!this.name){
uni.showToast({
title: "培训姓名不能为空",
icon: 'none'
});
uni.hideLoading()
return
}
var that = this;
let data = {
paymentMethod: that.payType,
@@ -423,6 +430,7 @@ export default {
})
.then(async (res) => {
if (res.code == 0) {
uni.hideLoading()
if (res.orderSn == null) {
uni.showToast({
title: "失败,请重新下单",
@@ -453,8 +461,8 @@ export default {
title: "支付成功",
});
setTimeout(() => {
uni.switchTab({
url: '/pages/bookShop/orderList'
uni.navigateTo({
url: '/pages/trainingCourse/index'
})
}, 1000);
} else {
@@ -480,8 +488,8 @@ export default {
title: "支付成功",
});
setTimeout(() => {
uni.switchTab({
url: '/pages/bookShop/orderList'
uni.navigateTo({
url: '/pages/trainingCourse/index'
})
}, 1000);
} else {
@@ -506,16 +514,20 @@ export default {
icon: "success",
});
setTimeout(() => {
uni.switchTab({
url: '/pages/bookShop/orderList'
uni.navigateTo({
url: '/pages/trainingCourse/index'
})
}, 1000);
}
}
// that.buyStatus = false;
}
uni.removeStorageSync('mynavData');
})
.catch(()=>{
uni.hideLoading()
});
}, 200);
}, 400);
},
radioChange(index) {