14.1 真机调试
- 利用某些软件实现内网穿透(小米球Ngrok、花生壳)
花生壳免费版:更加偏向于 数据库 和 远程的连接。
小米球Ngrok免费版:更加偏向于 http、https 的连接。
我们的 接口 是 http 协议 的,所以 我们 用 小米球 Ngrok 就可以了。
14.2 tabbar的学习和使用
在 app.json
里 写入 tabBar 这个配置。
我们 知道 这里的 list 是一个 数组,而它接收的 就是 每个 选中的块。
{
"pages": [
"pages/index/index",
"pages/personal/personal",
"pages/video/video"
],
"style": "v2",
"sitemapLocation": "sitemap.json",
"window": {
"navigationBarBackgroundColor": "#d43c33",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "云音乐"
},
"tabBar": {
"color": "#333",
"selectedColor": "#d43c33",
"list": [
{
"pagePath": "pages/index/index",
"text": "主页",
"iconPath": "/static/images/tabs/tab-home.png",
"selectedIconPath": "/static/images/tabs/tab-home-current.png"
},
{
"pagePath": "pages/video/video",
"text": "视频",
"iconPath": "/static/images/tabs/select.png",
"selectedIconPath": "/static/images/tabs/selected.png"
},
{
"pagePath": "pages/personal/personal",
"text": "个人中心",
"iconPath": "/static/images/tabs/tab-my.png",
"selectedIconPath": "/static/images/tabs/tab-my-current.png"
}
]
}
}