拓恒河湖长制全民护河平台WEB端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Page({
  2. data: {
  3. // 列表数据筛选条件
  4. params: {
  5. openId: null
  6. },
  7. skip: false,
  8. queryId: null,
  9. list: [],
  10. current: "",
  11. },
  12. onLoad() {
  13. const openId = wx.getStorageSync('openid')
  14. this.setData(
  15. {
  16. params:{ openId },
  17. current:'/message/list'
  18. }
  19. )
  20. },
  21. onShow(){
  22. if(this.data.skip){
  23. const {list,queryId} = this.data
  24. list.forEach((item)=>{
  25. if(item.id === queryId){
  26. item.status = 2
  27. }
  28. })
  29. this.setData({
  30. list,
  31. skip: false,
  32. queryId: null
  33. })
  34. }
  35. },
  36. /* 更新数据 */
  37. updateList(e) {
  38. let list = this.data.list.concat(e.detail || [])
  39. this.setData({ list })
  40. },
  41. /* 重置数据 */
  42. resetList() {
  43. this.setData({ list: [] })
  44. },
  45. handleDetail(e) {
  46. const {id} = e.currentTarget.dataset
  47. this.setData({
  48. skip: true,
  49. queryId: id
  50. })
  51. wx.navigateTo({
  52. url: '/package_mine/pages/noticeDetail/index?msgId=' + id,
  53. })
  54. }
  55. })