说明文档:https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html

    例如配置一个底部的tab

    1. {
    2. "pages": [
    3. "pages/index/index",
    4. "pages/index2/index2",
    5. "pages/list/list",
    6. "pages/logs/logs"
    7. ],
    8. "tabBar": {
    9. "color": "#999999",
    10. "selectedColor": "#d81e06",
    11. "list": [{
    12. "pagePath": "pages/index/index",
    13. "text": "主页",
    14. "iconPath": "/img/home.png",
    15. "selectedIconPath": "/img/home-active.png"
    16. },
    17. {
    18. "pagePath": "pages/index2/index2",
    19. "text": "订单",
    20. "iconPath": "/img/order.png",
    21. "selectedIconPath": "/img/order-active.png"
    22. },
    23. {
    24. "pagePath": "pages/list/list",
    25. "text": "我的",
    26. "iconPath": "/img/user.png",
    27. "selectedIconPath": "/img/user-active.png"
    28. }
    29. ]
    30. },
    31. "window": {
    32. "backgroundColor": "#fff",
    33. "navigationBarBackgroundColor": "#fff",
    34. "navigationBarTitleText": "Weixin",
    35. "navigationBarTextStyle": "black",
    36. "enablePullDownRefresh": true,
    37. "backgroundTextStyle": "dark"
    38. },
    39. "style": "v2",
    40. "sitemapLocation": "sitemap.json"
    41. }

    image.png