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

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

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

微信小程序 實戰(zhàn)項目:

簡易新聞制作

先看下效果:

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


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

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

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

app.json 配置項列表

{
 "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": "主頁",
    "iconPath": "images/index.png",
    "selectedIconPath": "images/index_focus.png"
   }
  ]
 },
 "networkTimeout": {
  "request": 10000,
  "downloadFile": 10000
 },
 "debug": true
}
屬性 類型 必填 描述
pages String Array 設(shè)置頁面路徑
window Object 設(shè)置默認(rèn)頁面的窗口表現(xiàn)
tabBar Object 設(shè)置底部 tab 的表現(xiàn)
networkTimeout Object 設(shè)置網(wǎng)絡(luò)超時時間
debug Boolean 設(shè)置是否開啟 debug 模式

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

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

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

相關(guān)文章

最新評論

南部县| 宁武县| 拉萨市| 江陵县| 平原县| 红安县| 济阳县| 宕昌县| 沙湾县| 亳州市| 金坛市| 普兰店市| 安仁县| 景宁| 阳原县| 铜陵市| 大港区| 泾阳县| 重庆市| 合山市| 郁南县| 修文县| 荣成市| 贵定县| 凤城市| 瑞丽市| 玛沁县| 札达县| 钟山县| 和田市| 奉新县| 建始县| 九江市| 曲松县| 镇康县| 大田县| 阿荣旗| 贵溪市| 普陀区| 河北区| 四平市|