|
- // pages/location/location.js
- Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- squareList: [], //广场列表
- },
-
- /**
- * 跳转到其他小程序
- * 接受唯一参数 appId
- * */
- goSquare(event) {
- let appid = event.currentTarget.dataset.appid
- wx.navigateToMiniProgram({
- appId: appid,
- success(res) {
- // 打开成功
- }
- })
- },
-
-
-
-
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function(options) {
- const squareList = wx.getStorageSync('squareList')
- this.setData({
- squareList : squareList
- })
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function() {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function() {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function() {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function() {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function() {
-
- }
- })
|