美文网首页
初识微信小程序

初识微信小程序

作者: 飛將軍 | 来源:发表于2017-02-21 15:26 被阅读0次

    1. 微信小程序开发官方资料

    1.1 点击进入官方简易教程

    1.2 点击进入小程序组件介绍。

    1.3 点击进入小程序API介绍。

    1.4 点击进入官方开发工具介绍和下载

    2. 框架-点击进入官方介绍。

    2.1 框架的核心是一个响应的数据绑定系统。

    2.2 整个系统分为两块视图层(View)和逻辑层(App Service),框架可以让数据与视图非常简单地保持同步。当做数据修改的时候,只需要在逻辑层修改数据,视图层就会做相应的更新。

    2.3 框架 管理了整个小程序的页面路由,可以做到页面间的无缝切换,并给以页面完整的生命周期。开发者需要做的只是将页面的数据,方法,生命周期函数注册进 框架 中,其他的一切复杂的操作都交由 框架 处理。

    3. json-配置(点击进入

    3.1 app.json

    {

    "pages": [

    "pages/index/index",

    "pages/logs/logs",

    "pages/simple/simple",

    "pages/test/test",

    "pages/tab1/tab1",

    "pages/tab2/tab2"

    ],

    "window": {

    "backgroundColor": "#eeeeee",

    "backgroundTextStyle": "light",

    "navigationBarBackgroundColor": "#fff",

    "navigationBarTitleText": "WeChat",

    "navigationBarTextStyle": "black",

    "enablePullDownRefresh": false

    },

    "tabBar": {

    "color": "#ddd",

    "selectedColor": "#1298db",

    "backgroundColor": "#fff",

    "position": "bottom",

    "borderStyle": "white",

    "list": [

    {

    "pagePath": "pages/index/index",

    "text": "首页",

    "iconPath": "images/tab/home.png",

    "selectedIconPath": "images/tab/home_selected.png"

    },

    {

    "pagePath": "pages/tab2/tab2",

    "text": "我的",

    "iconPath": "images/tab/mine.png",

    "selectedIconPath": "images/tab/mine_selected.png"

    }

    ]

    },

    "networkTimeout": {

    "request": 10000,

    "connectSocket": 1000,

    "uploadFile": 1000,

    "downloadFile": 10000

    },

    "debug": true

    }

    3.2 page.json

    {

    "navigationBarBackgroundColor": "#000000",

    "navigationBarTextStyle": "white",

    "navigationBarTitleText": "Home",

    "backgroundColor": "#ffffff",

    "backgroundTextStyle": "dark",

    "enablePullDownRefresh": false,

    "disableSrcoll": true

    }

    相关文章

      网友评论

          本文标题:初识微信小程序

          本文链接:https://www.haomeiwen.com/subject/meyqwttx.html