美文网首页我爱编程
微信小程序的底部路由跳转

微信小程序的底部路由跳转

作者: 郭的妻 | 来源:发表于2018-06-02 16:02 被阅读3次

    底部路由跳转

     那个文件需要跳转,就要在app.json文件中引入
      {
           "pages":[
          "pages/index/index",
          "pages/list/list",
          "pages/cart/cart",
          "pages/my/my",
          "pages/logs/logs"
           ],
    // 底部  路由
    "tabBar": {
       // 默认不选中的文字的颜色
      "color": "#bfbfbf",
      //  选中的颜色
      "selectedColor": "#d81e06",
      "list": [
        {
          "selectedIconPath": "./static/icon/home1.png",   // 选中的icon的路径
          "iconPath": "./static/icon/home.png",  //  默认未选中的icon的路径
          "pagePath": "pages/index/index",    //  文件路径
          "text": "首页"  // icon下面的文字
        },
        {
        "selectedIconPath": "./static/icon/list1.png",
        "iconPath": "./static/icon/list.png",
        "pagePath": "pages/list/list",
        "text": "分类"
        },
        {
          "selectedIconPath": "./static/icon/shopCar1.png",
          "iconPath": "./static/icon/shopCar.png",
          "pagePath": "pages/cart/cart",
          "text": "购物车"
        },
        {
          "selectedIconPath": "./static/icon/user1.png",
          "iconPath": "./static/icon/user.png",
          "pagePath": "pages/my/my",
          "text": "个人"
        }
      ]
     }
    }

    相关文章

      网友评论

        本文标题:微信小程序的底部路由跳转

        本文链接:https://www.haomeiwen.com/subject/jjursftx.html