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

48 lines
1.2KB

  1. // package_mine/pages/senceDetail/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. dataSource: {},
  8. imageList: [],
  9. messageList: [
  10. {title: '描述', value: 'content'},
  11. {title: '上传时间', value: 'createTime'},
  12. {title: '审核意见', value: 'status'},
  13. {title: '审核时间', value: 'examineTime'},
  14. {title: '备注', value: 'remark'}
  15. ],
  16. statusList: {
  17. 1: '待审核',
  18. 2: '审核通过',
  19. 3: '审核驳回'
  20. }
  21. },
  22. /**
  23. * 生命周期函数--监听页面加载
  24. */
  25. onLoad(options) {
  26. if(options) {
  27. const dataSource = JSON.parse(options.data)
  28. let imageList = []
  29. if(dataSource.image.length) {
  30. imageList = dataSource.image.split(',')
  31. }
  32. this.setData({imageList, dataSource})
  33. }
  34. },
  35. /* 图片预览 */
  36. showImgPreview(e) {
  37. let index = e.currentTarget.dataset.current
  38. let urls = this.data.imageList
  39. const current = this.data.imageList[index]
  40. wx.previewImage({
  41. urls,
  42. current
  43. })
  44. }
  45. })