修复小程序登录店铺选择流程
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user