From 47c38dc09ba8353a45e433320c4135533fea813c Mon Sep 17 00:00:00 2001
From: wangsongsole
Date: Wed, 22 Nov 2023 14:09:12 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E4=BF=AE=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
zfb-redPackets.css | 13 +++++++++++++
zfb-redPackets.html | 41 +++++++++++++++++++++++++++--------------
zfb-reduce.html | 11 ++++++++---
3 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/zfb-redPackets.css b/zfb-redPackets.css
index 82e0a1d..d5ba093 100644
--- a/zfb-redPackets.css
+++ b/zfb-redPackets.css
@@ -213,6 +213,19 @@ body {
.but {
margin-bottom: 0.3rem;
+ background: linear-gradient(#fff9df, #ffc078, #ffe69e);
+ border-radius: 1rem;
+ height: 0.42rem;
+ border: 0;
+ outline: 0;
+ color: #be6822;
+ font-size: 0.16rem;
+ font-weight: 600;
+ border: 0.02rem solid #fed2b9;
+}
+
+.dis {
+ filter: opacity(0.9);
}
.f-title {
diff --git a/zfb-redPackets.html b/zfb-redPackets.html
index 056a435..d2ddf2a 100644
--- a/zfb-redPackets.html
+++ b/zfb-redPackets.html
@@ -46,11 +46,13 @@
@@ -129,11 +131,6 @@
mounted () {
document.title = localStorage.getItem('title');
-
- /* 初始弹窗 */
- if (![1, 9].includes(this.goodsInfo.available)) {
- this.tip(product_status(this.goodsInfo.available, this.goodsInfo), 2);
- }
},
methods: {
@@ -158,13 +155,23 @@
req.axiosPost("/key/usage", data)
.then(({ code, data, message }) => {
if (code == 200) {
- this.loading = false;
this.judgeEnvironment(data.order_number);
} else {
- this.loading = false;
- this.tip(message, 2, '关闭');
+ if (code == 403) {
+ if (this.backAble) {
+ this.tip(message, 2, '关闭');
+ setTimeout(() => {
+ window.location.href = localStorage.getItem('entryLink');
+ }, 3000);
+ } else {
+ this.tip(message, 2, '关闭');
+ }
+ } else {
+ this.loading = false;
+ this.tip(message, 2, '关闭');
+ }
}
- });
+ }).catch((err) => { this.loading = false; });;
},
@@ -172,8 +179,12 @@
req.axiosPost('/alipay/cash/receive/account', { ...this.form, order_number })
.then(({ code, data, message }) => {
if (code == 200) {
+ this.loading = false;
+ this.goodsInfo.available = 9;
+ sessionStorage.setItem('goodsInfo', JSON.stringify(this.goodsInfo));
this.tip(message, 1, '关闭');
} else {
+ this.loading = false;
if (code == 403) {
if (this.backAble) {
this.tip(message, 2, '关闭');
@@ -187,6 +198,8 @@
this.tip(message, 2, '关闭');
}
}
+ }).catch(() => {
+ this.loading = false;
});
},
diff --git a/zfb-reduce.html b/zfb-reduce.html
index bf440d0..4af1160 100644
--- a/zfb-reduce.html
+++ b/zfb-reduce.html
@@ -166,7 +166,6 @@
/* 创建订单 */
req.axiosPost("/key/usage", data)
.then(({ code, data, message }) => {
- this.loading = false;
if (code == 200) {
this.verificationYsf(data);
} else {
@@ -187,13 +186,19 @@
req.axiosPost("/voucher/grant", params)
.then(({ code, message }) => {
if (code === 200) {
- this.goods.available = 9;
+ this.loading = false;
+
+ this.goodsInfo.available = 9;
+ sessionStorage.setItem('goodsInfo', JSON.stringify(this.goodsInfo));
this.tip('领取成功,请前往【支付宝】-【卡包】中查看', 1);
} else {
+ this.loading = false;
this.axiosErrorFun(code, message, 2);
}
})
- .catch((err) => { });
+ .catch((err) => {
+ this.loading = false;
+ });
},
/* 返回 */