This commit is contained in:
2025-04-14 15:55:13 +08:00
19 changed files with 36993 additions and 31541 deletions

View File

@@ -12,8 +12,8 @@
"src" : "图片路径"
}
],
"versionName" : "2.0.03",
"versionCode" : 2003,
"versionName" : "2.0.04",
"versionCode" : 2004,
"app-plus" : {
"nvueCompiler" : "uni-app",
"compatible" : {

4983
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -562,7 +562,15 @@ export default {
} else {
this.selectPayIndex = 0;
}
} else {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
if (this.actualPayment == 0) {
var that = this;
this.payList.forEach((e, i) => {
@@ -573,14 +581,6 @@ export default {
});
this.$forceUpdate();
}
} else {
if (platform == "ios") {
this.selectPayIndex = 0;
} else {
this.selectPayIndex = 0;
}
}
this.payType = this.payList[this.selectPayIndex].type;
this.$forceUpdate();
},
},
@@ -1406,6 +1406,17 @@ export default {
}, 5000);
let xiaBiao = [];
let data = {};
if (
this.payType == 4 &&
this.initData.user.peanutCoin < Number(this.actualPayment)
) {
uni.showToast({
title: "天医币余额不足",
icon: "none",
});
return;
}
if (this.options.isFudu) {
data = {
jfDeduction: this.jfNumber,

View File

@@ -21,6 +21,7 @@
<view class="vip_qx_v">一年<text class="vip_fee line">{{item.originalPrice||0}}</text></view>
</view>
<view v-if="$platform!='ios'">
<text class="vip_item_btn" v-if="item.state==null" @click="openorderModal(item,0)">去办理</text>
<text class="vip_item_btn" v-else @click="openorderModal(item,0)">去续费</text>
</view>
@@ -141,7 +142,7 @@ export default{
this.selectVipData.title = item.title + '-' + item.year + '年';
this.selectVipData.lastFee = item.rebateFee;
this.selectVipData.state=item.state;
this.orderModalShow = true;
console.log('-----selectVipData-----',this.selectVipData)
this.$nextTick(() => {

View File

@@ -1,5 +1,8 @@
<template>
<view class="container commonDetailPage" style="background-color: #fff !important">
<view
class="container commonDetailPage"
style="background-color: #fff !important"
>
<!-- 公共组件-每个页面必须引入 -->
<view class="contentBox commonPageContentBox order_box">
@@ -7,53 +10,107 @@
<view class="pay_title">支付方式</view>
<view style="margin-bottom: 20rpx" v-if="!dataInfo.list">
<u-tag :text="`已选:${dataInfo.title}`" bgColor="#DCF2FA" borderColor="#DCF2FA" color="#258feb"
plain></u-tag>
<u-tag
:text="`已选:${dataInfo.title}`"
bgColor="#DCF2FA"
borderColor="#DCF2FA"
color="#258feb"
plain
></u-tag>
</view>
<view v-if="dataInfo.list && dataInfo.list.length > 0">
{{dataInfo.list[0].title}}<text v-if="dataInfo.type==1">延期价格</text><text v-else>价格</text>
<text v-for="(item,index) in dataInfo.list" :key="index"
{{ dataInfo.list[0].title
}}<text v-if="dataInfo.type == 1">延期价格</text
><text v-else>价格</text>
<text
v-for="(item, index) in dataInfo.list"
:key="index"
class="list_choose"
:class="activeIndex == index ? 'list_choose_active' : ''"
@click="chooseYear(item, index)">{{item.year}}</text>
@click="chooseYear(item, index)"
>{{ item.year }}</text
>
</view>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
<view
class="curriulum_title_box goods_item pay_item"
v-for="(v, i) in payList"
>
<view :class="i != 2 ? 'bgGrey top' : 'top'">
<view class="left">
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
<image
class="pay_item_img"
:src="v.imgUrl"
mode="aspectFil"
:style="v.style"
>
</image>
<template v-if="v.type == 4">
<text> {{ v.text }}</text>
<text style="color: #258feb; font-weight: 600; margin-left: 10rpx">
<text
style="color: #258feb; font-weight: 600; margin-left: 10rpx"
>
(余额{{
initData && initData.user ? initData.user.peanutCoin : 0
}})</text>
}})</text
>
</template>
<text v-else> {{ v.text }}</text>
</view>
<radio :value="v.value" color="#258feb" :checked="selectPayIndex == i ? true : false"
@click="radioChange(i)" size="10" />
<template v-if="isDefaultCurrency">
<radio
v-if="i == 2"
:value="v.value"
color="#258feb"
:checked="selectPayIndex == i ? true : false"
@click="radioChange(i)"
size="10"
/>
</template>
<template v-else>
<radio
:value="v.value"
color="#258feb"
:checked="selectPayIndex == i ? true : false"
@click="radioChange(i)"
size="10"
/>
</template>
</view>
</view>
<template v-if="selectPayIndex == 2 || $platform == 'ios'">
<view class="goods_detail_list_title bg_box_shandow color_shandow bg_color">
<view class="linlanzhifu" style="
<view
class="goods_detail_list_title bg_box_shandow color_shandow bg_color"
>
<view
class="linlanzhifu"
style="
width: 100%;
overflow: hidden;
justify-content: space-between;
">
"
>
<view class="linlanzhifu">
<u-icon name="error-circle" color="#258feb" size="20"
style="display: inline-block; margin-right: 10rpx"></u-icon>
<u-icon
name="error-circle"
color="#258feb"
size="20"
style="display: inline-block; margin-right: 10rpx"
></u-icon>
确保您的天医币足够支付
</view>
<text class="fdButtonBox aui-text-danger fdButtonBoxRed" style="float: right"
@click="onPageJump('/pages/mine/wallet/recharge/index?source=order')">立即充值</text>
<text
class="fdButtonBox aui-text-danger fdButtonBoxRed"
style="float: right"
@click="
onPageJump('/pages/mine/wallet/recharge/index?source=order')
"
>立即充值</text
>
</view>
<view class="other_info" style="margin-top: 12rpx">
@@ -61,19 +118,28 @@
<view class="explain"> 1. 1天医币 = 1元人民币 </view>
<view class="explain">
2.若有疑问或意见请致电客服
<span style="font-size: 15px"><u @click="gotoPhone">022-24142321</u></span>
<span style="font-size: 15px"
><u @click="gotoPhone">022-24142321</u></span
>
</view>
<view class="explain">
3.非中国大陆用户可以信用卡支付简单快捷推荐使用
支付时使用的信用卡需要带有Visa或MasterCard的标识请向邮箱
<text @click="fnCopy('publisher@tmrjournals.com', '邮箱')" class="aui-text-success"
style="text-decoration: underline; color: #258feb">
<text
@click="fnCopy('publisher@tmrjournals.com', '邮箱')"
class="aui-text-success"
style="text-decoration: underline; color: #258feb"
>
publisher@tmrjournals.com
</text>
点击复制发送支付请求内容需包含拟购买的课程名称支付金额APP注册姓名及手机号码或者加一路健康客服微信
<text class="aui-text-success" @click="fnCopy('yilujiankangkefu', '微信名')"
style="text-decoration: underline; color: #258feb">
yilujiankangkefu </text>点击复制联系我们我们将在24小时内向您的邮箱或者微信发送支付链接根据提示即可完成信用卡支付无需兑换外币
<text
class="aui-text-success"
@click="fnCopy('yilujiankangkefu', '微信名')"
style="text-decoration: underline; color: #258feb"
>
yilujiankangkefu </text
>点击复制联系我们我们将在24小时内向您的邮箱或者微信发送支付链接根据提示即可完成信用卡支付无需兑换外币
</view>
</view>
</view>
@@ -81,20 +147,55 @@
</view>
<template>
<common-sticky label="title" :itemStyle="`width:${
<view class="bottom jf_box" v-if="dataInfo.state != null">
<view class="jf_box">
<text style="color: #258feb; font-weight: 600"
>可用积分({{ jfNumberMax }})</text
>
<view class="jf_input">
<u--input
type="number"
@input="handleChangejf"
@clear="jfNumber = 0"
:max="jfNumberMax"
:min="0"
v-model="jfNumber"
placeholder="请输入积分"
border="surround"
clearable
></u--input>
</view>
</view>
</view>
<common-sticky
label="title"
:itemStyle="`width:${
cateList.length == 2 ? '50' : '33'
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`" :list="cateList"
:currentCateIndex="currentCateIndex" @handleselectCate="handleselectCate">
}%;padding-left: 15px; padding-right: 15px; height: 68rpx;`"
:list="cateList"
:currentCateIndex="currentCateIndex"
@handleselectCate="handleselectCate"
>
</common-sticky>
</template>
</view>
<view class="goods_nav_box">
<common-goods-nav :iconList="[]" :customButton="customButton" @submit="goBuyJie">
<common-goods-nav
:iconList="[]"
:customButton="customButton"
@submit="goBuyJie"
>
<!-- leftSlot -->
<template slot="leftSlot" slot-scope="slotProps">
<view class="price_box order_bottom_box">
<text class="price">合计
<text class="total">{{ dataInfo.lastFee }}</text>
<text class="price"
>合计
<text class="total"
>{{ dataInfo.lastFee - jfNumber }}
<text v-if="jfNumber > 0" style="margin-left: 10rpx"
>+ {{ jfNumber }}积分</text
>
</text>
</text>
</view>
</template>
@@ -102,11 +203,20 @@
<view class="agree_wo">
<radio-group class="agree">
<view v-for="(item, index) in argee" :key="index">
<radio class="agreeRadio" :value="item.id" :checked="item.id == radioValue" color="#7dc1f0"
@click="radioCheck(index)"></radio>
<radio
class="agreeRadio"
:value="item.id"
:checked="item.id == radioValue"
color="#7dc1f0"
@click="radioCheck(index)"
></radio>
</view>
</radio-group>
<view>* 我已阅读并同意<span class="highlight" @click="showXieyi">会员服务协议</span></view>
<view
>* 我已阅读并同意<span class="highlight" @click="showXieyi"
>会员服务协议</span
></view
>
</view>
</view>
<!-- 会员协议 -->
@@ -123,16 +233,10 @@
<script>
import courseDescription from "@/pages/component/commonComponents/list";
import {
setPay,
setPayAssign,
setWXPay
} from "@/config/utils";
import { setPay, setPayAssign, setWXPay } from "@/config/utils";
import $http from "@/config/requestConfig.js";
const { platform } = uni.getSystemInfoSync();
import {
mapState
} from "vuex";
import { mapState } from "vuex";
export default {
props: ["dataInfo"],
components: {
@@ -143,11 +247,11 @@
immediate: true,
handler(newRoute) {
if (this.dataInfo.list && this.dataInfo.list.length > 0) {
this.dataInfo.lastFee = this.dataInfo.list[0].rebateFee
}
}
this.dataInfo.lastFee = this.dataInfo.list[0].rebateFee;
}
},
},
},
data() {
return {
isDefaultCurrency: false,
@@ -225,18 +329,22 @@
addressList: "common/userAddress/getUserAddress",
freightNum: "book/buyOrder/calculateTransportPrice", //运费
},
customButton: [{
customButton: [
{
width: "160rpx",
text: "立即支付",
backgroundColor: "linear-gradient(90deg, #3C77BE 0%,#258feb 100%)",
color: "#fff",
}, ],
customButtonGroup1: [{
},
],
customButtonGroup1: [
{
with: 200,
text: "确定",
backgroundColor: "linear-gradient(90deg, #3C77BE 0%,#258feb 100%)",
color: "#fff",
}, ],
},
],
activeIndex: 0, //选择付款 下标
argee: [{ value: false, id: "1" }], // 同意权限
@@ -250,18 +358,20 @@
},
created() {
//判断是什么系统
if(platform=='ios'){
if (platform == "ios") {
this.payList = [
{
text: "天医币",
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
}]
},
];
this.selectPayIndex = 0;
this.payType=4
this.payType = 4;
} else {
this.payList = [{
this.payList = [
{
text: "支付宝",
imgUrl: require("@/static/icon/pay_1.png"),
type: 2,
@@ -278,9 +388,10 @@
imgUrl: require("@/static/icon/pay_3.png"),
type: 4,
value: "2",
}]
},
];
this.selectPayIndex = 1;
this.payType = 1
this.payType = 1;
}
},
async onLoad(options) {
@@ -310,6 +421,63 @@
...mapState(["userInfo"]),
},
methods: {
handleChangejf(val) {
var value = val;
this.$nextTick(() => {
// 1. 只允许数字字符,并去掉小数点后的部分
value = value.replace(/[^0-9.]/g, ""); // 删除非数字和小数点字符
// 2. 如果有小数点,只保留小数点前的部分
if (value.indexOf(".") !== -1) {
value = value.split(".")[0]; // 截取小数点前的部分
}
// 如果输入为0强制设置为0并显示为 "0"
if (val == 0) {
this.jfNumber = 0;
this.jfNumberShow = "0";
} else {
// 3. 强制转换为正整数
let numericValue = parseInt(value, 10); // 使用parseInt转换为整数
if (numericValue < 0 || isNaN(numericValue)) {
numericValue = 0;
}
// 4. 确保最大值限制
if (numericValue >= this.jfNumberMax) {
numericValue = this.jfNumberMax;
}
// 更新最终的数字值和显示
this.jfNumber = Math.max(0, numericValue); // 强制为正整数
this.jfNumberShow = this.jfNumber.toString(); // 显示整数
}
// 计算实际支付金额
console.log("this.actualPayment at line 446:", this.actualPayment);
if (this.dataInfo.lastFee - this.jfNumber == 0) {
console.log("this.actualPayment at line 1097:", this.actualPayment);
this.isDefaultCurrency = true;
var that = this;
this.payList.forEach((e, i) => {
if (e.type == 4) {
that.selectPayIndex = i;
that.payType = 4;
}
});
this.$forceUpdate();
} else {
this.isDefaultCurrency = false;
}
this.$forceUpdate();
// 如果实际支付金额为0设置支付方式为默认货币
this.$forceUpdate();
});
},
onHandleClickBuy() {
this.orderModalShow = false;
this.remark = this.content;
@@ -327,7 +495,8 @@
},
async initPrepareOrder() {
this.priceBreakdownList = [{
this.priceBreakdownList = [
{
text: "商品总价",
imgUrl: "",
type: 1,
@@ -359,6 +528,21 @@
console.log("res at line 374:", res);
if (res.code == 0) {
this.initData = res.data;
console.log("this.initData at line 497:", this.initData);
if (that.initData.user && that.initData.user.jf) {
var totalMoney = this.dataInfo.lastFee;
if (this.initData.user.jf >= totalMoney) {
const integerPart = Math.floor(totalMoney);
// this.jfNumber = integerPart; // 设置 jfNumber
this.jfNumberMax = integerPart; // 设置 jfNumberMax
} else {
this.jfNumberMax = this.initData.user.jf; // 设置 jfNumberMax
// this.jfNumber = this.initData.user.jf; // 设置 jfNumberMax
}
} else {
this.jfNumber = 0;
}
}
this.$forceUpdate();
@@ -398,7 +582,7 @@
this.nowClick = true;
}, 5000);
if(that.radioValue!='1'){
if (that.radioValue != "1") {
uni.showToast({
title: "请勾选 已阅读会员服务协议",
icon: "none",
@@ -406,19 +590,23 @@
return false;
}
let xiaBiao = [];
if (this.payType == 4 && this.initData.user.peanutCoin < this.dataInfo.lastFee) {
if (
this.payType == 4 &&
this.initData.user.peanutCoin <
Number(this.dataInfo.lastFee - this.jfNumber)
) {
uni.showToast({
title: '天医币余额不足',
icon: 'none'
})
return
title: "天医币余额不足",
icon: "none",
});
return;
}
let data = {
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
orderMoney: this.dataInfo.lastFee, //订单金额
realMoney: this.dataInfo.lastFee, //实际金额
realMoney: Number(this.dataInfo.lastFee - this.jfNumber), //实际金额
shippingMoney: 0, //运费
jfDeduction: 0, //积分抵扣
jfDeduction: this.jfNumber, //积分抵扣
vipBuyConfigId: this.dataInfo.id,
come: 2, //订单来源0疯子读书1国学众妙之门2医学吴门医述
};
@@ -446,7 +634,8 @@
title: "正在支付",
icon: "loading",
});
await setPay({
await setPay(
{
typePay: "alipay",
subject: "vip",
totalAmount: res.money,
@@ -533,6 +722,17 @@
this.activeIndex = index;
this.dataInfo.lastFee = item.rebateFee;
this.dataInfo.id = item.id;
if (this.initData.user && this.initData.user.jf) {
var totalMoney = this.dataInfo.lastFee;
if (this.initData.user.jf >= totalMoney) {
const integerPart = Math.floor(totalMoney);
this.jfNumberMax = integerPart; // 设置 jfNumberMax
} else {
this.jfNumberMax = this.initData.user.jf; // 设置 jfNumberMax
}
}
this.$forceUpdate();
},
radioChange(index) {
this.selectPayIndex = index;
@@ -578,7 +778,8 @@
}
this.modalInfo = {
title: "提示信息",
content: "用户您好,该课程已到期,通过支付" +
content:
"用户您好,该课程已到期,通过支付" +
fee +
"元,本门课程可获得" +
days +
@@ -683,7 +884,8 @@
async getDetailInfo() {
var that = this;
this.detailInfo = {
content: "<img src='http://oss.taihumed.com/other/null_20210528102528870.jpg' ></img> <img src='http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170420143333621.png' ></img><p><p>没有中医基础想学中医难不难?中医学者治疗出现瓶颈怎么办?中西医究竟有什么不同呢?吴雄志教授将以全新的视角,完美整合中药学和西医学知识,让你领略当代中医生理学魅力。</p><p><br/><p></p><p><br/></p><p>【思考题】</p><p>1、简述中医的发展这些年出现了哪些变化</p><p>2、简述中西医学科的异同</p>",
content:
"<img src='http://oss.taihumed.com/other/null_20210528102528870.jpg' ></img> <img src='http://101.201.146.165:8088/curriculum/detailImg/curriculum_20170420143333621.png' ></img><p><p>没有中医基础想学中医难不难?中医学者治疗出现瓶颈怎么办?中西医究竟有什么不同呢?吴雄志教授将以全新的视角,完美整合中药学和西医学知识,让你领略当代中医生理学魅力。</p><p><br/><p></p><p><br/></p><p>【思考题】</p><p>1、简述中医的发展这些年出现了哪些变化</p><p>2、简述中西医学科的异同</p>",
};
this.searchValue = "";
this.searchList = [];
@@ -708,9 +910,7 @@
transformData(inputData) {
const result = {};
inputData.forEach((item) => {
const {
letter
} = item;
const { letter } = item;
if (!result[letter]) {
result[letter] = [];
}
@@ -1034,7 +1234,8 @@
// color: #aaa;
color: #5a5a5a;
.explain {}
.explain {
}
}
.left {
@@ -1168,14 +1369,20 @@
margin-right: 20rpx;
}
}
}
/deep/.pay_item:nth-last-child(1) {
border-bottom: none !important;
}
}
.bottom {
width: calc(100% - 60rpx);
float: right;
width: calc(100%);
// float: right;
// background-color: #dcdfe6;
background-color: #f5f5f5;
border-radius: 20rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
.jf_box {
width: 100%;
@@ -1193,13 +1400,6 @@
box-sizing: border-box;
}
}
}
/deep/.pay_item:nth-last-child(1) {
border-bottom: none !important;
}
}
.linlanzhifu {
font-size: 28rpx;
line-height: 24rpx;

View File

@@ -49,6 +49,7 @@
}}</view
><view class="AC_time">{{ slotProps.row.createTime }} </view>
</view>
<text class="order" style="font-size: 12px;" v-if="slotProps.row.relationId" @click="goClick(slotProps.row.relationId)">订单详情</text>
</template>
</common-list>
</view>
@@ -247,6 +248,13 @@ export default {
},
//方法
methods: {
goClick(id){
uni.navigateTo({
url: "/pages/bookShop/orderLCont?orderId=" +
id
});
},
// 获取
getData() {
var data = {
@@ -370,7 +378,9 @@ export default {
font-weight: bold;
}
}
.order{
color: $themeColor;
}
.AC_con {
// background-color: #fff;
overflow: hidden;

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.