advisoryDetail.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // pages/user/advisoryDetail/advisoryDetail.js
  2. const app = getApp(),
  3. {
  4. globalData: {
  5. util: {
  6. regeneratorRuntime,
  7. api: {
  8. advisoryDetail
  9. },
  10. request: {
  11. get
  12. }
  13. }
  14. }
  15. } = app;
  16. Page({
  17. /**
  18. * 页面的初始数据
  19. */
  20. data: {
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. async onLoad() {
  26. let that = this;
  27. let options = that.options;
  28. let detailData = await get(advisoryDetail, options);
  29. that.setData({
  30. detailData
  31. })
  32. },
  33. detail: function () {
  34. wx.navigateTo({
  35. url: '/pages/user/advisoryDetail/advisoryDetail',
  36. })
  37. },
  38. /**
  39. * 生命周期函数--监听页面初次渲染完成
  40. */
  41. onReady: function () {
  42. },
  43. /**
  44. * 生命周期函数--监听页面显示
  45. */
  46. onShow: function () {
  47. },
  48. /**
  49. * 生命周期函数--监听页面隐藏
  50. */
  51. onHide: function () {
  52. },
  53. /**
  54. * 生命周期函数--监听页面卸载
  55. */
  56. onUnload: function () {
  57. },
  58. /**
  59. * 页面相关事件处理函数--监听用户下拉动作
  60. */
  61. onPullDownRefresh: function () {
  62. },
  63. /**
  64. * 页面上拉触底事件的处理函数
  65. */
  66. onReachBottom: function () {
  67. },
  68. /**
  69. * 用户点击右上角分享
  70. */
  71. onShareAppMessage: function () {
  72. }
  73. })