From 6fec59bea4e7fa4c248d3b194e911932feca6cc8 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 23 Feb 2024 10:26:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E5=8C=85=E7=A0=81?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 0fa4504..ef94a17 100644 --- a/index.html +++ b/index.html @@ -164,8 +164,9 @@ localStorage.setItem('haskey', keyCode); // 判断是否是包码逻辑 - self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); - + if (res.data.settlement_data) { + self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + } this.openDialog('正在加载商品...'); localStorage.setItem('entryLink', window.location.href);//存储起始页链接 @@ -222,7 +223,7 @@ // 判断是否是包码 跳转对应的包码页面 **** goToPackKey(data) { // 第一步:判断是否为包码 - if (data.settlement_data.settlement_type > 0) { + if (data.settlement_data && data.settlement_data.settlement_type > 0) { // 存储数据 sessionStorage.setItem("bm_auth", JSON.stringify(data)); // 跳转包码页面 @@ -289,7 +290,9 @@ localStorage.setItem('entryLink', window.location.href);//存储起始页链接 // 判断是否是包码逻辑 - self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + if (res.data.settlement_data) { + self.goToPackKey({ token: res.data.token, settlement_data: res.data.settlement_data }); + } // 存储 setTimeout(() => { @@ -330,9 +333,11 @@ }; let wait = await req.axiosPost('/key/loginFromMobileKey', data).then(res => { if (res.code == 200) { - // 判断是否是包码逻辑 - self.goToPackKey({ token: res.data.data, settlement_data: res.data.settlement_data }); + if (res.data.settlement_data) { + // 判断是否是包码逻辑 + self.goToPackKey({ token: res.data.data, settlement_data: res.data.settlement_data }); + } getTokenList.push(res.data.token); istoGoods = true;