Page({
data: {
text: "This is page data."
},
onLoad: function(options) {
},
onShow: function() {
console.log(this.route)
},
onReady: function() {
},
onHide: function() {
},
onUnload: function() {
},
onPullDownRefresh: function() {
},
onReachBottom: function() {
},
onShareAppMessage: function (options) {
if (options.from === 'button') {
console.log(res.target)
}
return {
title: '自定义转发标题',
path: '/page/user?id=123'
}
},
onShareTimeline: function () {
},
onAddToFavorites: function (options) {
console.log('WebviewUrl: ', options.webviewUrl)
return {
title: '自定义标题',
imageUrl: 'http://demo.png',
query: 'name=xxx&age=xxx',
}
},
onPageScroll: function(options) {
},
onResize: function() {
},
onTabItemTap(item) {
console.log(item.index)
console.log(item.pagePath)
console.log(item.text)
},
viewTap: function() {
this.setData({
text: 'Set some data for updating view.'
}, function() {
})
},
})