From 82a2b2e6344d31c99827f42d987e2e6ee74a94be Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Tue, 14 Oct 2025 14:06:31 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E6=9C=89=E8=83=BD=E5=A4=9F=E5=B7=B2=E7=BB=8F?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E7=9A=84=E8=AE=BE=E5=A4=87=E6=89=8D=E8=83=BD?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=8E=A7=E5=88=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- page_user/luru/bind_mac.vue | 4 +++- page_user/luru/index.vue | 7 +++++-- utils/request.js | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/page_user/luru/bind_mac.vue b/page_user/luru/bind_mac.vue index 39ca132..4aeeca8 100644 --- a/page_user/luru/bind_mac.vue +++ b/page_user/luru/bind_mac.vue @@ -53,7 +53,7 @@ 确认添加 返回 - 去控制台 + 去控制台 @@ -139,6 +139,7 @@ export default { kashow: false, kaname: "", kaid: "", + isBandFromRoute: false, }; }, onLoad(e) { @@ -147,6 +148,7 @@ export default { }); xBlufi.listenDeviceMsgEvent(true, this.funListenDeviceMsgEvent); this.mac = e.mac; + this.isBandFromRoute = e.isBand == 1 || e.isBand === "1" || e.isBand === true; this.findDevice(); this.isbands = false; this.carstause = false; diff --git a/page_user/luru/index.vue b/page_user/luru/index.vue index b94021b..fc61afd 100644 --- a/page_user/luru/index.vue +++ b/page_user/luru/index.vue @@ -124,7 +124,7 @@ export default { xBlufi.notifyStartDiscoverBle({ isStart: true }); setTimeout(() => { xBlufi.notifyStartDiscoverBle({ isStart: false }); - if (this.devicesList.length == 0) { + if (this.devicesList.length === 0) { this.tishiflag = true; this.texts = "扫描完毕,请操作"; } else { @@ -219,7 +219,10 @@ export default { console.log(e); let Bluetoothmac = e.name.substring(5); uni.navigateTo({ - url: "/page_user/luru/bind_mac?mac=" + Bluetoothmac, + url: + "/page_user/luru/bind_mac?mac=" + + Bluetoothmac + + "&isBand=" + (e.isBand ? 1 : 0), }); }, send() { diff --git a/utils/request.js b/utils/request.js index e760b38..4456d42 100644 --- a/utils/request.js +++ b/utils/request.js @@ -143,8 +143,8 @@ function handleResponseError(res, reject, options = {}) { export function request(options = {}) { return new Promise((resolve, reject) => { // 获取token,优先使用本地存储的token,如果没有则使用临时token - const localToken = uni.getStorageSync("token"); - let token = localToken; + + let token = uni.getStorageSync("token"); // 如果本地没有token且启用了临时token,则使用临时token if (!token && shouldUseTempToken() && !options.noToken) {