From 4a4ffcfe72954db93a2a74a3fbc2cad01350bd4f Mon Sep 17 00:00:00 2001 From: zhangds Date: Thu, 22 Feb 2024 15:51:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=96=AD=E7=94=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- orderDetails/cardOrder.html | 8 +++++++- packkey/exchange.html | 8 +++++++- packkey/index.html | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/orderDetails/cardOrder.html b/orderDetails/cardOrder.html index dee16fe..e59349a 100644 --- a/orderDetails/cardOrder.html +++ b/orderDetails/cardOrder.html @@ -79,7 +79,13 @@ type: settlementType } req.axiosPost('/key/settlement/create', params).then(res => { - console.log("点 =>", res) + console.log("点 =>", res); + if (res.code === 200) { + // 接口请求成功后,就不能再请求接口了 + let obj_sy = JSON.parse(sessionStorage.getItem("bm_auth")); + obj_sy.settlement_data.is_settlement = true; + sessionStorage.setItem("bm_auth", JSON.stringify(obj_sy)); + } }); } diff --git a/packkey/exchange.html b/packkey/exchange.html index beaae51..7ca101c 100644 --- a/packkey/exchange.html +++ b/packkey/exchange.html @@ -108,7 +108,13 @@ type: settlementType } req.axiosPost('/key/settlement/create', params).then(res => { - console.log("点 =>", res) + if (res.code === 200) { + // 接口请求成功后,就不能再请求接口了 + let obj_sy = JSON.parse(sessionStorage.getItem("bm_auth")); + obj_sy.settlement_data.is_settlement = true; + sessionStorage.setItem("bm_auth", JSON.stringify(obj_sy)); + } + console.log("点 =>", res); }); } diff --git a/packkey/index.html b/packkey/index.html index 8ae6055..b5cf89f 100644 --- a/packkey/index.html +++ b/packkey/index.html @@ -75,6 +75,12 @@ type: settlementType } req.axiosPost('/key/settlement/create', params).then(res => { + if (res.code === 200) { + // 接口请求成功后,就不能再请求接口了 + let obj_sy = JSON.parse(sessionStorage.getItem("bm_auth")); + obj_sy.settlement_data.is_settlement = true; + sessionStorage.setItem("bm_auth", JSON.stringify(obj_sy)); + } console.log("点 =>", res) }); }