taro开发钉钉小程序,打包后真机测试tabbar丢失解决方案,以及在小程序上使用路由守卫

吐槽一下,最近公司让我搞钉钉小程序,因为公司用的是taro框架,本来这个框架的社区人就比较少,taro开发钉钉小程序的人更少,以致于遇到的bug和坑在网上都找不到解决方案,挺难受的。今天搞定taro编译钉钉小程序真机测试时底部tabbar丢失问题,分享一下解决方案。

taro开发钉钉小程序,打包后真机测试tabbar丢失解决方案,以及在小程序上使用路由守卫_第1张图片

 在taro编译成小程序的时候,在开发工具的模拟器里面,通过配置app.config.ts文件配置tabbar,是可以正常显示的,配置如下

//app.config.ts
tabBar: {
    custom: false,
    color: PRIMARY_COLOR,
    selectedColor: PRIMARY_COLOR,
    backgroundColor: '#ffffff',
    borderStyle: 'white',
    list: [
      {
        text: '首页',
        pagePath: 'pages/tab-bar/index',
        iconPath: 'assets/tabbar-icon/deafult/index.png',
        selectedIconPath: 'assets/tabbar-icon/selected/index.png'
      },
      {
        text: 'CRM',
        pagePath: 'pages/tab-bar/crm',
        iconPath: 'assets/tabbar-icon/deafult/crm.png',
        selectedIconPath: 'assets/tabbar-icon/selected/crm.png'
      },
      {
        text: '财务',
        pagePath: 'pages/tab-bar/finance',
        iconPath: 'assets/tabbar-icon/deafult/finance.png',
        selectedIconPath: 'assets/tabbar-icon/selected/finance.png'
      },
      {
        text: '审批',
        pagePath: 'pages/tab-bar/oa',
        iconPath: 'assets/tabbar-icon/deafult/oa.png',
        selectedIconPath: 'assets/tabbar-icon/selected/oa.png'
      },
      {
        text: '我的',
 

你可能感兴趣的:(小程序,taro,钉钉,前端)