微信小程序------加导航

效果图如下

微信小程序------加导航

这个其实很简单

在app.json上面加点代码

 "window":{
    "backgroundTextStyle":"light",
    "navigationBarBackgroundColor": "#OOOOOO",
    "navigationBarTitleText": "WeChat",
    "navigationBarTextStyle":"white"
  },
  "tabBar": {
     "color": "#ddd",
    "selectedColor": "#1296db",
    "borderStyle": "white",
    "backgroundColor": "#f2f2f2",
    "list": [{
       "pagePath": "pages/index/index",
       "text": "首页",
      "iconPath": "pages/images/index.png",
      "selectedIconPath": "pages/images/index.png"
     },{
       "pagePath": "pages/index/two",
       "text": "商品",
       "iconPath": "pages/images/c.png",
       "selectedIconPath": "pages/images/c.png"
     },{
       "pagePath":  "pages/index/three",
       "text": "购物车",
       "iconPath": "pages/images/buy.png",
       "selectedIconPath": "pages/images/buy.png"
     },{
       "pagePath": "pages/user/user",
       "text": "我",
       "iconPath": "pages/images/o.png",
       "selectedIconPath": "pages/images/o.png"
     }
     ]
   }

  单击下面图标就会有如下显示

微信小程序------加导航

over!!!

 

微信小程序------加导航

上一篇:关于微信小程序的开发步骤


下一篇:微信内嵌H5网页 解决js倒计时失效