From 9044eeab10c8d1cf8f7fd16226471ba4c8a7137d Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Thu, 23 Nov 2023 13:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E5=85=91=E6=8D=A2=E7=A0=81?= =?UTF-8?q?=E5=8D=A1=E5=AF=86=E8=AE=A2=E5=8D=95=E7=9B=B4=E6=8E=A5=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=8D=A1=E5=AF=86=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exchange.html | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/exchange.html b/exchange.html index 9fc726a..c414f3f 100644 --- a/exchange.html +++ b/exchange.html @@ -29,6 +29,8 @@ + + @@ -90,6 +92,11 @@
+ +
+ +
+
{ + if (res.code == 200) { + localStorage.setItem('cardProductDetail', JSON.stringify(res.data)); + window.location.replace('./coupon/lookCard.html'); + } else { + this.openErrorDialog(res.message); + } + }); }, //兑换商品 @@ -319,19 +344,26 @@ self.popboxshow = false; req.axiosPost('/key/usage', data).then(res => { if (res.code == 200) { + this.popboxtype = '成功'; sessionStorage.setItem('lastid', self.goodInfo.product_id); - // 查询订单接口 + if (this.goodInfo.product_type === 2) { if (this.goodInfo.card_show == 2) { - this.successTip = '兑换成功,请到页面左下角"订单"(订单列表处)查看卡密信息!'; + this.loading = true; + this.order_number = res.data.order_number; + this.successTip = '兑换成功!'; + setTimeout(() => { + this.popboxshow = true; + this.loading = false; + }, 3000); } else { this.successTip = '兑换成功,请到注意查收手机短信!'; + this.popboxshow = true; } } else { this.successTip = '兑换成功,到账信息请关注官方APP!'; + this.popboxshow = true; } - this.popboxtype = '成功'; - this.popboxshow = true; } else { this.openErrorDialog(res.message);