暂无描述

inspectionHuatanDeatilMap.js 992B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // packageA/pages/historicalTrackDetailMap/historicalTrackDetailMap.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. latitude: null,
  8. longitude: null,
  9. markers: [],
  10. remark: '',
  11. imagesTU: [],
  12. },
  13. onLoad: function (options) {
  14. console.log(options);
  15. let arr = JSON.parse(options.images);
  16. let obj = {
  17. id: 0,
  18. latitude: options.url.split(',')[0],
  19. longitude: options.url.split(',')[1],
  20. width: 30,
  21. height: 50,
  22. iconPath: '/images/icon/wz.png',
  23. };
  24. this.data.markers.push(obj);
  25. this.setData({
  26. imagesTU: arr,
  27. latitude: options.url.split(',')[0],
  28. longitude: options.url.split(',')[1],
  29. markers: this.data.markers,
  30. remark: options.remark,
  31. });
  32. },
  33. viewMoviePostImg: function (e) {
  34. var src = e.currentTarget.dataset.src;
  35. wx.previewImage({
  36. current: src, // 当前显示图片的http链接
  37. urls: [src], // 需要预览的图片http链接列表
  38. });
  39. },
  40. });