eventDetail.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. // pages/actDetail/actDetail.js
  2. const app = getApp()
  3. var host = app.globalData.host;
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. info: {},
  10. uid: '',
  11. zk1: 0,
  12. zk2: 0,
  13. sex_array: ['男', '女'],
  14. sex: -1,
  15. job_array: ['中科院单位', '非中科院单位'],
  16. job: 0,
  17. show: 0
  18. },
  19. /**
  20. * 生命周期函数--监听页面加载
  21. */
  22. onLoad: function (options) {
  23. // options.id=1;
  24. var that = this;
  25. wx.showNavigationBarLoading()
  26. var that = this;
  27. wx.request({
  28. url: host + '/api/detail',
  29. method: 'GET',
  30. data: {
  31. type: 'conference',
  32. id: options.id
  33. },
  34. success: function (res) {
  35. wx.hideNavigationBarLoading();
  36. that.setData({
  37. info: res.data.data
  38. })
  39. },
  40. fail: function () {
  41. wx.hideLoading();
  42. wx.showToast({
  43. title: '服务器开小差啦!',
  44. icon: 'none'
  45. })
  46. }
  47. })
  48. },
  49. open: function () {
  50. this.setData({
  51. show: 1
  52. })
  53. },
  54. post: function () {
  55. this.setData({
  56. show: 0
  57. })
  58. },
  59. zk1: function () {
  60. this.setData({
  61. zk1: 1
  62. })
  63. },
  64. sq1: function () {
  65. this.setData({
  66. zk1: 0
  67. })
  68. },
  69. zk2: function () {
  70. this.setData({
  71. zk2: 1
  72. })
  73. },
  74. sq2: function () {
  75. this.setData({
  76. zk2: 0
  77. })
  78. },
  79. /**
  80. * 生命周期函数--监听页面初次渲染完成
  81. */
  82. onReady: function () {
  83. },
  84. /**
  85. * 生命周期函数--监听页面显示
  86. */
  87. onShow: function () {
  88. },
  89. /**
  90. * 生命周期函数--监听页面隐藏
  91. */
  92. onHide: function () {
  93. },
  94. /**
  95. * 生命周期函数--监听页面卸载
  96. */
  97. onUnload: function () {
  98. },
  99. /**
  100. * 页面相关事件处理函数--监听用户下拉动作
  101. */
  102. onPullDownRefresh: function () {
  103. },
  104. /**
  105. * 页面上拉触底事件的处理函数
  106. */
  107. onReachBottom: function () {
  108. },
  109. /**
  110. * 用户点击右上角分享
  111. */
  112. onShareAppMessage: function () {
  113. }
  114. })