打开app.json,在pages里添加first和readme页面
    添加tabBar配置,实现index和readme的切换。代码如下

    1. {
    2. "pages": [
    3. "pages/first/first",
    4. "pages/readme/readme",
    5. "pages/index/index"
    6. ],
    7. "window": {
    8. "backgroundTextStyle": "light",
    9. "navigationBarBackgroundColor": "#fff",
    10. "navigationBarTitleText": "我的KEEP运动",
    11. "navigationBarTextStyle": "black"
    12. },
    13. "tabBar": {
    14. "color": "#a1a1a1",
    15. "selectedColor": "rgb(108, 205, 250)",
    16. "backgroundColor": "#ffffff",
    17. "borderStyle":"black",
    18. "list": [
    19. {
    20. "pagePath": "pages/index/index",
    21. "iconPath": "./assets/icons/hema.png",
    22. "selectedIconPath": "./assets/icons/hema-sel.png",
    23. "text": "运动"
    24. },
    25. {
    26. "pagePath": "pages/readme/readme",
    27. "iconPath": "./assets/icons/mine.png",
    28. "selectedIconPath": "./assets/icons/message.png",
    29. "text": "了解KEEP"
    30. }
    31. ]
    32. }
    33. }