// pages/modal/index.js Page({ /** * 页面的初始数据 */ data: { list: null }, /** * 生命周期函数--监听页面加载 */ onLoad: function(options) { var self = this; wx.request({ url: 'http://xunxibaoapi.yaoyz.com/index/house/index', method: 'GET', success: function(res) { console.log(res,'success'); self.setData({ list: res.data }); } }) // wx.showToast({ // title: '温馨提示', // icon: 'success', // duration: 2000 // }); // wx.showModal({ // title: '这是modal', // content: '这是一个模态弹窗', // success: function(res) { // console.log(res); // } // }); // wx.showLoading({ // title: '加载中', // }); // setTimeout(function () { // wx.hideLoading() // }, 2000); // wx.showActionSheet({ // itemList: ['A', 'B', 'C'], // success(res) { // console.log(res.tapIndex) // }, // fail(res) { // console.log(res.errMsg) // } // }); }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function() { }, /** * 生命周期函数--监听页面显示 */ onShow: function() { }, /** * 生命周期函数--监听页面隐藏 */ onHide: function() { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function() { }, /** * 用户点击右上角分享 */ onShareAppMessage: function() { } })