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

43 lines
1.1KB

  1. // package_B/pages/feedbackDetail/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. dataSource: {},
  8. statusList: [
  9. {title: '待处理', color: '#F34747'},
  10. {title: '待处理', color: '#F34747'},
  11. {title: '已处理', color: '#477DF3'},
  12. {title: '已处理', color: '#477DF3'}
  13. ]
  14. },
  15. /**
  16. * 生命周期函数--监听页面加载
  17. */
  18. onLoad(options) {
  19. if(options.data) {
  20. let dataSource = this.data.dataSource
  21. dataSource = JSON.parse(options.data)
  22. this.setData({dataSource})
  23. let imageList = dataSource.feedbackUrl.split(',')
  24. let handleImgList = []
  25. if(dataSource.handleUrl) {
  26. handleImgList = dataSource.handleUrl.split(',')
  27. }
  28. this.setData({imageList,handleImgList})
  29. }
  30. },
  31. showImgPreview(e) {
  32. let current = e.currentTarget.dataset.current
  33. let type = e.currentTarget.dataset.type
  34. let urls = this.data[type]
  35. wx.previewImage({
  36. urls: urls,
  37. current:current
  38. })
  39. }
  40. })