This commit is contained in:
2025-04-18 16:32:32 +08:00
parent 09c087508f
commit 8e44473164
74 changed files with 24833 additions and 10335 deletions

View File

@@ -285,8 +285,8 @@ export default {
detailInfo: {},
fdButtonStyle: {
width: "90rpx",
"border-color": "#258feb",
color: "#258feb",
"border-color": "#3AB3AE ",
color: "#3AB3AE ",
float: "right",
"margin-right": "20rpx",
"margin-left": "30rpx",
@@ -511,6 +511,14 @@ export default {
return;
}
let data = {
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
orderMoney: this.dataInfo.lastFee, //订单金额
realMoney: Number(this.dataInfo.lastFee - this.jfNumber), //实际金额
shippingMoney: 0, //运费
jfDeduction: this.jfNumber, //积分抵扣
vipBuyConfigId: this.dataInfo.id,
come: 2, //订单来源0疯子读书1国学众妙之门2医学吴门医
paymentMethod: this.payType, //1微信2支付宝3苹果支付4虚拟币
orderMoney: this.dataInfo.lastFee, //订单金额
realMoney: this.dataInfo.lastFee, //实际金额
@@ -536,55 +544,30 @@ export default {
icon: "none",
image: "../../../static/icon/ic_close.png",
});
} 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/bookShop/orderList?type=order",
});
}, 1000);
} else {
setTimeout(() => {
console.log("延迟调用 失败提示");
uni.showToast({
title: "支付失败",
image: "../../../static/icon/ic_close.png",
});
}, 0);
}
},
);
} else if (this.payType == 1) {
// 微信支付
let data1 = {
orderSn: res.orderSn,
buyOrderId: null,
return;
}
if (that.payType == 2) {
// 常规支付
uni.showToast({
title: "正在支付",
icon: "loading",
});
await setPay(
{
typePay: "alipay",
subject: "vip",
totalAmount: res.money,
};
setWXPay(data1, (res) => {
type: 2,
relevanceoid: res.orderSn,
customerId: that.userInfo.id,
},
(res) => {
uni.showLoading({
title: "加载中",
});
console.log(res, "支付支付");
if (res.success) {
uni.showToast({
title: "支付成功",
@@ -595,33 +578,61 @@ export default {
});
}, 1000);
} else {
if (res.data.errMsg.indexOf("User canceled") != -1) {
uni.showToast({
title: "用户取消支付",
icon: "none",
image: "../../../static/icon/ic_close.png",
});
} else {
setTimeout(() => {
console.log("延迟调用 失败提示");
uni.showToast({
title: "支付失败",
icon: "none",
image: "../../../static/icon/ic_close.png",
});
}
}, 0);
}
});
} else if (this.payType == 4) {
// 天医币支付
uni.showToast({
title: "购买成功",
icon: "success",
});
setTimeout(() => {
uni.switchTab({
url: "/pages/bookShop/orderList?type=order",
}
);
} else if (this.payType == 1) {
// 微信支付
let data1 = {
orderSn: res.orderSn,
buyOrderId: null,
totalAmount: res.money,
};
setWXPay(data1, (res) => {
if (res.success) {
uni.showToast({
title: "支付成功",
});
}, 1000);
}
setTimeout(() => {
uni.switchTab({
url: "/pages/bookShop/orderList?type=order",
});
}, 1000);
} else {
if (res.data.errMsg.indexOf("User canceled") != -1) {
uni.showToast({
title: "用户取消支付",
icon: "none",
image: "../../../static/icon/ic_close.png",
});
} else {
uni.showToast({
title: "支付失败",
icon: "none",
image: "../../../static/icon/ic_close.png",
});
}
}
});
} else if (this.payType == 4) {
console.log('4 at line 624:', 4)
// 天医币支付
uni.showToast({
title: "购买成功",
icon: "success",
});
setTimeout(() => {
uni.switchTab({
url: "/pages/bookShop/orderList?type=order",
});
}, 1000);
}
}
});
@@ -1171,7 +1182,7 @@ export default {
border-color: #e6e6e6;
border-left-color: transparent;
border-style: solid;
// background-color: #258feb;
// background-color: #3AB3AE ;
border-top-right-radius: 10rpx;
border-bottom-right-radius: 10rpx;