From fac2576b65ac33d6a53533244cb53cae86f4f3a2 Mon Sep 17 00:00:00 2001 From: zhangyibo95 <690096405@qq.com> Date: Mon, 3 Aug 2026 16:39:52 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=96=B0=E5=A2=9E=E8=B0=83=E7=9E=84?= =?UTF-8?q?=E9=80=9A=E4=BF=A1=EF=BC=8C=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis.js | 19 ++++++++++ src/components/AppFooter.vue | 8 +++- src/pages/calibration.vue | 73 +++++++++++++++++++++++++++++++++--- src/pages/index.vue | 10 +++-- 4 files changed, 99 insertions(+), 11 deletions(-) diff --git a/src/apis.js b/src/apis.js index 9c47724..892485e 100644 --- a/src/apis.js +++ b/src/apis.js @@ -493,6 +493,25 @@ export const laserAimAPI = async () => { return request("POST", "/user/device/laserAim"); }; +// 调瞄续期只负责发送请求,不等待或处理响应,避免阻塞下一次续期。 +export const aimRenewAPI = () => { + const token = uni.getStorageSync( + `${uni.getAccountInfoSync().miniProgram.envVersion}_token` + ); + const header = {}; + if (token) header.Authorization = `Bearer ${token}`; + + uni.request({ + url: `${BASE_URL}/user/device/aimRenew`, + method: "POST", + header, + data: {}, + timeout: 10000, + success: () => {}, + fail: () => {}, + }); +}; + export const laserCloseAPI = async () => { return request("POST", "/user/device/closeAim"); }; diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue index f65b8fc..e58e45a 100644 --- a/src/components/AppFooter.vue +++ b/src/components/AppFooter.vue @@ -43,9 +43,13 @@ function handleTabClick(index) {