C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 line
1.2 KiB

  1. // pages/location/location.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. squareList: [], //广场列表
  8. },
  9. /**
  10. * 跳转到其他小程序
  11. * 接受唯一参数 appId
  12. * */
  13. goSquare(event) {
  14. let appid = event.currentTarget.dataset.appid
  15. wx.navigateToMiniProgram({
  16. appId: appid,
  17. success(res) {
  18. // 打开成功
  19. }
  20. })
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. onLoad: function(options) {
  26. const squareList = wx.getStorageSync('squareList')
  27. this.setData({
  28. squareList : squareList
  29. })
  30. },
  31. /**
  32. * 生命周期函数--监听页面初次渲染完成
  33. */
  34. onReady: function() {
  35. },
  36. /**
  37. * 生命周期函数--监听页面显示
  38. */
  39. onShow: function() {
  40. },
  41. /**
  42. * 生命周期函数--监听页面隐藏
  43. */
  44. onHide: function() {
  45. },
  46. /**
  47. * 生命周期函数--监听页面卸载
  48. */
  49. onUnload: function() {
  50. },
  51. /**
  52. * 页面相关事件处理函数--监听用户下拉动作
  53. */
  54. onPullDownRefresh: function() {
  55. },
  56. /**
  57. * 页面上拉触底事件的处理函数
  58. */
  59. onReachBottom: function() {
  60. },
  61. /**
  62. * 用户点击右上角分享
  63. */
  64. onShareAppMessage: function() {
  65. }
  66. })