1306 lines
29 KiB
Vue
1306 lines
29 KiB
Vue
<template>
|
||
<view class="commonPageBox commonDetailPage">
|
||
<z-nav-bar title="确认订单"></z-nav-bar>
|
||
<view class="contentBox commonPageContentBox order_box">
|
||
<view class="order_top common_radius_box color_shandow goods_box">
|
||
<view class="curriulum_title_box goods_item" style=" position: relative;">
|
||
<view class="normal_box">
|
||
<view class="normal_box_top">
|
||
<view class="curriulum_title">{{ options.title }} </view>
|
||
<view class="price_box">
|
||
<text>¥{{ options.price }}</text>
|
||
|
||
<view>
|
||
x 1
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view class="name_px" v-if="orderType == 'pxb'">
|
||
<text><span style=" color:red;">*</span>参加培训姓名</text>
|
||
<view class="name_input">
|
||
<u--input type="text" v-model="name" placeholder="请输入姓名" clearable></u--input>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view 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 priceBreakdownList">
|
||
<view class="top">
|
||
<view class="left" style="display: flex; align-items: center;">
|
||
<image v-if="v.imgUrl" class="pay_item_img_icon" :src="v.imgUrl" mode="aspectFil"
|
||
:style="v.style">
|
||
</image>
|
||
<template v-if="v.type == 2">{{ v.text }}
|
||
<text style="color: #aaa; margin-left: 10rpx; font-size: 28rpx;">
|
||
(全部积分:{{ user.jf }})</text>
|
||
</template>
|
||
<text v-else>{{ v.text }}</text>
|
||
</view>
|
||
<view class="right">
|
||
<template v-if="v.type == 2">
|
||
<text style="color: #fe6035"> -¥{{ jfNumberShow }}</text>
|
||
</template>
|
||
<template v-else> ¥{{ options.price }}</template>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="bottom jf_box" v-if="v.type == 2">
|
||
<view class="jf_box">
|
||
<text style="color: #7dc1f0; font-size: 28rpx;">可用积分({{ jfNumberMax }}分)</text>
|
||
<view class="jf_input">
|
||
<u--input type="number" @input="handleChangejf" @clear="jfNumber = 0" :max="jfNumberMax"
|
||
v-model="jfNumber" placeholder="请输入积分" border="surround" clearable></u--input>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<view 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">
|
||
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
|
||
<view class="left">
|
||
<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: #7dc1f0; font-weight: 600; margin-left: 10rpx">
|
||
(余额:{{ user && user.peanutCoin ? user.peanutCoin : 0 }})</text>
|
||
</template>
|
||
|
||
<text v-else> {{ v.text }}</text>
|
||
</view>
|
||
<template v-if="isDefaultCurrency">
|
||
<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>
|
||
<radio :value="v.value" color="#7dc1f0" :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="
|
||
width: 100%;
|
||
overflow: hidden;
|
||
justify-content: space-between;
|
||
">
|
||
<view class="linlanzhifu">
|
||
<u-icon name="error-circle" color="#7dc1f0" 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>
|
||
</view>
|
||
|
||
<view class="other_info" style="margin-top: 12rpx">
|
||
<view class="explain" style="margin-bottom: 10rpx"> 说明 </view>
|
||
<view class="explain"> 1. 1天医币 = 1元人民币 </view>
|
||
<view class="explain">
|
||
2.若有疑问或意见请致电客服
|
||
<span style="font-size: 15px"><u @click="checkPermision">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: #7dc1f0">
|
||
publisher@tmrjournals.com
|
||
</text>
|
||
(点击复制)发送支付请求,内容需包含:拟购买的课程名称、支付金额、APP注册姓名及手机号码,或者加一路健康客服微信(
|
||
<text class="aui-text-success" @click="fnCopy('yilujiankangkefu', '微信名')"
|
||
style="text-decoration: underline; color: #7dc1f0">
|
||
yilujiankangkefu </text>)(点击复制)联系我们,我们将在24小时内向您的邮箱或者微信发送支付链接,根据提示即可完成信用卡支付,无需兑换外币。
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
</view>
|
||
</view>
|
||
<view class="goods_nav_box">
|
||
<common-goods-nav :customButton="customButton" @submit="goBuyJie">
|
||
<!-- leftSlot -->
|
||
<template slot="leftSlot" slot-scope="slotProps">
|
||
<view class="price_box order_bottom_box">
|
||
<text class="price">合计:
|
||
<text class="total" v-if="actualPayment==0">{{jfNumber}}积分</text>
|
||
<text class="total" v-else>
|
||
<span style=" color: red;">¥{{actualPayment}}</span>
|
||
<text style="margin: 0 4rpx" v-if="actualPayment > 0 && jfNumber > 0"> + </text>
|
||
|
||
<text v-if="jfNumber > 0">{{ jfNumber }} 积分</text>
|
||
</text>
|
||
</text>
|
||
</view>
|
||
</template>
|
||
</common-goods-nav>
|
||
<view class="agree_wo" v-if="orderType == '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>
|
||
<!-- 会员协议 -->
|
||
<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>
|
||
</template>
|
||
|
||
<script>
|
||
import debounce from "@/common/debounce.js";
|
||
import {
|
||
setPay,
|
||
setPayAssign,
|
||
setWXPay
|
||
} from "@/config/utils";
|
||
import $http from "@/config/requestConfig.js";
|
||
import permission from "@/js_sdk/wa-permission/permission.js"
|
||
const { platform } = uni.getSystemInfoSync();
|
||
import {
|
||
mapState
|
||
} from "vuex";
|
||
import parse from "../../uni_modules/uview-ui/libs/config/props/parse";
|
||
export default {
|
||
watch: {
|
||
isDefaultCurrency: {
|
||
immediate: true,
|
||
handler(newRoute) {
|
||
if (this.isDefaultCurrency) {
|
||
if (platform == "ios") {
|
||
this.selectPayIndex = 0;
|
||
} 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) => {
|
||
if (e.type == 4) {
|
||
that.selectPayIndex = i;
|
||
that.payType = 4;
|
||
}
|
||
});
|
||
this.$forceUpdate();
|
||
}
|
||
this.$forceUpdate();
|
||
},
|
||
},
|
||
},
|
||
data() {
|
||
return {
|
||
isDefaultCurrency: false,
|
||
jfNumber: 0,
|
||
actualPayment: 0, //合计价格
|
||
jfNumberShow: "",
|
||
jfNumberMax: 0,
|
||
orderModalShowInfo: {},
|
||
orderModalShow: false,
|
||
payType: 1,
|
||
freightNum: 0,
|
||
selectPayIndex: 1,
|
||
farePrice: 0,
|
||
payList: [],
|
||
priceBreakdownList: [
|
||
{
|
||
type: 1,
|
||
text: '商品总价',
|
||
}
|
||
],
|
||
number: 1,
|
||
detailInfo: {},
|
||
options: {},
|
||
modalInfo: {},
|
||
currentCateIndex: 0,
|
||
show: false,
|
||
goToInfo: {},
|
||
customButton: [{
|
||
width: "300rpx",
|
||
text: "立即支付",
|
||
backgroundColor: "linear-gradient(90deg, #294a97 0%, #7dc1f0 80%)",
|
||
color: "#fff",
|
||
}, ],
|
||
initData: {}, //积分
|
||
user: {},
|
||
name: '', //姓名
|
||
buyStatus: false,
|
||
//订单类型
|
||
orderType: '',
|
||
argee: [{value: false, id: "1"}], // 同意权限
|
||
radioValue: "",
|
||
xieyi: {
|
||
title: "",
|
||
content: "",
|
||
},
|
||
xieyiShow: false,
|
||
yanqiStatus: false
|
||
};
|
||
},
|
||
onLoad(options) {
|
||
this.options = JSON.parse(options.data);
|
||
this.orderType = this.options.orderType;
|
||
this.yanqiStatus = this.options.yanqiStatus;
|
||
|
||
if (platform == "ios") {
|
||
this.payList = [
|
||
{
|
||
text: "天医币",
|
||
imgUrl: require("@/static/icon/pay_3.png"),
|
||
type: 4,
|
||
value: "2",
|
||
},
|
||
];
|
||
this.selectPayIndex = 0;
|
||
this.payType = 4;
|
||
} else {
|
||
this.payList = [
|
||
{
|
||
text: "支付宝",
|
||
imgUrl: require("@/static/icon/pay_1.png"),
|
||
type: 2,
|
||
value: "0",
|
||
},
|
||
{
|
||
text: "微信",
|
||
imgUrl: require("@/static/icon/pay_2.png"),
|
||
type: 1,
|
||
value: "1",
|
||
},
|
||
{
|
||
text: "天医币",
|
||
imgUrl: require("@/static/icon/pay_3.png"),
|
||
type: 4,
|
||
value: "2",
|
||
},
|
||
];
|
||
this.selectPayIndex = 1;
|
||
this.payType = 1;
|
||
}
|
||
|
||
//如果是延期的
|
||
if(this.yanqiStatus||this.orderType=='pxb'){
|
||
this.priceBreakdownList.push({
|
||
type: 2,
|
||
imgUrl: require("@/static/icon/jifen.png"),
|
||
text: '积分',
|
||
})
|
||
}else{
|
||
this.actualPayment = this.options.price;
|
||
}
|
||
this.getUserInfo();
|
||
},
|
||
onShow() {
|
||
|
||
},
|
||
computed: {
|
||
...mapState(["userInfo"]),
|
||
},
|
||
methods: {
|
||
//获取用户详情
|
||
async getUserInfo() {
|
||
if (this.userInfo.id != undefined) {
|
||
await this.$http.post("book/user/info/" + this.userInfo.id).then(async(res) => {
|
||
this.user = res.user;
|
||
if(this.yanqiStatus||this.orderType=='pxb'){
|
||
await this.getTotalPrice(res.user);
|
||
}
|
||
|
||
});
|
||
}
|
||
},
|
||
onPageJump(url) {
|
||
uni.navigateTo({
|
||
url: url,
|
||
});
|
||
},
|
||
fnCopy(value, title) {
|
||
this.$commonJS.handleMakingPhoneCalls(value, title);
|
||
},
|
||
async checkPermision() {
|
||
var result = await permission.premissionCheck("CALLPHONE")
|
||
if (result != 1) {
|
||
return false
|
||
}
|
||
this.gotoPhone()
|
||
},
|
||
gotoPhone() {
|
||
this.$commonJS.handleMakingPhoneCalls("022-24142321");
|
||
},
|
||
//积分输入
|
||
handleChangejf(val) {
|
||
var value = String(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(); // 显示整数
|
||
}
|
||
|
||
// 计算实际支付金额
|
||
this.actualPayment = this.options.price - this.jfNumber;
|
||
|
||
// 如果实际支付金额为0,设置支付方式为默认货币
|
||
if (this.actualPayment == 0) {
|
||
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();
|
||
});
|
||
},
|
||
//获取总金额
|
||
getTotalPrice(userInfo) {
|
||
if (userInfo.jf >= this.options.price) {
|
||
this.jfNumber = this.options.price;
|
||
this.jfNumberMax = this.options.price;
|
||
} else {
|
||
this.jfNumber = userInfo.jf;
|
||
this.jfNumberMax = userInfo.jf;
|
||
}
|
||
if (this.jfNumber == 0 || this.jfNumber == null) {
|
||
this.jfNumberShow = "0.00";
|
||
this.actualPayment = this.options.price;
|
||
} else {
|
||
this.jfNumberShow = this.jfNumber;
|
||
this.actualPayment = this.options.price - this.jfNumber;
|
||
}
|
||
if (this.actualPayment == 0) {
|
||
this.isDefaultCurrency = true;
|
||
this.payList.forEach((e, i) => {
|
||
if (e.type == 4) {
|
||
this.selectPayIndex = i;
|
||
this.payType = 4;
|
||
}
|
||
});
|
||
this.$forceUpdate();
|
||
} else {
|
||
this.isDefaultCurrency = false;
|
||
}
|
||
this.$forceUpdate();
|
||
},
|
||
//下单
|
||
goBuyJie(){
|
||
if(this.orderType=='vip'){
|
||
this.submitVip();
|
||
}else{
|
||
this.submitPxb();
|
||
}
|
||
},
|
||
//培训班的购买
|
||
async submitPxb() {
|
||
debounce(async () => {
|
||
if(!this.name){
|
||
uni.showToast({
|
||
title: "培训姓名不能为空",
|
||
icon: 'none'
|
||
});
|
||
return false;
|
||
}
|
||
if(this.buyStatus){
|
||
uni.showToast({
|
||
title: "请勿重复下单",
|
||
icon: "none",
|
||
});
|
||
return false;
|
||
}
|
||
uni.showLoading({
|
||
title: '加载中'
|
||
});
|
||
//下单状态
|
||
this.buyStatus = true;
|
||
var that = this;
|
||
let data = {
|
||
paymentMethod: that.payType,
|
||
orderMoney: that.options.price,
|
||
jfDeduction: that.jfNumber,
|
||
realMoney: that.actualPayment,
|
||
come: '3',
|
||
remark: that.options.title,
|
||
trainingClassId: that.options.id,
|
||
trainingClassIdentity: that.options.identity +':'+that.options.price,
|
||
userName: that.name
|
||
}
|
||
|
||
await $http.request({
|
||
url: 'common/trainingClass/trainingClassPaySave',
|
||
method: "POST",
|
||
data,
|
||
header: {
|
||
"Content-Type": "application/json",
|
||
},
|
||
})
|
||
.then(async (res) => {
|
||
if (res.code == 0) {
|
||
uni.hideLoading()
|
||
if (res.orderSn == null) {
|
||
uni.showToast({
|
||
title: "失败,请重新下单",
|
||
icon: "none"
|
||
});
|
||
that.buyStatus = false;
|
||
} else {
|
||
if (that.payType == 2) {
|
||
// 常规支付
|
||
uni.showToast({
|
||
title: "正在支付",
|
||
icon: "loading",
|
||
});
|
||
await setPay({
|
||
typePay: "alipay",
|
||
subject: "order",
|
||
totalAmount: res.money,
|
||
type: 2,
|
||
relevanceoid: res.orderSn,
|
||
customerId: that.userInfo.id,
|
||
},
|
||
(res) => {
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
});
|
||
console.log(res, "支付支付");
|
||
if (res.success) {
|
||
uni.showToast({
|
||
title: "支付成功",
|
||
});
|
||
setTimeout(() => {
|
||
uni.navigateTo({
|
||
url: '/pages/trainingCourse/index'
|
||
})
|
||
}, 1000);
|
||
} else {
|
||
setTimeout(() => {
|
||
that.buyStatus = false;
|
||
console.log("延迟调用 失败提示");
|
||
uni.showToast({
|
||
title: "支付失败"
|
||
});
|
||
}, 0);
|
||
}
|
||
}
|
||
);
|
||
} else if (that.payType == 1) {
|
||
// 微信支付
|
||
let data1 = {
|
||
orderSn: res.orderSn,
|
||
buyOrderId: null,
|
||
totalAmount: res.money,
|
||
};
|
||
setWXPay(data1, (res) => {
|
||
if (res.success) {
|
||
uni.showToast({
|
||
title: "支付成功",
|
||
});
|
||
setTimeout(() => {
|
||
uni.navigateTo({
|
||
url: '/pages/trainingCourse/index'
|
||
})
|
||
}, 1000);
|
||
} else {
|
||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||
uni.showToast({
|
||
title: "用户取消支付",
|
||
icon: "none"
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "支付失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
that.buyStatus = false;
|
||
}
|
||
});
|
||
} else if (that.payType == 4) {
|
||
// 天医币支付
|
||
uni.showToast({
|
||
title: "购买成功",
|
||
icon: "success",
|
||
});
|
||
setTimeout(() => {
|
||
uni.navigateTo({
|
||
url: '/pages/trainingCourse/index'
|
||
})
|
||
}, 1000);
|
||
}
|
||
}
|
||
}
|
||
})
|
||
.catch(()=>{
|
||
uni.hideLoading();
|
||
that.buyStatus = false;
|
||
});
|
||
}, 1000);
|
||
},
|
||
|
||
//vip的购买
|
||
async submitVip() {
|
||
var that = this;
|
||
//判断勾选
|
||
if(that.radioValue!='1'){
|
||
uni.showToast({
|
||
title: "请勾选 已阅读会员服务协议",
|
||
icon: "none",
|
||
});
|
||
return false;
|
||
}
|
||
debounce(async () => {
|
||
let data = {
|
||
paymentMethod: that.payType, //1微信2支付宝3苹果支付4虚拟币
|
||
orderMoney: that.options.price, //订单金额
|
||
realMoney: that.actualPayment, //实际金额
|
||
shippingMoney: 0, //运费
|
||
jfDeduction: that.jfNumber, //积分抵扣
|
||
vipBuyConfigId: that.options.id,
|
||
come: 3, //订单来源,0疯子读书1国学众妙之门2医学吴门医述 3心灵空间
|
||
};
|
||
await $http.request({
|
||
url: 'common/userVip/placeVipOrder',
|
||
method: "POST",
|
||
data,
|
||
header: {
|
||
"Content-Type": "application/json",
|
||
},
|
||
})
|
||
.then(async (res) => {
|
||
if (res.code == 0) {
|
||
if (res.orderSn == null) {
|
||
uni.showToast({
|
||
title: "失败,请重新下单",
|
||
icon: "none"
|
||
});
|
||
} else {
|
||
if (that.payType == 2) {
|
||
// 常规支付
|
||
uni.showToast({
|
||
title: "正在支付",
|
||
icon: "loading",
|
||
});
|
||
await setPay({
|
||
typePay: "alipay",
|
||
subject: "vip",
|
||
totalAmount: res.money,
|
||
type: 2,
|
||
relevanceoid: res.orderSn,
|
||
customerId: that.userInfo.id,
|
||
},
|
||
(res) => {
|
||
uni.showLoading({
|
||
title: "加载中",
|
||
});
|
||
console.log(res, "支付支付");
|
||
if (res.success) {
|
||
uni.showToast({
|
||
title: "支付成功",
|
||
});
|
||
setTimeout(() => {
|
||
uni.switchTab({
|
||
url: "/pages/order/index",
|
||
});
|
||
}, 1000);
|
||
} else {
|
||
setTimeout(() => {
|
||
uni.showToast({
|
||
title: "支付失败"
|
||
});
|
||
}, 0);
|
||
}
|
||
}
|
||
);
|
||
} else if (that.payType == 1) {
|
||
// 微信支付
|
||
let data1 = {
|
||
orderSn: res.orderSn,
|
||
buyOrderId: null,
|
||
totalAmount: res.money,
|
||
};
|
||
setWXPay(data1, (res) => {
|
||
if (res.success) {
|
||
uni.showToast({
|
||
title: "支付成功",
|
||
});
|
||
setTimeout(() => {
|
||
uni.switchTab({
|
||
url: "/pages/order/index",
|
||
});
|
||
}, 1000);
|
||
} else {
|
||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||
uni.showToast({
|
||
title: "用户取消支付",
|
||
icon: "none"
|
||
});
|
||
} else {
|
||
uni.showToast({
|
||
title: "支付失败",
|
||
icon: "none"
|
||
});
|
||
}
|
||
}
|
||
});
|
||
} else if (that.payType == 4) {
|
||
// 天医币支付
|
||
uni.showToast({
|
||
title: "购买成功",
|
||
icon: "success",
|
||
});
|
||
setTimeout(() => {
|
||
uni.switchTab({
|
||
url: "/pages/order/index",
|
||
});
|
||
}, 1000);
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}, 400);
|
||
},
|
||
//支付方式切换
|
||
radioChange(index) {
|
||
this.selectPayIndex = index;
|
||
this.payType = this.payList[this.selectPayIndex].type;
|
||
this.$forceUpdate();
|
||
},
|
||
//勾选会员协议
|
||
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(111);
|
||
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;
|
||
}
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
@import "@/static/mixin.scss";
|
||
.order_box {
|
||
padding: 20rpx;
|
||
|
||
.order_top {
|
||
background-color: #fff;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.goods_item {
|
||
width: 100%;
|
||
overflow: hidden;
|
||
|
||
.textarea {
|
||
margin-top: 20rpx;
|
||
background-color: #fffdfd;
|
||
}
|
||
|
||
.goods_item_img {
|
||
width: 140rpx;
|
||
height: 140rpx;
|
||
float: left;
|
||
background-color: #f5f5f5;
|
||
border-radius: 10rpx;
|
||
}
|
||
|
||
.normal_box {
|
||
|
||
.normal_box_top {
|
||
width: 100%;
|
||
height: 100rpx;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
.flexbox {
|
||
display: flex;
|
||
}
|
||
|
||
.dataList {
|
||
height: 100%;
|
||
}
|
||
|
||
.titleList2 {
|
||
height: calc(100% - 150rpx);
|
||
}
|
||
|
||
.priceDetail {
|
||
height: calc(100% - 180rpx) !important;
|
||
padding: 0rpx 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.componentPage {
|
||
height: calc(100% - 90rpx) !important;
|
||
}
|
||
|
||
.dateReminder {
|
||
width: 100%;
|
||
font-size: 24rpx;
|
||
text-align: right;
|
||
line-height: 40rpx;
|
||
}
|
||
|
||
.fdButtonBox {
|
||
border: 1rpx solid $themeColor;
|
||
background-color: $themeColor;
|
||
color: #fff;
|
||
float: right;
|
||
padding: 4rpx 14rpx;
|
||
font-size: 24rpx;
|
||
font-weight: 500;
|
||
line-height: 30rpx;
|
||
border-radius: 10rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
.commonDetailPage {
|
||
padding-bottom: 150rpx !important;
|
||
}
|
||
.goods_box {
|
||
background-color: #fff;
|
||
box-sizing: border-box;
|
||
width: 100%;
|
||
|
||
.title {
|
||
color: #333;
|
||
font-weight: 600;
|
||
margin-bottom: 20rpx;
|
||
}
|
||
|
||
.curriulum_title_box {
|
||
width: calc(100%) !important;
|
||
padding-bottom: 20rpx;
|
||
background-color: #fff;
|
||
|
||
.curriulum_title {
|
||
width: calc(100% - 80rpx);
|
||
font-weight: 500;
|
||
font-size: 30rpx;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 0rpx;
|
||
color: #333;
|
||
box-sizing: border-box;
|
||
}
|
||
}
|
||
}
|
||
|
||
.dataList {
|
||
background-color: #fff !important;
|
||
padding: 0 30rpx 40rpx !important;
|
||
box-sizing: border-box;
|
||
}
|
||
/deep/.scroll-view-item:nth-child(2n-1) {
|
||
background-color: transparent !important;
|
||
}
|
||
|
||
.dataList {
|
||
height: auto !important;
|
||
}
|
||
|
||
.related_courses_box {
|
||
background-color: #fff;
|
||
|
||
.small_class_teaching_content {
|
||
padding: 10rpx 20rpx;
|
||
box-sizing: border-box;
|
||
}
|
||
}
|
||
|
||
.related_courses_name {
|
||
display: inline-block;
|
||
width: calc(100% - 150rpx) !important;
|
||
|
||
.aui-text-danger {
|
||
display: inline-block;
|
||
float: right;
|
||
}
|
||
}
|
||
|
||
.original_price {
|
||
font-size: 28rpx !important;
|
||
font-weight: 500;
|
||
color: #999 !important;
|
||
white-space: nowrap;
|
||
text-decoration: line-through;
|
||
float: left;
|
||
margin-top: 6rpx;
|
||
}
|
||
|
||
.price {
|
||
width: auto;
|
||
font-size: 30rpx;
|
||
font-weight: 600;
|
||
float: right;
|
||
margin-right: 10rpx;
|
||
color: #333;
|
||
}
|
||
|
||
.normal_box_top .price_box {
|
||
width: auto;
|
||
overflow: hidden;
|
||
margin-top: 20rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
|
||
|
||
.vip_price_jg{
|
||
color: red;
|
||
font-weight: bold;
|
||
}
|
||
.vip_price_text{
|
||
color: red;
|
||
padding-left: 10rpx;
|
||
font-size: 24rpx;
|
||
font-weight: normal;
|
||
}
|
||
.vip_price_line{
|
||
color: #666;
|
||
text-decoration: line-through;
|
||
padding-left: 15rpx;
|
||
}
|
||
}
|
||
|
||
.commonTags {
|
||
margin-right: 20rpx;
|
||
margin-top: -5rpx !important;
|
||
}
|
||
|
||
.sales_number {
|
||
text-decoration: none;
|
||
color: #b0b0b0;
|
||
font-weight: 500;
|
||
}
|
||
/deep/.common_curriculum_list {
|
||
margin-top: 20rpx;
|
||
padding: 20rpx 20rpx 20rpx;
|
||
|
||
.content_item {
|
||
width: 100% !important;
|
||
margin-bottom: 0 !important;
|
||
padding: 15rpx 0 0rpx;
|
||
border-top: 1rpx solid #f1f0f0;
|
||
// height: 160rpx;
|
||
|
||
.book_image {
|
||
width: 60rpx !important;
|
||
height: 60rpx !important;
|
||
float: left !important;
|
||
background-color: #f5f5f5;
|
||
}
|
||
|
||
.common_curriculum_item {
|
||
width: calc(100% - 88rpx);
|
||
float: right;
|
||
display: block !important;
|
||
|
||
// overflow: hidden;
|
||
|
||
.related_courses_name {
|
||
width: 100% !important;
|
||
}
|
||
}
|
||
}
|
||
|
||
.content_item:nth-child(1) {
|
||
border-top: none !important;
|
||
}
|
||
}
|
||
|
||
/deep/.common_section {
|
||
padding: 0 !important;
|
||
padding-bottom: 20rpx !important;
|
||
}
|
||
|
||
.goods_detail_list_title {
|
||
display: block;
|
||
padding-top: 20rpx;
|
||
padding-bottom: 40rpx;
|
||
|
||
.linlanzhifu {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.other_info {
|
||
font-size: 28rpx;
|
||
// color: #aaa;
|
||
color: #5a5a5a;
|
||
|
||
.explain {}
|
||
}
|
||
|
||
.left {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.right {
|
||
font-size: 24rpx;
|
||
font-weight: 500 !important;
|
||
color: #999;
|
||
font-family: none;
|
||
}
|
||
}
|
||
|
||
.commonPageContentBox {
|
||
height: auto !important;
|
||
}
|
||
|
||
.minus {
|
||
width: 50rpx;
|
||
height: 50rpx;
|
||
border-width: 2rpx;
|
||
border-color: #e6e6e6;
|
||
border-right-color: transparent;
|
||
|
||
border-top-left-radius: 10rpx;
|
||
border-bottom-left-radius: 10rpx;
|
||
border-style: solid;
|
||
@include flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
|
||
.input {
|
||
padding: 0 10px;
|
||
height: 50rpx;
|
||
border: 1rpx solid #e6e6e6;
|
||
}
|
||
|
||
.plus {
|
||
width: 50rpx;
|
||
height: 50rpx;
|
||
border-width: 2rpx;
|
||
border-color: #e6e6e6;
|
||
border-left-color: transparent;
|
||
border-style: solid;
|
||
// background-color: #3AB3AE;
|
||
|
||
border-top-right-radius: 10rpx;
|
||
border-bottom-right-radius: 10rpx;
|
||
/* #ifndef APP-NVUE */
|
||
display: flex;
|
||
/* #endif */
|
||
justify-content: center;
|
||
align-items: center;
|
||
color: $themeColor;
|
||
}
|
||
|
||
.order_bottom_box {
|
||
position: absolute;
|
||
right: 20rpx;
|
||
|
||
.number {
|
||
font-size: 26rpx;
|
||
margin-right: 15rpx;
|
||
margin-top: 5rpx;
|
||
}
|
||
|
||
.price {
|
||
.total {
|
||
font-size: 30rpx;
|
||
color: red;
|
||
}
|
||
}
|
||
}
|
||
|
||
/deep/.goods_nav_box {
|
||
background-color: #fff;
|
||
.left {
|
||
margin-top: -10rpx;
|
||
width: calc(100% - 220rpx);
|
||
height: auto;
|
||
position: relative;
|
||
}
|
||
.right .button{
|
||
margin-left: 0;
|
||
}
|
||
}
|
||
|
||
.explain {
|
||
word-wrap: break-word;
|
||
word-break: normal;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.order_bottom_box {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.pay_box {
|
||
.pay_item {
|
||
border-bottom: 1rpx solid #eeecec;
|
||
padding-top: 20rpx;
|
||
justify-content: space-between;
|
||
|
||
.top {
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.left {
|
||
line-height: 50rpx;
|
||
font-family: MicrosoftYaHei;
|
||
font-weight: 500;
|
||
|
||
color: #242323;
|
||
|
||
.pay_item_img {
|
||
width: 50rpx;
|
||
height: 50rpx;
|
||
float: left;
|
||
margin-right: 20rpx;
|
||
}
|
||
.pay_item_img_icon{
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
float: left;
|
||
margin-right: 8rpx;
|
||
}
|
||
}
|
||
|
||
.bottom {
|
||
width: calc(100% - 60rpx);
|
||
float: right;
|
||
// background-color: #dcdfe6;
|
||
background-color: #f5f5f5;
|
||
border-radius: 20rpx;
|
||
margin-top: 20rpx;
|
||
|
||
.jf_box {
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0 20rpx;
|
||
box-sizing: border-box;
|
||
justify-content: space-between;
|
||
color: #aaa;
|
||
}
|
||
|
||
.jf_input {
|
||
width: calc(100% - 320rpx) !important;
|
||
padding: 10rpx 0;
|
||
box-sizing: border-box;
|
||
}
|
||
}
|
||
}
|
||
|
||
/deep/.pay_item:nth-last-child(1) {
|
||
border-bottom: none !important;
|
||
}
|
||
}
|
||
|
||
.linlanzhifu {
|
||
font-size: 28rpx;
|
||
line-height: 24rpx;
|
||
}
|
||
|
||
.address_box {
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 30rpx 20rpx;
|
||
|
||
.order_top {
|
||
background-color: #fff;
|
||
}
|
||
|
||
.user_info {
|
||
width: 100%;
|
||
float: left;
|
||
display: flex;
|
||
align-items: center;
|
||
|
||
.name {
|
||
color: #838282;
|
||
margin-right: 10rpx;
|
||
}
|
||
|
||
.tel {
|
||
color: #838282;
|
||
}
|
||
}
|
||
|
||
.curriulum_title {
|
||
width: auto;
|
||
font-size: 30rpx;
|
||
font-weight: 700;
|
||
float: left;
|
||
margin-right: 10rpx;
|
||
color: #333;
|
||
line-height: 40rpx;
|
||
letter-spacing: 2rpx;
|
||
}
|
||
|
||
.normal_box {
|
||
margin-left: 5rpx;
|
||
width: calc(100% - 120rpx);
|
||
}
|
||
|
||
.goods_box {
|
||
padding: 20rpx 20rpx;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.rightArrow {
|
||
margin-left: 40rpx;
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
// position: absolute;
|
||
// right: 30rpx;
|
||
}
|
||
}
|
||
|
||
.rightArrow {
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
// position: absolute;
|
||
// right: 30rpx;
|
||
}
|
||
|
||
.orderModalShow {
|
||
width: 100%;
|
||
max-height: 48vh;
|
||
padding-bottom: 120rpx;
|
||
}
|
||
|
||
.popup_box {
|
||
.curriulum_title_box {
|
||
.title {
|
||
text-align: center;
|
||
font-size: 34rpx !important;
|
||
padding-top: 15rpx !important;
|
||
margin-bottom: 30rpx !important;
|
||
}
|
||
}
|
||
}
|
||
.name_px{
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
|
||
text{
|
||
font-size: 28rpx;
|
||
}
|
||
.name_input{
|
||
width: 250rpx;
|
||
}
|
||
}
|
||
/deep/.u-input{
|
||
height: 65rpx;
|
||
line-height: 65rpx;
|
||
}
|
||
/deep/.uni-input-placeholder{
|
||
font-size: 28rpx;
|
||
}
|
||
/deep/.uni-input-input{
|
||
font-size: 28rpx;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
}
|
||
</style> |