第一步 項(xiàng)目配置 一、編寫app.json 對(duì)整個(gè)項(xiàng)目的公共配置 1、pages:配置頁(yè)面路徑(必須),列出所有的頁(yè)面的路徑,所有存在的頁(yè)面都需要在此寫出,否則在頁(yè)面跳轉(zhuǎn)的時(shí)候會(huì)報(bào)出找不到頁(yè)面的錯(cuò)誤2、window:窗口配置 ...
2016-12-28 更新到v2.0
2016-11-20
2016-11-21
2016-11-22
2016-11-25
2016-12-03
2016-12-04
2016-12-06
2016-12-14
2016-12-24
github地址:https://github.com/yesifeng/wechat-weapp-movie
提示:v2.0代碼會(huì)跟文檔有一些出入,但大部分都是相同的
對(duì)整個(gè)項(xiàng)目的公共配置
1、pages:配置頁(yè)面路徑(必須),列出所有的頁(yè)面的路徑,所有存在的頁(yè)面都需要在此寫出,否則在頁(yè)面跳轉(zhuǎn)的時(shí)候會(huì)報(bào)出找不到頁(yè)面的錯(cuò)誤
2、window:窗口配置,配置導(dǎo)航及窗口的背景色和文字顏色,還有導(dǎo)航文字和是否允許窗口進(jìn)行下拉刷新
3、tabBar:tab欄配置,配置tab欄背景色及出現(xiàn)位置,上邊框的顏色(目前只支持黑或白),文字顏色及文字選中顏色,最核心的配置是list即tab欄的列表,官方規(guī)定最少2個(gè),最多5個(gè),每個(gè)列表項(xiàng)目可配置頁(yè)面路徑、文字、圖標(biāo)及選中時(shí)圖標(biāo)的地址
4、network:網(wǎng)絡(luò)配置,配置網(wǎng)絡(luò)請(qǐng)求、上傳下載文件、socket連接的超時(shí)時(shí)間
5、debug:調(diào)試模式,建議開發(fā)時(shí)開啟(true),可以看到頁(yè)面注冊(cè)、頁(yè)面跳轉(zhuǎn)及數(shù)據(jù)初始化的信息,另外報(bào)錯(cuò)的錯(cuò)誤信息也會(huì)比較詳細(xì)
{
"pages": [
"pages/popular/popular",
"pages/coming/coming",
"pages/top/top",
"pages/search/search",
"pages/filmDetail/filmDetail",
"pages/personDetail/personDetail",
"pages/searchResult/searchResult"
],
"window": {
"navigationBarBackgroundColor": "#47a86c",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "電影推薦",
"backgroundColor": "#fff",
"backgroundTextStyle": "dark"
},
"tabBar": {
"color": "#686868",
"selectedColor": "#47a86c",
"backgroundColor": "#ffffff",
"borderStyle": "white",
"list": [{
"pagePath": "pages/popular/popular",
"iconPath": "dist/images/popular_icon.png",
"selectedIconPath": "dist/images/popular_active_icon.png",
"text": "熱映"
}, {
"pagePath": "pages/coming/coming",
"iconPath": "dist/images/coming_icon.png",
"selectedIconPath": "dist/images/coming_active_icon.png",
"text": "待映"
},{
"pagePath": "pages/search/search",
"iconPath": "dist/images/search_icon.png",
"selectedIconPath": "dist/images/search_active_icon.png",
"text": "搜索"
},
{
"pagePath": "pages/top/top",
"iconPath": "dist/images/top_icon.png",
"selectedIconPath": "dist/images/top_active_icon.png",
"text": "口碑"
}]
},
"networkTimeout": {
"request": 10000,
工作日 8:30-12:00 14:30-18:00
周六及部分節(jié)假日提供值班服務(wù)