Skip to content

Commit

Permalink
hzuapps#71 第3次实验-实现滚动界面
Browse files Browse the repository at this point in the history
  • Loading branch information
ST authored and ST committed Oct 18, 2017
1 parent 689cc06 commit b141893
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 1 deletion.
111 changes: 111 additions & 0 deletions 1517060342/pages/comp/scroll.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
// pages/comp/scroll.js
var base64 = require("../example/images/base64");

Page({

/**
* 页面的初始数据
*/
data: {
isEnd: false,
messages: [{
name: "张三",
last: "您好!",
sixsix: "666!"
}, {
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."
}]) */
});

}
})
1 change: 1 addition & 0 deletions 1517060342/pages/comp/scroll.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 0 additions & 1 deletion 1517060342/pages/comp/scroll.wxss

This file was deleted.

0 comments on commit b141893

Please sign in to comment.