diff --git a/coupon/details.html b/coupon/details.html index 27d7095..875152b 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -14,8 +14,6 @@ - - @@ -217,16 +215,12 @@ goodsShow: [ 'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220120/9bedd7af6a8a570be8f2858564f9ec6d.png' ], - show: false, /* 控制支付弹窗 */ - payType: 1, /* 支付方式 */ - /* 提示框状态 */ popShow: false, popTitle: '', popText: '', popStatus: 1, /*1 成功 2提示 3失败 */ bottomText: '', /* 复制按钮 */ - href: '',/* 支付地址 */ receive_time: {}, orderNumber: '', isLogin: false,/* 是否跳登录页 */ @@ -344,6 +338,7 @@ methods: { bindAvailable () { + console.log(347,goodsDetail); if (goodsDetail.available != 1) { this.openErrorDialog(product_status(goodsDetail.available, goodsDetail)); return @@ -416,16 +411,6 @@ /* 弹窗回调 */ 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) { this.delayedOut() } @@ -441,11 +426,16 @@ //兑换商品 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 (goodsDetail.available != 1) { - this.openErrorDialog(product_status(goodsDetail.available, goodsDetail)); - return - } if (!this.account) { this.openDialog('请输入兑换账号!'); return false; @@ -523,7 +513,6 @@ } } localStorage.setItem('account', this.reAccount); - // this.show = true window.location.href = './settlement.html'; },