最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

微信小程序 實(shí)戰(zhàn)程序簡(jiǎn)易新聞的制作

 更新時(shí)間:2017年01月09日 16:22:05   投稿:lqh  
這篇文章主要介紹了微信小程序 實(shí)戰(zhàn)程序簡(jiǎn)易新聞的制作的相關(guān)資料,需要的朋友可以參考下

微信小程序 實(shí)戰(zhàn)項(xiàng)目:

簡(jiǎn)易新聞制作

先看下效果:

實(shí)現(xiàn)思路數(shù)據(jù)全部是采用的本地?cái)?shù)據(jù),圖片也是本地圖片,因?yàn)榭啾频膫€(gè)人開發(fā)者,無(wú)法認(rèn)證;toolbar四個(gè)現(xiàn)象:新聞,笑話,歷史上的今天和主頁(yè),集中主頁(yè)采用的是默認(rèn)的頁(yè)面,添加自己的一些內(nèi)容;數(shù)據(jù)綁定,列表渲染,條件渲染和事件的使用;使用一些基礎(chǔ)的View和text,部分API的使用;


代碼結(jié)構(gòu)

目錄 用途
images 存放本地圖片
pages 存放頁(yè)面,history歷史上的今天,index主頁(yè),joke笑話,news新聞
utils 工具包
app.js 小程序邏輯
app.json 小程序公共設(shè)置
app.wxss 小程序公共樣式表

代碼內(nèi)容,主要看下配置

app.json 配置項(xiàng)列表

{
 "pages": [
  "pages/news/news",
  "pages/joke/joke",
  "pages/history/history",
  "pages/index/index"
 ],
 "window": {
  "navigationBarBackgroundColor": "#f85959",
  "navigationBarTextStyle": "white",
  "navigationBarTitleText": "微 看",
  "backgroundColor": "#FFFFFF",
  "backgroundTextStyle": "dark",
  "enablePullDownRefresh": true
 },
 "tabBar": {
  "color": "#626567",
  "selectedColor": "#f85959",
  "backgroundColor": "#FBFBFB",
  "borderStyle": "white",
  "position": "bottom",
  "list": [
   {
    "pagePath": "pages/news/news",
    "text": "新聞",
    "iconPath": "images/discovery.png",
    "selectedIconPath": "images/discovery_focus.png"
   },
   {
    "pagePath": "pages/joke/joke",
    "text": "笑話",
    "iconPath": "images/ring.png",
    "selectedIconPath": "images/ring_focus.png"
   },
   {
    "pagePath": "pages/history/history",
    "text": "歷史",
    "iconPath": "images/chat.png",
    "selectedIconPath": "images/chat_focus.png"
   },
   {
    "pagePath": "pages/index/index",
    "text": "主頁(yè)",
    "iconPath": "images/index.png",
    "selectedIconPath": "images/index_focus.png"
   }
  ]
 },
 "networkTimeout": {
  "request": 10000,
  "downloadFile": 10000
 },
 "debug": true
}
屬性 類型 必填 描述
pages String Array 設(shè)置頁(yè)面路徑
window Object 設(shè)置默認(rèn)頁(yè)面的窗口表現(xiàn)
tabBar Object 設(shè)置底部 tab 的表現(xiàn)
networkTimeout Object 設(shè)置網(wǎng)絡(luò)超時(shí)時(shí)間
debug Boolean 設(shè)置是否開啟 debug 模式

具體配置使用方法請(qǐng)參考官網(wǎng):

https://mp.weixin.qq.com/debug/wxadoc/dev/framework/config.html?t=201715

感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

相關(guān)文章

最新評(píng)論

扶余县| 毕节市| 德兴市| 陆丰市| 肥城市| 察雅县| 马龙县| 内乡县| 莒南县| 平顺县| 伊吾县| 石屏县| 桂林市| 吉林市| 南乐县| 洛扎县| 富锦市| 民乐县| 田林县| 元朗区| 宜昌市| 横山县| 奉化市| 武胜县| 峨边| 缙云县| 于田县| 宁德市| 肃南| 南澳县| 娱乐| 五大连池市| 石渠县| 古交市| 湛江市| 凤庆县| 大连市| 滁州市| 新丰县| 中江县| 壤塘县|