From 329335666871cf192fa344504283ff601acbe4d9 Mon Sep 17 00:00:00 2001 From: linyimin <18316471919@139.com> Date: Mon, 18 May 2026 11:14:54 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E5=88=A0=E9=99=A4=E9=9D=99=E9=BB=98?= =?UTF-8?q?=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/index.vue | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index 72944f5..2020cdb 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -68,28 +68,29 @@ onShow(async () => { const token = uni.getStorageSync(`${env}_token`); if (!user.value.id && !token) { - try { - const wxResult = await uni.login({provider: "weixin"}); - const bindResult = await checkUserBindAPI(wxResult.code); - if (bindResult.binded) { - const newResult = await uni.login({provider: "weixin"}); - const silentResult = await silentLoginAPI(newResult.code); - if (silentResult.user) updateUser(silentResult.user); - const devices = await getMyDevicesAPI(); - if (devices.bindings && devices.bindings.length) { - updateDevice( - devices.bindings[0].deviceId, - devices.bindings[0].deviceName - ); - const data = await getDeviceBatteryAPI(); - updateOnline(data.online); - } - } else { - showModal.value = true; - } - } catch (e) { - console.log("检查绑定状态失败", e); - } + // showModal.value = true; + // try { + // const wxResult = await uni.login({provider: "weixin"}); + // const bindResult = await checkUserBindAPI(wxResult.code); + // if (bindResult.binded) { + // const newResult = await uni.login({provider: "weixin"}); + // const silentResult = await silentLoginAPI(newResult.code); + // if (silentResult.user) updateUser(silentResult.user); + // const devices = await getMyDevicesAPI(); + // if (devices.bindings && devices.bindings.length) { + // updateDevice( + // devices.bindings[0].deviceId, + // devices.bindings[0].deviceName + // ); + // const data = await getDeviceBatteryAPI(); + // updateOnline(data.online); + // } + // } else { + // showModal.value = true; + // } + // } catch (e) { + // console.log("检查绑定状态失败", e); + // } } const promises = [getScoreRankList(undefined, 1, 10)];