拓恒河湖长制全民护河平台WEB端
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.

100 line
2.0KB

  1. // package_first/pages/VolunteerDetail/index.js
  2. import {api_westreamActivity} from '../../../api/volunteer';
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. activityInfo:{},
  9. list:[],
  10. userPage:{
  11. page:1,
  12. limit:10
  13. },
  14. total:0,
  15. },
  16. /**
  17. * 生命周期函数--监听页面加载
  18. */
  19. onLoad(options) {
  20. let data = JSON.parse(decodeURIComponent(options.data))
  21. data.applyBeginTime = this.formatDate(data.applyBeginTime)
  22. data.applyEndTime = this.formatDate(data.applyEndTime)
  23. this.setData({
  24. activityInfo:data
  25. })
  26. },
  27. /**
  28. * 生命周期函数--监听页面初次渲染完成
  29. */
  30. onReady() {
  31. },
  32. /**
  33. * 生命周期函数--监听页面显示
  34. */
  35. onShow() {
  36. },
  37. /**
  38. * 生命周期函数--监听页面隐藏
  39. */
  40. onHide() {
  41. },
  42. /**
  43. * 生命周期函数--监听页面卸载
  44. */
  45. onUnload() {
  46. },
  47. /**
  48. * 页面相关事件处理函数--监听用户下拉动作
  49. */
  50. onPullDownRefresh() {
  51. },
  52. /**
  53. * 页面上拉触底事件的处理函数
  54. */
  55. onReachBottom() {
  56. },
  57. formatDate(dateString) {
  58. const date = new Date(dateString);
  59. const year = date.getFullYear();
  60. const month = ("0" + (date.getMonth() + 1)).slice(-2);
  61. const day = ("0" + date.getDate()).slice(-2);
  62. return `${year}年${month}月${day}日`;
  63. },
  64. goApply(e){
  65. // if(status == 2){
  66. // console.log(this.data.status);
  67. // wx.navigateTo({
  68. // url:"/package_first/pages/ActivityApply/index"
  69. // })
  70. // }else{
  71. // wx.showToast({
  72. // title: '不在报名时间',
  73. // icon:'none'
  74. // })
  75. // }
  76. wx.navigateTo({
  77. url:"/package_first/pages/ActivityApply/index"
  78. })
  79. },
  80. /**
  81. * 用户点击右上角分享
  82. */
  83. onShareAppMessage() {
  84. }
  85. })