This commit is contained in:
2025-04-18 17:55:28 +08:00
parent 5d17820abc
commit c738befac4
2 changed files with 2286 additions and 2164 deletions

View File

@@ -10,7 +10,7 @@
> >
<u-icon <u-icon
name="map-fill" name="map-fill"
color="#258feb" class="themeColor"
size="23" size="23"
style="display: inline-block; margin-right: 10rpx" style="display: inline-block; margin-right: 10rpx"
></u-icon> ></u-icon>
@@ -246,7 +246,7 @@
v-if="v.type == 4 && initData.user.jf > 0" v-if="v.type == 4 && initData.user.jf > 0"
> >
<view class="jf_box"> <view class="jf_box">
<text style="color: #258feb; font-weight: 600" <text class="themeColor" style="font-weight: 600"
>可用积分({{ jfNumberMax }})</text >可用积分({{ jfNumberMax }})</text
> >
<view class="jf_input"> <view class="jf_input">
@@ -285,7 +285,8 @@
<template v-if="v.type == 4"> <template v-if="v.type == 4">
<text> {{ v.text }}</text> <text> {{ v.text }}</text>
<text <text
style="color: #258feb; font-weight: 600; margin-left: 10rpx" class="themeColor"
style="font-weight: 600; margin-left: 10rpx"
> >
(余额{{ (余额{{
initData && initData.user ? initData.user.peanutCoin : 0 initData && initData.user ? initData.user.peanutCoin : 0
@@ -300,7 +301,7 @@
<radio <radio
v-if="i == 2" v-if="i == 2"
:value="v.value" :value="v.value"
color="#258feb" :color="themeColor"
:checked="selectPayIndex == i ? true : false" :checked="selectPayIndex == i ? true : false"
@click="radioChange(i)" @click="radioChange(i)"
size="10" size="10"
@@ -309,7 +310,7 @@
<template v-else> <template v-else>
<radio <radio
:value="v.value" :value="v.value"
color="#258feb" :color="themeColor"
:checked="selectPayIndex == i ? true : false" :checked="selectPayIndex == i ? true : false"
@click="radioChange(i)" @click="radioChange(i)"
size="10" size="10"
@@ -332,7 +333,7 @@
<view class="linlanzhifu"> <view class="linlanzhifu">
<u-icon <u-icon
name="error-circle" name="error-circle"
color="#258feb" class="themeColor"
size="20" size="20"
style="display: inline-block; margin-right: 10rpx" style="display: inline-block; margin-right: 10rpx"
></u-icon> ></u-icon>
@@ -363,16 +364,16 @@
支付时使用的信用卡需要带有Visa或MasterCard的标识请向邮箱 支付时使用的信用卡需要带有Visa或MasterCard的标识请向邮箱
<text <text
@click="fnCopy('publisher@tmrjournals.com', '邮箱')" @click="fnCopy('publisher@tmrjournals.com', '邮箱')"
class="aui-text-success" class="aui-text-success themeColor"
style="text-decoration: underline; color: #258feb" style="text-decoration: underline"
> >
publisher@tmrjournals.com publisher@tmrjournals.com
</text> </text>
点击复制发送支付请求内容需包含拟购买的课程名称支付金额APP注册姓名及手机号码或者加一路健康客服微信 点击复制发送支付请求内容需包含拟购买的课程名称支付金额APP注册姓名及手机号码或者加一路健康客服微信
<text <text
class="aui-text-success" class="aui-text-success themeColor"
@click="fnCopy('yilujiankangkefu', '微信名')" @click="fnCopy('yilujiankangkefu', '微信名')"
style="text-decoration: underline; color: #258feb" style="text-decoration: underline"
> >
yilujiankangkefu </text yilujiankangkefu </text
>点击复制联系我们我们将在24小时内向您的邮箱或者微信发送支付链接根据提示即可完成信用卡支付无需兑换外币 >点击复制联系我们我们将在24小时内向您的邮箱或者微信发送支付链接根据提示即可完成信用卡支付无需兑换外币
@@ -424,6 +425,28 @@
</view> </view>
</template> </template>
</common-goods-nav> </common-goods-nav>
<view
class="agree_wo"
style="background-color: #fff"
v-if="pageType == 'vip'"
>
<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>
</view>
</radio-group>
<view
>* 我已阅读并同意<span class="highlight" @click="showXieyi"
>会员服务协议</span
></view
>
</view>
</view> </view>
<u-popup :show="show" mode="right"> <u-popup :show="show" mode="right">
@@ -482,10 +505,19 @@
@confirmCoupon="confirmCoupon" @confirmCoupon="confirmCoupon"
@close="closeCoupon" @close="closeCoupon"
></order-coupon> ></order-coupon>
<u-popup :show="xieyiShow" :round="10" @close="xieyiShow = false">
<view class="tanchu">
<view class="dp_title">{{ xieyi.title }}</view>
<view style="max-height: 1000rpx; overflow-y: scroll">
<view v-html="xieyi.content"></view>
</view>
</view>
</u-popup>
</view> </view>
</template> </template>
<script> <script>
var themeColor='#258feb';
import orderCoupon from "@/components/orderCoupon.vue"; import orderCoupon from "@/components/orderCoupon.vue";
import courseDescription from "@/pages/component/commonComponents/list"; import courseDescription from "@/pages/component/commonComponents/list";
import { setPay, setPayAssign, setWXPay } from "@/config/utils"; import { setPay, setPayAssign, setWXPay } from "@/config/utils";
@@ -502,6 +534,7 @@ export default {
"priceKey", "priceKey",
"initData", "initData",
"urlList", "urlList",
"isHideJf",
], ],
components: { components: {
courseDescription, //课程说明 courseDescription, //课程说明
@@ -556,6 +589,15 @@ export default {
}, },
data() { data() {
return { return {
appName: "wumen",
come: 2,
argee: [{ value: false, id: "1" }], // 同意权限
radioValue: "",
xieyi: {
title: "",
content: "",
},
xieyiShow: false,
vipPrice: 0, vipPrice: 0,
districtAmount: 0, districtAmount: 0,
historyOrderInfo: undefined, //上一个订单的参数 historyOrderInfo: undefined, //上一个订单的参数
@@ -602,10 +644,11 @@ export default {
curriculumData: {}, curriculumData: {},
curriculumInfo: {}, curriculumInfo: {},
detailInfo: {}, detailInfo: {},
themeColor:themeColor,
fdButtonStyle: { fdButtonStyle: {
width: "120rpx", width: "120rpx",
"border-color": "#258feb", "border-color": themeColor,
color: "#258feb", color: themeColor,
float: "right", float: "right",
"margin-right": "20rpx", "margin-right": "20rpx",
"margin-left": "30rpx", "margin-left": "30rpx",
@@ -664,7 +707,7 @@ export default {
{ {
width: "200rpx", width: "200rpx",
text: "立即支付", text: "立即支付",
backgroundColor: "linear-gradient(90deg, #3C77BE 0%,#258feb 100%)", backgroundColor: `linear-gradient(90deg, ${themeColor} 0%,${themeColor} 100%)`,
color: "#fff", color: "#fff",
}, },
], ],
@@ -672,7 +715,7 @@ export default {
{ {
with: 200, with: 200,
text: "确定", text: "确定",
backgroundColor: "linear-gradient(90deg, #3C77BE 0%,#258feb 100%)", backgroundColor: `linear-gradient(90deg, ${themeColor} 0%,${themeColor} 100%)`,
color: "#fff", color: "#fff",
}, },
], ],
@@ -744,6 +787,30 @@ export default {
...mapState(["userInfo"]), ...mapState(["userInfo"]),
}, },
methods: { methods: {
radioCheck(index) {
this.argee.forEach((item) => {
item.isCheck = false;
});
if (this.radioValue == this.argee[index].id) {
this.radioValue = null;
} else {
this.radioValue = this.argee[index].id;
}
},
//会员协议
async showXieyi() {
var data = await this.$commonJS.getAgreement(107);
if (data.content) {
data.content = data.content.replace(
/<h5>/g,
'<view style="font-weight: bold;font-size: 32rpx;margin-top: 20rpx;margin-bottom: 20rpx;">'
);
data.content = data.content.replace(/<\/h5>/g, "</view>");
}
this.xieyi = data;
this.xieyiShow = true;
},
async getGoodsList() { async getGoodsList() {
//获取商品信息 //获取商品信息
// await this.getGoodsDataInfo(); // await this.getGoodsDataInfo();
@@ -762,7 +829,7 @@ export default {
this.haveCourse = list.some((ele) => ele === "05"); this.haveCourse = list.some((ele) => ele === "05");
if (this.options.sourceType == "curriculum") { if (this.options.sourceType == "curriculum") {
this.goToInfo = { this.goToInfo = {
url: "/pages/curriculum/order/index/index", url: "/pages/course/myCourse",
type: 2, type: 2,
}; };
} else { } else {
@@ -1069,7 +1136,7 @@ export default {
} }
this.isShowAddress = !this.isHideAddress; this.isShowAddress = !this.isHideAddress;
if (!this.isShowAddress) { if (!this.isShowAddress&&this.initData.user.jf>0) {
this.priceBreakdownList.push({ this.priceBreakdownList.push({
text: "积分", text: "积分",
imgUrl: require("@/static/icon/jifen.png"), imgUrl: require("@/static/icon/jifen.png"),
@@ -1268,6 +1335,16 @@ export default {
} }
}, },
async goBuyJie() { async goBuyJie() {
if (this.pageType == "vip") {
if (this.radioValue != "1") {
uni.showToast({
title: "请勾选 已阅读会员服务协议",
icon: "none",
});
return false;
}
}
if (this.buyingFlag) { if (this.buyingFlag) {
uni.showToast({ uni.showToast({
title: "操作太频繁了,休息下吧", title: "操作太频繁了,休息下吧",
@@ -1281,6 +1358,7 @@ export default {
setTimeout(() => { setTimeout(() => {
this.nowClick = true; this.nowClick = true;
}, 5000); }, 5000);
let xiaBiao = []; let xiaBiao = [];
let data = {}; let data = {};
@@ -1303,7 +1381,7 @@ export default {
remark: this.goodsDataList remark: this.goodsDataList
.map((e) => e.productId + "," + e.productName) .map((e) => e.productId + "," + e.productName)
.join(","), //productId,商品名 .join(","), //productId,商品名
come: "2", come: this.come,
}; };
} else if (this.pageType == "vip") { } else if (this.pageType == "vip") {
data = { data = {
@@ -1313,7 +1391,7 @@ export default {
shippingMoney: 0, //运费 shippingMoney: 0, //运费
jfDeduction: this.jfNumber, jfDeduction: this.jfNumber,
vipBuyConfigId: this.goodsDataList[0].id, vipBuyConfigId: this.goodsDataList[0].id,
come: 2, //订单来源0疯子读书1国学众妙之门2医学吴门医述 come: this.come, //订单来源0疯子读书1国学众妙之门2医学吴门医述
}; };
} else { } else {
if (this.options.goods[0].goodsType != "05") { if (this.options.goods[0].goodsType != "05") {
@@ -1355,8 +1433,8 @@ export default {
orderType: "order", //订单类型 orderType: "order", //订单类型
addressId: addressId:
this.options.goods[0].goodsType != "05" ? this.addressData.id : 0, // 地址ID this.options.goods[0].goodsType != "05" ? this.addressData.id : 0, // 地址ID
appName: "wumen", appName: this.appName,
come: "2", come: this.come,
}; };
var productList = [...data.productList]; var productList = [...data.productList];
var thisproduct = productList.map((item) => { var thisproduct = productList.map((item) => {
@@ -2259,6 +2337,8 @@ export default {
} }
.popup_box { .popup_box {
padding: 20rpx;
box-sizing: border-box;
.curriulum_title_box { .curriulum_title_box {
.title { .title {
text-align: center; text-align: center;
@@ -2308,4 +2388,38 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.agree_wo {
display: flex;
align-items: center;
justify-content: flex-end;
color: #aaa;
line-height: 30rpx;
font-size: 28rpx;
padding: 10rpx 10rpx 20rpx 0;
}
.agreeRadio {
zoom: 0.8;
}
.agree {
width: auto !important;
}
.highlight {
color: $uni-color-primary;
}
.tanchu {
padding: 40rpx 30rpx 40rpx 30rpx;
position: relative;
.dp_title {
font-size: 32rpx;
margin-bottom: 50rpx;
color: #555;
text-align: center;
font-weight: bold;
}
}
.themeColor {
color: $themeColor;
}
</style> </style>

View File

@@ -7,6 +7,7 @@
<common-order-submit <common-order-submit
v-if="showOrder" v-if="showOrder"
:options="options" :options="options"
:urlList="urlList" :urlList="urlList"
:initData="initData" :initData="initData"
:priceKey="priceKey" :priceKey="priceKey"
@@ -198,7 +199,7 @@ export default {
.request({ .request({
url: `${this.urlList.userInfo}`, url: `${this.urlList.userInfo}`,
method: "POST", method: "POST",
data, data:{},
header: { header: {
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
@@ -260,15 +261,18 @@ export default {
for (const item of data) { for (const item of data) {
// Check if vcbList exists and loop through each item in vcbList // Check if vcbList exists and loop through each item in vcbList
if (item.vcbList) { if (item.vcbList) {
this.isHideJf=true
const vcbItem = item.vcbList.find((vcb) => vcb.id === id); const vcbItem = item.vcbList.find((vcb) => vcb.id === id);
if (vcbItem) { if (vcbItem) {
return vcbItem; // Return the matching item return {...vcbItem,}; // Return the matching item
} }
} }
if (item.yanqiList) { if (item.yanqiList) {
this.isHideJf=false
const vcbItem = item.yanqiList.find((vcb) => vcb.id === id); const vcbItem = item.yanqiList.find((vcb) => vcb.id === id);
if (vcbItem) { if (vcbItem) {
return vcbItem; // Return the matching item
return {...vcbItem,}; // Return the matching item
} }
} }
} }
@@ -291,6 +295,7 @@ export default {
this.goodsDataList = res.productList.filter( this.goodsDataList = res.productList.filter(
(e) => this.options.goods[0].productName == e.productName (e) => this.options.goods[0].productName == e.productName
); );
}); });
}, },
@@ -307,6 +312,9 @@ export default {
.then(async (res) => { .then(async (res) => {
console.log("res at line 846:", res); console.log("res at line 846:", res);
var data = await this.findById(this.options.goods[0].id, res.res); var data = await this.findById(this.options.goods[0].id, res.res);
if(this.isHideJf){
this.initData.user.jf=0;
}
console.log("data at line 200:", data); console.log("data at line 200:", data);
this.goodsDataList = [ this.goodsDataList = [
{ {