var util = require('../../../utils/util.js'); var api = require('../../../config/api.js'); var app = getApp(); Page({ data: { shareList: [], }, getShareList() { let that = this; util.request(api.ShareList).then(function (res) { if (res.errno === 0) { console.log(res.data); that.setData({ shareList: res.data.data }); } }); }, onLoad: function (options) { this.getShareList(); }, onReady: function () { }, onShow: function () { }, onHide: function () { // 页面隐藏 }, onUnload: function () { // 页面关闭 }, //按下事件开始 touchStart: function (e) { let that = this; that.setData({ touch_start: e.timeStamp }) console.log(e.timeStamp + '- touch-start') }, //按下事件结束 touchEnd: function (e) { let that = this; that.setData({ touch_end: e.timeStamp }) console.log(e.timeStamp + '- touch-end') }, })