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

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

@@ -21,7 +21,7 @@
color: #258feb !important;
font-weight: bold;
"
>{{ slotProps.row.score }}</text
>{{ slotProps.row.score }}<text style="font-size: 30rpx;margin-left: 4rpx;">湖分</text></text
>
</template>
</common-list>
@@ -150,16 +150,16 @@ export default {
var str = "";
switch (type) {
case "01":
case "1":
return "在线教学";
case "03":
case "3":
return "学术期刊";
case "05":
case "5":
return "太湖讲堂";
case "07":
case "7":
return "创作技术";
case "11":
@@ -205,7 +205,7 @@ export default {
if (res.code == 0 && res.list.length > 0) {
this.tabList = [];
this.tabList = res.list.map((e) => {
return { ...e, name: this.getPointsType(e.type) };
return { ...e, name: e.dict_value };
});
} else {
this.tabList = [];

View File

@@ -128,9 +128,13 @@
<view class="xiugai boxShadow box_fillet">
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
<template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success"
style="line-height: 40rpx; font-size: 50rpx;">{{ slotProps.row.content }}</text>
</template>
              <text
                class="fdButtonBox aui-text-success"
                v-if="slotProps.row.contentType&&slotProps.row.contentType == 'hufen'&&hufenNumber>0"
                style="line-height: 40rpx; font-size: 40rpx;color: #258feb;float: right;"
                >{{ hufenNumber }}<text style="font-size: 30rpx;margin-left: 4rpx;">湖分</text></text
              >
            </template>
</common-list>
</view>
</view>
@@ -182,7 +186,7 @@
} from "vuex";
export default {
data() {
return {
return {hufenNumber: 0,
roleObj: {},
infoShow: false, // 显示电子书相关
showEbook: false, // 显示电子书相关
@@ -211,7 +215,7 @@
{
name: "我的湖分",
url: "/pages/hufen/hufen",
type: "pageJump",
type: "pageJump", contentType: "hufen",
},
{
name: "个人资料",
@@ -253,6 +257,7 @@
async onShow() {
this.getData();
this.getUserRole()
this.gethufenData();
await this.getUserCouponList()
//获取vip身份
this.textList = [];
@@ -264,6 +269,20 @@
//方法
methods: {
...mapMutations(["setUserInfo"]),
  async gethufenData() {
      await this.$http
        .post("common/userContribution/getUserContribution")
        .then((res) => {
          console.log("res at line 296:", res);
          if (res.code == 0) {
            this.hufenNumber = res.total;
          } else {
          }
        })
        .catch((e) => {
          console.log(e, "报错");
        });
    },
// 获取用户优惠券列表
async getUserCouponList(){
await this.$http

View File

@@ -72,7 +72,8 @@
<template slot="labelSlot" slot-scope="slotProps">
<view class="label_content AC_List">
<view class="left">
<view class="title">{{ slotProps.row.orderType }}</view>
<view class="title" v-if="slotProps.row.productName">{{ slotProps.row.productName }}</view>
<view class="title" v-else>{{ slotProps.row.orderType }}</view>
</view>
<view
:class="`right ${
@@ -292,7 +293,7 @@ export default {
if(data.relationId){
uni.navigateTo({
url: "/pages/bookShop/orderLCont?orderId=" +
id
data.relationId
});
}
@@ -433,26 +434,23 @@ export default {
.AC_List {
overflow: hidden;
.left {
width: calc(100% - 220rpx) !important;
width: calc(100% - 120rpx) !important;
font-weight: 700;
float: left;
color: #333;
font-size: 32rpx;
line-height: 60rpx;
line-height: 44rpx;
}
.right {
display: block;
width: 200rpx !important;
width: 120rpx !important;
float: right;
text-align: right;
font-size: 32rpx;
font-weight: 700;
color: #333;
}
// border-bottom: 1px solid #eee;
// padding: 40rpx 10rpx;
}
.AC_title {
font-size: 32rpx;
margin-bottom: 20rpx;
@@ -469,14 +467,14 @@ export default {
font-size: 28rpx;
margin-top: 20rpx;
margin-bottom: 15rpx;
// white-space: nowrap;
color: #888;
float: left;
display: inline-block;
}
.AC_time {
color: #bababa;
font-size: 28rpx;
display: inline-block;
}
}
}

View File

@@ -182,7 +182,11 @@
// 隐藏原生的tabbar
uni.hideTabBar();
this.chargeOrderSn = options.orderSn;
// console.log(e.orderSn,'orderSn')
if (this.$platform == "ios") {
this.payType = 3;
} else {
this.payType = 1;
}
},
//页面显示
onShow() {

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) {

View File

@@ -18,10 +18,15 @@
<text class="list_item_text">活动类型<span v-if="item.type==1">线上</span><span v-else>线下</span></text>
<text class="list_item_text">活动年份{{item.year}}</text>
<text class="list_item_text">培训日期{{item.trainingDate}}{{item.endDate}}</text>
<text class="list_item_text">培训价格<span style="color: red;">{{item.finalFee}}</span></text>
<text class="list_item_text">培训价格
<span style="color: red; font-size: 32rpx; font-weight: bold;">{{item.finalFee}}</span>
<span style="text-decoration: line-through; padding-left: 15rpx;" v-if="Number(item.finalFee)!=item.fee">{{item.fee}}</span>
</text>
<text class="list_item_text" style=" font-size: 24rpx;" v-if="Number(item.finalFee)!=item.fee">{{item.identity}}身份报名享优惠折扣</text>
<view style=" display: flex; align-items: center;">
<uni-button class="list_item_btn" @click="goToDetail(item)">了解详情</uni-button>
<uni-button class="list_item_btn list_item_btn_bm" @click="goToBuy(item)" v-if="item.isJoin!=1&&item.singupFlag!=0">立即报名</uni-button>
<uni-button class="list_item_btn list_item_btn_ybm" @click="goToContact(item)" v-if="item.isJoin==1&&item.singupFlag!=0">已报名联系客服</uni-button>
</view>
</view>
@@ -32,6 +37,13 @@
<view class="zanwu" v-if="nullStatus">暂无数据</view>
<z-navigation></z-navigation>
<u-popup key="1" v-if="showCodeImg" :show="showCodeImg" :round="10" @close="closePup">
<view class="box6">
<text>非常感谢您报名我们的培训班<br/>您可以添加客服微信我们会邀请您进培训群</text>
<image @click="previewImage('/static/qiyeWx.jpg')" src="/static/qiyeWx.jpg" mode="widthFix" style="width: 100px; height: 100px; margin: 0 auto;"></image>
</view>
</u-popup>
</view>
</template>
@@ -44,6 +56,7 @@ export default {
list: [],
nullStatus: false,
year: '',
showCodeImg: false,
}
},
onLoad(e) {
@@ -107,6 +120,21 @@ export default {
url: '/pages/order/index?data='+JSON.stringify(data),
});
},
//联系客服
goToContact(item){
this.showCodeImg = true;
},
//关闭弹窗
closePup(){
this.showCodeImg = false;
},
//放大图片
previewImage(url) {
this.showCodeImg = false
uni.previewImage({
urls: [url],
});
},
},
}
</script>
@@ -144,12 +172,12 @@ export default {
padding-bottom: 10rpx;
}
.list_item_text{
font-size: 26rpx;
font-size: 28rpx;
color: #666;
line-height: 40rpx;
line-height: 42rpx;
}
.list_item_btn{
margin-top: 10rpx;
margin-top: 15rpx;
width: 150rpx;
height: 50rpx;
text-align: center;
@@ -163,6 +191,11 @@ export default {
margin-left: 10rpx;
background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%);
}
.list_item_btn_ybm{
width: 200rpx;
margin-left: 10rpx;
background-image: linear-gradient(90deg, #ff8d00 0%, #f5c350 100%);
}
.statusBg{
position: absolute;
right: 0;
@@ -189,4 +222,15 @@ export default {
font-size: 26rpx;
padding-right: 20rpx;
}
.box6{
padding: 20rpx;
}
.box6 text{
display: block;
text-align: center;
color: #999;
margin-bottom: 20rpx;
font-size: 28rpx;
line-height: 36rpx;
}
</style>