“微信”小程序开发(一)第一章 开发步骤第 1 节:小程序构成第 2 节:APP、JSON 结构Pag e s:小程序组成页面;Window s:窗口样式设定、第 3 节:APP、JS 结构:APP 、 JSONAPP 、 JSAPP 、 WXSS调用函数 定义娈量 引用接口组成页面 窗口参数公共样式{ "pages":[ "pages/index/index", "pages/logs/logs" ], "window":{ "backgroundTextStyle":"light", "navigationBarBackgroundColor": "#fff", "navigationBarTitleText": "WeChat", "navigationBarTextStyle":"black" }}App({ onLaunch: function () { var logs = wx 、 getStorageSync('logs') || [] logs 、 unshift(Date 、 now()) wx 、 setStorageSync('logs', logs) }, getUserInfo:function(cb){ var that = this; if(this 、 globalData 、 userInfo){ typeof cb == "function" && cb(this 、 globalData 、 userInfo) }else{ wx 、 login({ success: function () { wx 、 getUserInfo({ success: function (res) { that 、 globalData 、 userInfo = res 、 userInfo; typeof cb == "function" && cb