更新:培训班可自定义报名支付方式

This commit is contained in:
2025-10-29 15:24:42 +08:00
parent e7f3cc7c65
commit 26c81cef98
20 changed files with 16216 additions and 16134 deletions

View File

@@ -4,6 +4,9 @@
"version" : "0.0",
"configurations" : [
{
"app" : {
"launchtype" : "local"
},
"app-plus" : {
"launchtype" : "remote"
},

View File

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

View File

@@ -6,12 +6,15 @@
"request" : 15000
},
"transformPx" : false,
"icons": [{
"icons" : [
{
"sizes" : "分辨率192x192",
"src" : "图片路径"
}],
"versionName": "2.0.27",
"versionCode": 2027,
}
],
"versionName" : "2.0.29",
"versionCode" : 2028,
"sassImplementationName" : "node-sass",
"app-plus" : {
"nvueCompiler" : "uni-app",
"compatible" : {
@@ -437,3 +440,4 @@
}
}
// 小程序特有相关

View File

@@ -3,6 +3,11 @@
<!-- 公共组件-每个页面必须引入 -->
<public-module></public-module>
<z-nav-bar title="免费课程"></z-nav-bar>
<!-- <view class="tabsBox" :class="[fixed ? 'fixed' : '' ]">
<u-tabs v-if="tabList.length > 0" :class="['tabList']" @click="fatherClick" :current="curTagId"
:activeStyle="activeStyle" :scrollable="scrollable" :list="tabList"
itemStyle="padding-left: 15px; background-color:#fff; padding-right: 15px; height: 50px;"></u-tabs>
</view> -->
<view class="learnBox box" >
<view class="newBox">
<view class="item flexbox" v-for="(item, index) in courseList" :key="index" @click="onPageJump('/pages/course/courseDetail',item.id, item.title)">

View File

@@ -59,7 +59,7 @@
</view>
</view>
</view>
<view class="order_top common_radius_box color_shandow goods_box pay_box">
<view v-if="!!actualPayment" class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">支付方式</view>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
@@ -175,7 +175,7 @@ export default {
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
this.payType = this.payList.length && this.payList[this.selectPayIndex].type;
if (this.actualPayment == 0) {
var that = this;
this.payList.forEach((e, i) => {
@@ -208,11 +208,6 @@ export default {
{
type: 1,
text: '商品总价',
},
{
type: 2,
imgUrl: require("@/static/icon/jifen.png"),
text: '积分',
}
],
number: 1,
@@ -236,6 +231,13 @@ export default {
},
onLoad(options) {
this.options = JSON.parse(options.data);
if (!!this.options.displayJf) {
this.priceBreakdownList.push({
type: 2,
imgUrl: require("@/static/icon/jifen.png"),
text: '积分',
})
}
if (platform == "ios") {
this.payList = [
{
@@ -248,28 +250,33 @@ export default {
this.selectPayIndex = 0;
this.payType = 4;
} else {
this.payList = [
{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
{
const payType = this.options.payType.split(',')
const payListKey = {
1: {
text: "微信",
imgUrl: require("@/static/icon/pay_2.png"),
type: 1,
value: "1",
},
{
2: {
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
value: "0",
},
4: {
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
},
];
this.selectPayIndex = 1;
this.payType = 1;
}
}
payType.forEach((item) => {
this.payList.push(payListKey[item])
})
const hasWX = payType.includes('1')
this.selectPayIndex = 0;
this.payType = this.payList[0].type;
}
this.getUserInfo();
},
@@ -347,6 +354,7 @@ export default {
if (this.actualPayment == 0) {
this.isDefaultCurrency = true;
var that = this;
// 如果支付方式中有天医币,则默认天医币
this.payList.forEach((e, i) => {
if (e.type == 4) {
that.selectPayIndex = i;
@@ -362,7 +370,10 @@ export default {
},
//获取总金额
getTotalPrice(userInfo) {
if (userInfo.jf >= this.options.price) {
if (!this.options.displayJf) {
this.jfNumber = 0;
this.jfNumberMax = 0;
} else if (userInfo.jf >= this.options.price) {
this.jfNumber = this.options.price;
this.jfNumberMax = this.options.price;
} else {
@@ -405,7 +416,7 @@ export default {
});
var that = this;
let data = {
paymentMethod: that.payType,
paymentMethod: this.actualPayment ? that.payType : 4, // 如果没有实付金额强制传天医币
orderMoney: that.options.price,
jfDeduction: that.jfNumber,
realMoney: that.actualPayment,
@@ -433,7 +444,16 @@ export default {
icon: "none"
});
} else {
if (that.payType == 2) {
if (!this.actualPayment) {
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
uni.navigateTo({
url: '/pages/trainingCourse/index'
})
}, 1000);
} else if (that.payType == 2) {
// 常规支付
uni.showToast({
title: "正在支付",

View File

@@ -49,6 +49,7 @@
<script>
import $http from '@/config/requestConfig.js';
const { platform } = uni.getSystemInfoSync();
export default {
data() {
@@ -114,11 +115,20 @@ export default {
id: item.id,
title: item.title,
price: item.finalFee,
identity: item.identity
identity: item.identity,
payType: item.payType,
displayJf: item.displayJf
}
if (platform == "ios" && !item.payType.includes('4')) {
uni.showToast({
title: "当前不能在线报名,请联系客服",
icon: 'none'
})
} else {
uni.navigateTo({
url: '/pages/order/index?data='+JSON.stringify(data),
});
}
},
//联系客服
goToContact(item){

View File

@@ -17,7 +17,7 @@ universalLinks_weibo=
spaceid_weibo=
[appstore]
appstore=8b68d95000cd13cbce3099b5723765ec
appstore=
[iphone]
app%402x=57c603a7e76e93d4e909d70bc4f1c391

View File

@@ -1,3 +1,3 @@
iosProfile=C:/Users/Administrator/Desktop/medicine_new/kaifa/medicine_development (1).mobileprovision
ioscertFile=C:/Users/Administrator/Desktop/medicine_new/kaifa/证书.p12
iosProfile=C:/Users/Administrator/Desktop/证书/medicine_new/kaifa/medicine_development (1).mobileprovision
ioscertFile=C:/Users/Administrator/Desktop/证书/medicine_new/kaifa/证书.p12
ioscertPassword=ai6IL9ZPZlB8nFR8AdVmIQ==

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

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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long