diff --git a/1517060328/comp/scroll.js b/1517060328/comp/scroll.js
new file mode 100644
index 0000000..2a9f73c
--- /dev/null
+++ b/1517060328/comp/scroll.js
@@ -0,0 +1,110 @@
+// pages/comp/scroll.js
+var base64 = require("../example/images/base64");
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ isEnd: false,
+ messages: [{
+ name: "张三",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }, {
+ name: "李四",
+ last: "您好!"
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ icon20: base64.icon20,
+ icon60: base64.icon60
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ onEnd: function () {
+ console.log("onEnd")
+ var that = this;
+ var data = that.data;
+ that.setData({
+ isEnd: true /*,
+ messages: data.messages.concat([{
+ name: "Tom",
+ last: "Hello!"
+ }, {
+ name: "john",
+ last: "yes."
+ }]) */
+ });
+
+ }
+})
\ No newline at end of file
diff --git a/1517060328/comp/scroll.json b/1517060328/comp/scroll.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/comp/scroll.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/comp/scroll.wxml b/1517060328/comp/scroll.wxml
new file mode 100644
index 0000000..5e598b2
--- /dev/null
+++ b/1517060328/comp/scroll.wxml
@@ -0,0 +1,27 @@
+
+
+
+ Panel
+ 面板
+
+
+
+
+
+
+
+
+
+
+ {{index}} {{item.name}}
+ {{item.last}}
+
+
+
+
+
+
+ 正在加载……
+
+
+
\ No newline at end of file
diff --git a/1517060328/comp/scroll.wxss b/1517060328/comp/scroll.wxss
new file mode 100644
index 0000000..14343d6
--- /dev/null
+++ b/1517060328/comp/scroll.wxss
@@ -0,0 +1 @@
+/* pages/comp/scroll.wxss */
\ No newline at end of file
diff --git a/1517060328/form/form.js b/1517060328/form/form.js
new file mode 100644
index 0000000..d73834f
--- /dev/null
+++ b/1517060328/form/form.js
@@ -0,0 +1,113 @@
+// pages/form/form.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ text: "Hello"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var that = this;
+ /*
+ wx.getStorage({
+ key: 'formData',
+ success: function (res) {
+ console.log(res.data)
+ that.setData({
+ text: res.data.text,
+ paragh: res.data.paragh
+ });
+ }
+ })
+ */
+ wx.request({
+ url: 'https://api.infoaas.com/data/hzc.json', //仅为示例,并非真实的接口地址
+ data: {},
+ header: {
+ 'content-type': 'application/json' // 默认值
+ },
+ success: function (res) {
+ console.log(res.data)
+ that.setData({
+ text: res.data.name,
+ paragh: "任课老师是:" + res.data.teacher + " 2017"
+ });
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ doSubmit: function (e) {
+ console.dir(e)
+ var that = this;
+ var text = e.detail.value.text;
+ var paragh = e.detail.value.paragh;
+
+ wx.setStorage({
+ key: "formData",
+ data: {
+ text: text,
+ paragh: paragh
+ }
+ })
+
+ wx.showToast({
+ title: '成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }
+})
\ No newline at end of file
diff --git a/1517060328/form/form.json b/1517060328/form/form.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/form/form.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/form/form.wxml b/1517060328/form/form.wxml
new file mode 100644
index 0000000..3736ce7
--- /dev/null
+++ b/1517060328/form/form.wxml
@@ -0,0 +1,35 @@
+
+
+
+ 表单示例
+ 输入文字并提交
+
+
+
\ No newline at end of file
diff --git a/1517060328/form/form.wxss b/1517060328/form/form.wxss
new file mode 100644
index 0000000..773650c
--- /dev/null
+++ b/1517060328/form/form.wxss
@@ -0,0 +1 @@
+/* pages/form/form.wxss */
\ No newline at end of file
diff --git a/1517060328/wen/app.js b/1517060328/wen/app.js
new file mode 100644
index 0000000..0b9b17a
--- /dev/null
+++ b/1517060328/wen/app.js
@@ -0,0 +1,30 @@
+//app.js
+App({
+ onLaunch: function () {
+ //调用API从本地缓存中获取数据
+ 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(that.globalData.userInfo)
+ }
+ })
+ }
+ })
+ }
+ },
+ globalData:{
+ userInfo:null
+ }
+})
\ No newline at end of file
diff --git a/1517060328/wen/app.json b/1517060328/wen/app.json
new file mode 100644
index 0000000..01a35a6
--- /dev/null
+++ b/1517060328/wen/app.json
@@ -0,0 +1,44 @@
+{
+ "pages": [
+ "pages/index/index",
+ "pages/comp/scroll",
+ "pages/logs/logs",
+ "pages/comp/view",
+ "pages/example/navbar/navbar",
+ "pages/example/grid/grid",
+ "pages/example/list/list",
+ "pages/example/article/article",
+ "pages/form/form"
+
+ ],
+ "window": {
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#EEEE00",
+ "navigationBarTitleText": "第一个小程序",
+ "navigationBarTextStyle": "white"
+ },
+ "tabBar": {
+ "color":"#ffffff",
+ "backgroundColor":"yellow",
+ "list": [
+ {
+ "pagePath": "pages/index/index",
+ "iconPath": "pages/example/images/67.png",
+ "selectedIconPath": "pages/example/images/17.png",
+ "text": "首页"
+ },
+ {
+ "pagePath": "pages/comp/scroll",
+ "iconPath": "pages/example/images/80.png",
+ "selectedIconPath": "pages/example/images/432.png",
+ "text": "发现"
+ },
+ {
+ "pagePath": "pages/form/form",
+ "iconPath": "pages/example/images/10.png",
+ "selectedIconPath": "pages/example/images/101.png",
+ "text": "关于"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/1517060328/wen/app.wxss b/1517060328/wen/app.wxss
new file mode 100644
index 0000000..f58bfe5
--- /dev/null
+++ b/1517060328/wen/app.wxss
@@ -0,0 +1,11 @@
+/**app.wxss**/
+@import 'style/weui.wxss';
+.container {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+ padding: 200rpx 0;
+ box-sizing: border-box;
+}
diff --git a/1517060328/wen/pages/comp/scroll.js b/1517060328/wen/pages/comp/scroll.js
new file mode 100644
index 0000000..96cf87e
--- /dev/null
+++ b/1517060328/wen/pages/comp/scroll.js
@@ -0,0 +1,110 @@
+// pages/comp/scroll.js
+var base64 = require("../example/images/base64");
+
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ isEnd: false,
+ messages: [{
+ name: "斯蒂芬-库里",
+ last: "勇士!"
+ }, {
+ name: "德马尔-德罗赞",
+ last: "猛龙!"
+ }, {
+ name: "乔尔-恩比德",
+ last: "76人"
+ }, {
+ name: "詹姆斯-哈登",
+ last: "火箭"
+ }, {
+ name: "泰森-钱德勒",
+ last: "太阳"
+ }, {
+ name: "扬尼斯-阿德托昆博",
+ last: "雄鹿"
+ }, {
+ name: "德章泰-默里",
+ last: "马刺!"
+ }]
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({
+ icon20: base64.icon20,
+ icon60: base64.icon60
+ });
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ onEnd: function () {
+ console.log("onEnd")
+ var that = this;
+ var data = that.data;
+ that.setData({
+ isEnd: true /*,
+ messages: data.messages.concat([{
+ name: "Tom",
+ last: "Hello!"
+ }, {
+ name: "john",
+ last: "yes."
+ }]) */
+ });
+
+ }
+})
\ No newline at end of file
diff --git a/1517060328/wen/pages/comp/scroll.json b/1517060328/wen/pages/comp/scroll.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/wen/pages/comp/scroll.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/wen/pages/comp/scroll.wxml b/1517060328/wen/pages/comp/scroll.wxml
new file mode 100644
index 0000000..e31c76b
--- /dev/null
+++ b/1517060328/wen/pages/comp/scroll.wxml
@@ -0,0 +1,27 @@
+
+
+
+ Panel
+ 面板
+
+
+
+
+
+
+
+
+
+
+ {{index}} {{item.name}}
+ {{item.last}}
+
+
+
+
+
+
+ 正在加载……
+
+
+
\ No newline at end of file
diff --git a/1517060328/wen/pages/comp/scroll.wxss b/1517060328/wen/pages/comp/scroll.wxss
new file mode 100644
index 0000000..14343d6
--- /dev/null
+++ b/1517060328/wen/pages/comp/scroll.wxss
@@ -0,0 +1 @@
+/* pages/comp/scroll.wxss */
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/article/article.js b/1517060328/wen/pages/example/article/article.js
new file mode 100644
index 0000000..f16cc1a
--- /dev/null
+++ b/1517060328/wen/pages/example/article/article.js
@@ -0,0 +1 @@
+Page({});
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/article/article.json b/1517060328/wen/pages/example/article/article.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/wen/pages/example/article/article.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/article/article.wxml b/1517060328/wen/pages/example/article/article.wxml
new file mode 100644
index 0000000..66bc871
--- /dev/null
+++ b/1517060328/wen/pages/example/article/article.wxml
@@ -0,0 +1,30 @@
+
+
+ 热爱篮球的话
+ 文章
+
+
+
+ 大标题
+
+ 章标题
+
+ 1.1 节标题
+
+ 人生如篮,事事如球,篮球就是生活。传球是配合,投球是拼搏,带球就是为生计而奔波。有的人是球星,有的人是球王,更多的人是为他人做嫁衣裳。国际篮球日,打篮球练身体,看篮球品生活,祝你天天快乐!
+
+
+
+
+
+
+
+ 1.2 节标题
+
+ 带球过人妙传,脚步迅速看我身轻如燕;停球起跳灌篮,一气呵成瞬间成就;投篮罚球三分,百步穿杨都是得分利器;盯人协防联防,防守稳健才是胜利关键。国际篮球日,打快乐篮球,走幸福人生,生活无限精彩!
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/article/article.wxss b/1517060328/wen/pages/example/article/article.wxss
new file mode 100644
index 0000000..fa064c6
--- /dev/null
+++ b/1517060328/wen/pages/example/article/article.wxss
@@ -0,0 +1,6 @@
+page{
+ background-color: #FFFFFF;
+}
+image{
+ margin: 4px 0;
+}
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/images/10.png b/1517060328/wen/pages/example/images/10.png
new file mode 100644
index 0000000..4b33f7b
Binary files /dev/null and b/1517060328/wen/pages/example/images/10.png differ
diff --git a/1517060328/wen/pages/example/images/101.png b/1517060328/wen/pages/example/images/101.png
new file mode 100644
index 0000000..470df6b
Binary files /dev/null and b/1517060328/wen/pages/example/images/101.png differ
diff --git a/1517060328/wen/pages/example/images/123.jpg b/1517060328/wen/pages/example/images/123.jpg
new file mode 100644
index 0000000..bb5dd8e
Binary files /dev/null and b/1517060328/wen/pages/example/images/123.jpg differ
diff --git a/1517060328/wen/pages/example/images/17.png b/1517060328/wen/pages/example/images/17.png
new file mode 100644
index 0000000..df3d99c
Binary files /dev/null and b/1517060328/wen/pages/example/images/17.png differ
diff --git a/1517060328/wen/pages/example/images/432.png b/1517060328/wen/pages/example/images/432.png
new file mode 100644
index 0000000..185b966
Binary files /dev/null and b/1517060328/wen/pages/example/images/432.png differ
diff --git a/1517060328/wen/pages/example/images/67.png b/1517060328/wen/pages/example/images/67.png
new file mode 100644
index 0000000..63aef10
Binary files /dev/null and b/1517060328/wen/pages/example/images/67.png differ
diff --git a/1517060328/wen/pages/example/images/80.png b/1517060328/wen/pages/example/images/80.png
new file mode 100644
index 0000000..cecd941
Binary files /dev/null and b/1517060328/wen/pages/example/images/80.png differ
diff --git a/1517060328/wen/pages/example/images/89.jpg b/1517060328/wen/pages/example/images/89.jpg
new file mode 100644
index 0000000..44c2f9b
Binary files /dev/null and b/1517060328/wen/pages/example/images/89.jpg differ
diff --git a/1517060328/wen/pages/example/images/lp.jpg b/1517060328/wen/pages/example/images/lp.jpg
new file mode 100644
index 0000000..a4fe96c
Binary files /dev/null and b/1517060328/wen/pages/example/images/lp.jpg differ
diff --git a/1517060328/wen/pages/example/images/pi.jpg b/1517060328/wen/pages/example/images/pi.jpg
new file mode 100644
index 0000000..fa0a413
Binary files /dev/null and b/1517060328/wen/pages/example/images/pi.jpg differ
diff --git a/1517060328/wen/pages/example/images/ui.jpg b/1517060328/wen/pages/example/images/ui.jpg
new file mode 100644
index 0000000..95254ce
Binary files /dev/null and b/1517060328/wen/pages/example/images/ui.jpg differ
diff --git a/1517060328/wen/pages/example/images/w9.jpg b/1517060328/wen/pages/example/images/w9.jpg
new file mode 100644
index 0000000..1bc6ec1
Binary files /dev/null and b/1517060328/wen/pages/example/images/w9.jpg differ
diff --git a/1517060328/wen/pages/example/navbar/navbar.js b/1517060328/wen/pages/example/navbar/navbar.js
new file mode 100644
index 0000000..b738006
--- /dev/null
+++ b/1517060328/wen/pages/example/navbar/navbar.js
@@ -0,0 +1,27 @@
+var sliderWidth = 96; // 需要设置slider的宽度,用于计算中间位置
+
+Page({
+ data: {
+ tabs: ["选项一", "选项二", "选项三"],
+ activeIndex: 1,
+ sliderOffset: 0,
+ sliderLeft: 0
+ },
+ onLoad: function () {
+ var that = this;
+ wx.getSystemInfo({
+ success: function(res) {
+ that.setData({
+ sliderLeft: (res.windowWidth / that.data.tabs.length - sliderWidth) / 2,
+ sliderOffset: res.windowWidth / that.data.tabs.length * that.data.activeIndex
+ });
+ }
+ });
+ },
+ tabClick: function (e) {
+ this.setData({
+ sliderOffset: e.currentTarget.offsetLeft,
+ activeIndex: e.currentTarget.id
+ });
+ }
+});
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/navbar/navbar.json b/1517060328/wen/pages/example/navbar/navbar.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/wen/pages/example/navbar/navbar.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/navbar/navbar.wxml b/1517060328/wen/pages/example/navbar/navbar.wxml
new file mode 100644
index 0000000..831fd29
--- /dev/null
+++ b/1517060328/wen/pages/example/navbar/navbar.wxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ {{item}}
+
+
+
+
+
+ 篮球能给人们带来健康、带来快乐;令人叫绝的空中接力、出神入化的传切配合、快如闪电的突破上篮,无无不让人赏心悦目、美不胜收;我赞美球星,是因为球星能给我们带来愉悦身心的享受和心灵的震憾。他们在球场上表现出的超人球技和顽强作风,为年轻人树立了追求卓越的榜样。
+ 人生不就像一场激烈的篮球比赛吗?要胜利,就要拼搏,跌倒了爬起来,一直往前冲,直至取得最后胜利。
+ 我赞美篮球,更赞美球星。大鲨鱼奥尼尔大力灌篮,气吞山河;飞人乔丹百步穿扬,技惊世界;魔术师约翰逊出神入化的传球,叫你眼花缭乱;科比布莱思特一场拿下62分,告诉你什么叫天才;神勇麦迪30秒的表演,让你领略绝地反击的威力;小皇帝詹姆斯,告诉你什么是后生可畏;看到奥尼尔受伤倒地的一刹那,让你体会大厦将倾的悲壮……看他们打球,我常常激动的热泪盈眶、彻夜难眠。看他们打球,有时如观看一场演出,令人叫绝的空中接力、出神入化的传切配合、快如闪电的突破上篮,无无不让人赏心悦目、美不胜收;有时又像一场战争,血雨腥风,刀光剑影。
+
+
+
+
\ No newline at end of file
diff --git a/1517060328/wen/pages/example/navbar/navbar.wxss b/1517060328/wen/pages/example/navbar/navbar.wxss
new file mode 100644
index 0000000..24c24f7
--- /dev/null
+++ b/1517060328/wen/pages/example/navbar/navbar.wxss
@@ -0,0 +1,12 @@
+page,
+.page,
+.page__bd{
+ height: 100%;
+}
+.page__bd{
+ padding-bottom: 0;
+}
+.weui-tab__content{
+ padding-top: 60px;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/1517060328/wen/pages/form/form.js b/1517060328/wen/pages/form/form.js
new file mode 100644
index 0000000..7b422a4
--- /dev/null
+++ b/1517060328/wen/pages/form/form.js
@@ -0,0 +1,113 @@
+// pages/form/form.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ text: "Hello"
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var that = this;
+ /*
+ wx.getStorage({
+ key: 'formData',
+ success: function (res) {
+ console.log(res.data)
+ that.setData({
+ text: res.data.text,
+ paragh: res.data.paragh
+ });
+ }
+ })
+ */
+ wx.request({
+ url: 'https://infoaas.com/data/hzc.json', //仅为示例,并非真实的接口地址
+ data: {},
+ header: {
+ 'content-type': 'application/json' // 默认值
+ },
+ success: function (res) {
+ console.log(res.data)
+ that.setData({
+ text: res.data.name,
+ paragh: "任课老师是:" + res.data.teacher + " 2017"
+ });
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ },
+
+ doSubmit: function (e) {
+ console.dir(e)
+ var that = this;
+ var text = e.detail.value.text;
+ var paragh = e.detail.value.paragh;
+
+ wx.setStorage({
+ key: "formData",
+ data: {
+ text: text,
+ paragh: paragh
+ }
+ })
+
+ wx.showToast({
+ title: '成功',
+ icon: 'success',
+ duration: 2000
+ })
+ }
+})
\ No newline at end of file
diff --git a/1517060328/wen/pages/form/form.json b/1517060328/wen/pages/form/form.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/wen/pages/form/form.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/wen/pages/form/form.wxml b/1517060328/wen/pages/form/form.wxml
new file mode 100644
index 0000000..3736ce7
--- /dev/null
+++ b/1517060328/wen/pages/form/form.wxml
@@ -0,0 +1,35 @@
+
+
+
+ 表单示例
+ 输入文字并提交
+
+
+
\ No newline at end of file
diff --git a/1517060328/wen/pages/form/form.wxss b/1517060328/wen/pages/form/form.wxss
new file mode 100644
index 0000000..773650c
--- /dev/null
+++ b/1517060328/wen/pages/form/form.wxss
@@ -0,0 +1 @@
+/* pages/form/form.wxss */
\ No newline at end of file
diff --git a/1517060328/wen/pages/index/index.js b/1517060328/wen/pages/index/index.js
new file mode 100644
index 0000000..3a2ec1a
--- /dev/null
+++ b/1517060328/wen/pages/index/index.js
@@ -0,0 +1,54 @@
+//index.js
+//获取应用实例
+const app = getApp()
+
+Page({
+ data: {
+ motto: 'Hello World',
+ userInfo: {},
+ hasUserInfo: false,
+ canIUse: wx.canIUse('button.open-type.getUserInfo')
+ },
+ //事件处理函数
+ bindViewTap: function () {
+ wx.navigateTo({
+ url: '../logs/logs'
+ })
+ },
+ onLoad: function () {
+ if (app.globalData.userInfo) {
+ this.setData({
+ userInfo: app.globalData.userInfo,
+ hasUserInfo: true
+ })
+ } else if (this.data.canIUse) {
+ // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
+ // 所以此处加入 callback 以防止这种情况
+ app.userInfoReadyCallback = res => {
+ this.setData({
+ userInfo: res.userInfo,
+ hasUserInfo: true
+ })
+ }
+ } else {
+ // 在没有 open-type=getUserInfo 版本的兼容处理
+ wx.getUserInfo({
+ success: res => {
+ app.globalData.userInfo = res.userInfo
+ this.setData({
+ userInfo: res.userInfo,
+ hasUserInfo: true
+ })
+ }
+ })
+ }
+ },
+ getUserInfo: function (e) {
+ console.log(e)
+ app.globalData.userInfo = e.detail.userInfo
+ this.setData({
+ userInfo: e.detail.userInfo,
+ hasUserInfo: true
+ })
+ }
+})
\ No newline at end of file
diff --git a/1517060328/wen/pages/index/index.json b/1517060328/wen/pages/index/index.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/1517060328/wen/pages/index/index.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/1517060328/wen/pages/index/index.wxml b/1517060328/wen/pages/index/index.wxml
new file mode 100644
index 0000000..7749c8f
--- /dev/null
+++ b/1517060328/wen/pages/index/index.wxml
@@ -0,0 +1,27 @@
+
+
+
+ 微信小程序开发
+ 示例列表
+
+
+ 组件开发
+
+
+ 篮球赞美词
+ 打开
+
+
+ 篮球展示
+ 打开
+
+
+ 官方例子
+
+
+ 人生如篮,事事如球
+ 打开
+
+
+
+
\ No newline at end of file
diff --git a/1517060328/wen/pages/index/index.wxss b/1517060328/wen/pages/index/index.wxss
new file mode 100644
index 0000000..ce30de0
--- /dev/null
+++ b/1517060328/wen/pages/index/index.wxss
@@ -0,0 +1,21 @@
+/**index.wxss**/
+.userinfo {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+}
+
+.userinfo-avatar {
+ width: 128rpx;
+ height: 128rpx;
+ margin: 20rpx;
+ border-radius: 50%;
+}
+
+.userinfo-nickname {
+ color: #aaa;
+}
+
+.usermotto {
+ margin-top: 200px;
+}
\ No newline at end of file