Skip to content

tabbar全局策略配置为TABBAR_STRATEGY_MAP.NO_TABBAR,store 中的isPageTabbar依然会误将之前的页面判断为tabbar 界面 #215

Description

@liangxp

tabbar全局策略配置为TABBAR_STRATEGY_MAP.NO_TABBAR,store 中的isPageTabbar依然会误将之前的页面判断为tabbar 界面

unibest版本:3.15.1
平台:微信小程序
期望:isPageTabbar判断返回 false
实际:isPageTabbar判断返回 true

Steps to reproduce(问题复现步骤)

1、修改tabbar/config.ts 中

// TODO: 1/3. 通过这里切换使用tabbar的策略
// 如果是使用 NO_TABBAR(0),nativeTabbarList 和 customTabbarList 都不生效(里面的配置不用管)
// 如果是使用 NATIVE_TABBAR(1),只需要配置 nativeTabbarList,customTabbarList 不生效
// 如果是使用 CUSTOM_TABBAR(2,3),只需要配置 customTabbarList,nativeTabbarList 不生效
export const selectedTabbarStrategy = TABBAR_STRATEGY_MAP.NO_TABBAR

2、在原本 pages/login/login.vue 中用到了isPageTabbar的判断,错误的判断isPageTabbar返回 true 导致页面跳转错误,错误如下:

Error: MiniProgramError
{"errMsg":"switchTab:fail can not switch to no-tabBar page"}
    at Object.errorReport (WAServiceMainContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Function.thirdErrorReport (WAServiceMainContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Object.thirdErrorReport (WAServiceMainContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at i (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Object.cb (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Z._privEmit (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Z.emit (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1
    at n (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)
    at Ge (WASubContext.js?t=wechat&s=1757662848129&v=3.9.3:1)(env: macOS,mp,1.06.2412050; lib: 3.9.3)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions