diff --git a/JC-Salon-WeChat/pages/login/index.js b/JC-Salon-WeChat/pages/login/index.js index 94cb1e31..094aef20 100644 --- a/JC-Salon-WeChat/pages/login/index.js +++ b/JC-Salon-WeChat/pages/login/index.js @@ -320,6 +320,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, @@ -436,7 +440,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()