feat(商品详情页):增加wait_pay_order,判断有无订单

This commit is contained in:
Apple 2022-11-10 14:27:54 +08:00
parent b7bd8f59e0
commit 324ab3129b
1 changed files with 10 additions and 21 deletions

View File

@ -14,8 +14,6 @@
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet"> <link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/details.css?v=12"> <link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/details.css?v=12">
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js"></script> <script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/api2_0.js"></script>
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/payPop.css">
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/payPop.js"></script>
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/modelPop.js"></script> <script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/common/modelPop.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.4.1/vconsole.min.js"></script> <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.4.1/vconsole.min.js"></script>
</head> </head>
@ -217,16 +215,12 @@
goodsShow: [ goodsShow: [
'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220120/9bedd7af6a8a570be8f2858564f9ec6d.png' 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220120/9bedd7af6a8a570be8f2858564f9ec6d.png'
], ],
show: false, /* 控制支付弹窗 */
payType: 1, /* 支付方式 */
/* 提示框状态 */ /* 提示框状态 */
popShow: false, popShow: false,
popTitle: '', popTitle: '',
popText: '', popText: '',
popStatus: 1, /*1 成功 2提示 3失败 */ popStatus: 1, /*1 成功 2提示 3失败 */
bottomText: '', /* 复制按钮 */ bottomText: '', /* 复制按钮 */
href: '',/* 支付地址 */
receive_time: {}, receive_time: {},
orderNumber: '', orderNumber: '',
isLogin: false,/* 是否跳登录页 */ isLogin: false,/* 是否跳登录页 */
@ -344,6 +338,7 @@
methods: { methods: {
bindAvailable () { bindAvailable () {
console.log(347,goodsDetail);
if (goodsDetail.available != 1) { if (goodsDetail.available != 1) {
this.openErrorDialog(product_status(goodsDetail.available, goodsDetail)); this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
return return
@ -416,16 +411,6 @@
/* 弹窗回调 */ /* 弹窗回调 */
backFunctionPop (type) { backFunctionPop (type) {
if (this.bottomText === '点击复制' && type) {
var aux = document.createElement("input");
aux.setAttribute("value", this.href);
document.body.appendChild(aux);
aux.select();
document.execCommand("copy");
document.body.removeChild(aux);
this.openDialog('复制成功')
}
if (this.isLogin) { if (this.isLogin) {
this.delayedOut() this.delayedOut()
} }
@ -441,11 +426,16 @@
//兑换商品 //兑换商品
exchangeGoodsFn () { exchangeGoodsFn () {
//wait_pay_order 1有订单 5无订单
if (goodsDetail.wait_pay_order == 1) {
this.openErrorDialog('您有未支付的订单');
return
}
if (goodsDetail.available != 1) {
this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
return
}
if (this.goodsDetail.type === 1 && this.goodInfo.product_type === 1) { /* 兑换码 */ if (this.goodsDetail.type === 1 && this.goodInfo.product_type === 1) { /* 兑换码 */
if (goodsDetail.available != 1) {
this.openErrorDialog(product_status(goodsDetail.available, goodsDetail));
return
}
if (!this.account) { if (!this.account) {
this.openDialog('请输入兑换账号!'); this.openDialog('请输入兑换账号!');
return false; return false;
@ -523,7 +513,6 @@
} }
} }
localStorage.setItem('account', this.reAccount); localStorage.setItem('account', this.reAccount);
// this.show = true
window.location.href = './settlement.html'; window.location.href = './settlement.html';
}, },