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

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

@@ -2,12 +2,12 @@ let baseUrl = "";
let socketUrl = ""; let socketUrl = "";
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// 开发环境 // 开发环境
//baseUrl = "https://api.nuttyreading.com/"; //线上正式 baseUrl = "https://api.nuttyreading.com/"; //线上正式
baseUrl = "http://192.168.110.100:9200/pb/"; //张川川 //baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
// 生产环境11 // 生产环境11
baseUrl = "https://api.nuttyreading.com/"; baseUrl = "https://api.nuttyreading.com/";
// baseUrl = "http://192.168.110.100:9200/pb/"; //张川川 //baseUrl = "http://192.168.110.100:9200/pb/"; //张川川
} }
const courtConfig = { const courtConfig = {
//微信公众号APPID1 //微信公众号APPID1

View File

@@ -12,8 +12,8 @@
"src" : "图片路径" "src" : "图片路径"
} }
], ],
"versionName" : "2.0.07", "versionName" : "2.0.08",
"versionCode" : 2007, "versionCode" : 2008,
"app-plus" : { "app-plus" : {
"nvueCompiler" : "uni-app", "nvueCompiler" : "uni-app",
"compatible" : { "compatible" : {

View File

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

View File

@@ -128,9 +128,13 @@
<view class="xiugai boxShadow box_fillet"> <view class="xiugai boxShadow box_fillet">
<common-list :dataList="pageList" @hancleClick="handleClickTab" label="name"> <common-list :dataList="pageList" @hancleClick="handleClickTab" label="name">
<template slot="rightSlot" slot-scope="slotProps"> <template slot="rightSlot" slot-scope="slotProps">
<text class="fdButtonBox aui-text-success"               <text
style="line-height: 40rpx; font-size: 50rpx;">{{ slotProps.row.content }}</text>                 class="fdButtonBox aui-text-success"
</template>                 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> </common-list>
</view> </view>
</view> </view>
@@ -182,7 +186,7 @@
} from "vuex"; } from "vuex";
export default { export default {
data() { data() {
return { return {hufenNumber: 0,
roleObj: {}, roleObj: {},
infoShow: false, // 显示电子书相关 infoShow: false, // 显示电子书相关
showEbook: false, // 显示电子书相关 showEbook: false, // 显示电子书相关
@@ -211,7 +215,7 @@
{ {
name: "我的湖分", name: "我的湖分",
url: "/pages/hufen/hufen", url: "/pages/hufen/hufen",
type: "pageJump", type: "pageJump", contentType: "hufen",
}, },
{ {
name: "个人资料", name: "个人资料",
@@ -253,6 +257,7 @@
async onShow() { async onShow() {
this.getData(); this.getData();
this.getUserRole() this.getUserRole()
this.gethufenData();
await this.getUserCouponList() await this.getUserCouponList()
//获取vip身份 //获取vip身份
this.textList = []; this.textList = [];
@@ -264,6 +269,20 @@
//方法 //方法
methods: { methods: {
...mapMutations(["setUserInfo"]), ...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(){ async getUserCouponList(){
await this.$http await this.$http

View File

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

View File

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

View File

@@ -76,7 +76,7 @@
<text v-else> {{ v.text }}</text> <text v-else> {{ v.text }}</text>
</view> </view>
<template v-if="isDefaultCurrency"> <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" /> :checked="selectPayIndex == i ? true : false" @click="radioChange(i)" size="10" />
</template> </template>
<template v-else> <template v-else>
@@ -133,8 +133,8 @@
<template slot="leftSlot" slot-scope="slotProps"> <template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box"><text class="number">{{ number }}</text> <view class="price_box order_bottom_box"><text class="number">{{ number }}</text>
<text class="price">合计 <text class="price">合计
<text class="total" v-if="actualPayment==0">{{jfNumber}}积分</text>
<text class="total">{{ actualPayment }}</text> <text class="total" v-else>{{ actualPayment }}</text>
</text> </text>
</view> </view>
</template> </template>
@@ -231,6 +231,7 @@ export default {
initData: {}, //积分 initData: {}, //积分
user: {}, user: {},
name: '', //姓名 name: '', //姓名
buyStatus: false
}; };
}, },
onLoad(options) { onLoad(options) {
@@ -392,14 +393,20 @@ export default {
}, },
//下单 //下单
async goBuyJie() { async goBuyJie() {
if(!this.name){
uni.showToast({
title: "培训姓名不能为空",
icon: 'none'
});
return
}
debounce(async () => { debounce(async () => {
uni.showLoading({
title: '加载中'
});
if(!this.name){
uni.showToast({
title: "培训姓名不能为空",
icon: 'none'
});
uni.hideLoading()
return
}
var that = this; var that = this;
let data = { let data = {
paymentMethod: that.payType, paymentMethod: that.payType,
@@ -423,6 +430,7 @@ export default {
}) })
.then(async (res) => { .then(async (res) => {
if (res.code == 0) { if (res.code == 0) {
uni.hideLoading()
if (res.orderSn == null) { if (res.orderSn == null) {
uni.showToast({ uni.showToast({
title: "失败,请重新下单", title: "失败,请重新下单",
@@ -453,8 +461,8 @@ export default {
title: "支付成功", title: "支付成功",
}); });
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.navigateTo({
url: '/pages/bookShop/orderList' url: '/pages/trainingCourse/index'
}) })
}, 1000); }, 1000);
} else { } else {
@@ -480,8 +488,8 @@ export default {
title: "支付成功", title: "支付成功",
}); });
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.navigateTo({
url: '/pages/bookShop/orderList' url: '/pages/trainingCourse/index'
}) })
}, 1000); }, 1000);
} else { } else {
@@ -506,16 +514,20 @@ export default {
icon: "success", icon: "success",
}); });
setTimeout(() => { setTimeout(() => {
uni.switchTab({ uni.navigateTo({
url: '/pages/bookShop/orderList' url: '/pages/trainingCourse/index'
}) })
}, 1000); }, 1000);
} }
} }
// that.buyStatus = false;
} }
uni.removeStorageSync('mynavData'); uni.removeStorageSync('mynavData');
})
.catch(()=>{
uni.hideLoading()
}); });
}, 200); }, 400);
}, },
radioChange(index) { 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">活动类型<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.year}}</text>
<text class="list_item_text">培训日期{{item.trainingDate}}{{item.endDate}}</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;"> <view style=" display: flex; align-items: center;">
<uni-button class="list_item_btn" @click="goToDetail(item)">了解详情</uni-button> <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_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>
</view> </view>
@@ -32,6 +37,13 @@
<view class="zanwu" v-if="nullStatus">暂无数据</view> <view class="zanwu" v-if="nullStatus">暂无数据</view>
<z-navigation></z-navigation> <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> </view>
</template> </template>
@@ -44,6 +56,7 @@ export default {
list: [], list: [],
nullStatus: false, nullStatus: false,
year: '', year: '',
showCodeImg: false,
} }
}, },
onLoad(e) { onLoad(e) {
@@ -107,6 +120,21 @@ export default {
url: '/pages/order/index?data='+JSON.stringify(data), 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> </script>
@@ -144,12 +172,12 @@ export default {
padding-bottom: 10rpx; padding-bottom: 10rpx;
} }
.list_item_text{ .list_item_text{
font-size: 26rpx; font-size: 28rpx;
color: #666; color: #666;
line-height: 40rpx; line-height: 42rpx;
} }
.list_item_btn{ .list_item_btn{
margin-top: 10rpx; margin-top: 15rpx;
width: 150rpx; width: 150rpx;
height: 50rpx; height: 50rpx;
text-align: center; text-align: center;
@@ -163,6 +191,11 @@ export default {
margin-left: 10rpx; margin-left: 10rpx;
background-image: linear-gradient(90deg, #ff1f00 0%, #fa9f93 100%); 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{ .statusBg{
position: absolute; position: absolute;
right: 0; right: 0;
@@ -189,4 +222,15 @@ export default {
font-size: 26rpx; font-size: 26rpx;
padding-right: 20rpx; 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> </style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long