diff --git a/1517060315/1517060315.html b/1517060315/1517060315.html new file mode 100644 index 0000000..2d3e612 --- /dev/null +++ b/1517060315/1517060315.html @@ -0,0 +1,14 @@ + + + + + 1517060315 + + +

这是梁风函的作业

+ Smiley face +

这是一张图片

+ + + + \ No newline at end of file diff --git a/1517060315/531855c7365f32894f534300bd1c7c5e.jpg b/1517060315/531855c7365f32894f534300bd1c7c5e.jpg new file mode 100644 index 0000000..58709bc Binary files /dev/null and b/1517060315/531855c7365f32894f534300bd1c7c5e.jpg differ diff --git a/1517060315/comp/qq2.png b/1517060315/comp/qq2.png new file mode 100644 index 0000000..d8c82ed Binary files /dev/null and b/1517060315/comp/qq2.png differ diff --git a/1517060315/comp/scroll.js.js b/1517060315/comp/scroll.js.js new file mode 100644 index 0000000..71bd844 --- /dev/null +++ b/1517060315/comp/scroll.js.js @@ -0,0 +1,110 @@ +// pages/comp/scroll.js +var base64 = require("../example/images/base64"); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isEnd: false, + messages: [{ + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }, { + name: "梁风函", + last: "LFH" + }] + }, + + /** + * 生命周期函数--监听页面加载 + */ + 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/1517060315/comp/scroll.wxml b/1517060315/comp/scroll.wxml new file mode 100644 index 0000000..cb7d825 --- /dev/null +++ b/1517060315/comp/scroll.wxml @@ -0,0 +1,27 @@ + + + + Panel + 面板 + + + + + + + + + + + {{index}} {{item.name}} + {{item.last}} + + + + + + + 正在加载…… + + + \ No newline at end of file diff --git a/1517060315/comp/scroll.wxss b/1517060315/comp/scroll.wxss new file mode 100644 index 0000000..14343d6 --- /dev/null +++ b/1517060315/comp/scroll.wxss @@ -0,0 +1 @@ +/* pages/comp/scroll.wxss */ \ No newline at end of file diff --git a/1517060315/form/form.js b/1517060315/form/form.js new file mode 100644 index 0000000..c9195dd --- /dev/null +++ b/1517060315/form/form.js @@ -0,0 +1,91 @@ +// 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 + }); + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + 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 + } + }) + } +}) \ No newline at end of file diff --git a/1517060315/form/form.json b/1517060315/form/form.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/1517060315/form/form.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/1517060315/form/form.wxml b/1517060315/form/form.wxml new file mode 100644 index 0000000..5dcccc8 --- /dev/null +++ b/1517060315/form/form.wxml @@ -0,0 +1,35 @@ + + + + 表单示例 + 输入文字并提交 + +
+ + {{text + ", " + paragh}} + + 文本框 + + + + + + + + + 文本域 + + + +