From 62a7684e792345fe77fed46329fb3f72c8345a62 Mon Sep 17 00:00:00 2001 From: xiaowang <2161656029@qq.com> Date: Thu, 16 Jul 2026 14:27:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=97=E5=8A=A1=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=99=BB=E5=BD=95=E9=80=89=E5=BA=97=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JY-Salon-WeChat/pages/login/index.js | 15 +++++---------- memory/bugs.md | 7 +++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/JY-Salon-WeChat/pages/login/index.js b/JY-Salon-WeChat/pages/login/index.js index 62ca5a47..c4e73cb3 100644 --- a/JY-Salon-WeChat/pages/login/index.js +++ b/JY-Salon-WeChat/pages/login/index.js @@ -321,6 +321,10 @@ Page({ async openLoginShopSelector() { const shopOptions = await this.loadLoginShopOptions() + if (shopOptions.length === 1) { + await this.loginWithSelectedShop(shopOptions[0].id) + return + } this.setData({ shopOptions, shopSelectVisible: true, @@ -336,15 +340,6 @@ Page({ }) }, - async tryOpenLoginShopSelector() { - try { - await this.openLoginShopSelector() - return true - } catch (error) { - return false - } - }, - async selectLoginShop(event) { if (this.data.switchingShop) { return @@ -437,7 +432,7 @@ Page({ this.saveLoginPreference() wx.reLaunch({ url: '/pages/planning/index' }) } catch (error) { - if (isShopSelectionRequiredError(error) || await this.tryOpenLoginShopSelector()) { + if (isShopSelectionRequiredError(error)) { try { if (!this.data.shopSelectVisible) { await this.openLoginShopSelector() diff --git a/memory/bugs.md b/memory/bugs.md index e161440a..87db0ea5 100644 --- a/memory/bugs.md +++ b/memory/bugs.md @@ -49,3 +49,10 @@ - 原因:`journalctl` 默认会输出提示性文本,直接计数无法区分真实日志和提示行。 - 处理方式:日志计数使用 `journalctl -q ...`,并只输出安全计数或关键词类型,不输出日志正文。 - 以后避免:上线验收中的日志安全计数必须加 `-q`,发现非零后再用脱敏方式定位,不直接打印生产日志全文。 + +## 2026-07-16 店务小程序登录失败不能触发店铺选择 + +- 问题:密码错误后登录页仍弹出“选择店铺”,遮挡表单导致无法重新输入。 +- 原因:登录失败的通用 catch 分支会继续按账号预查店铺;账号存在但密码错误时也能查到绑定店铺,于是误以为需要选店。 +- 处理方式:店铺选择只在登录接口明确返回需要选择登录店铺时触发;只有一个店铺时直接调用选店登录;删除任意错误后的店铺预查兜底。 +- 以后避免:登录失败处理不要调用不依赖登录凭证的店铺预查接口;选店弹窗必须由已通过登录校验的响应或明确的选店错误触发。