| | |
| | | const switchTab = (option: Taro.switchTab.Option) => { |
| | | const index = TabBarPageRouterList.findIndex((x) => option.url.includes(x)); |
| | | console.log('index: ', index); |
| | | systemStore.setTabIndex(index); |
| | | Taro.switchTab(option); |
| | | Taro.switchTab(option).then(() => { |
| | | systemStore.setTabIndex(index); |
| | | }); |
| | | httpLoggerRecord.info({ |
| | | message: `[switchTab]`, |
| | | args: [option, { index, TabBarPageRouter }], |
| | |
| | | const switchTab = (option: Taro.switchTab.Option) => { |
| | | const index = TabBarPageRouterList.findIndex((x) => option.url.includes(x)); |
| | | console.log('index: ', index); |
| | | systemStore.setTabIndex(index); |
| | | Taro.switchTab(option); |
| | | Taro.switchTab(option).then(() => { |
| | | systemStore.setTabIndex(index); |
| | | }); |
| | | }; |
| | | return switchTab; |
| | | } |