share.js 880 B

123456789101112131415161718192021222324252627282930
  1. // pages/share/share.js
  2. Page({
  3. data: {
  4. shareImageUrl: '',
  5. markers: [{
  6. id: 999,
  7. latitude: '32.001233',
  8. longitude: '120.5475',
  9. iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/%E8%B4%A7%E4%B8%BB%E5%B0%8F%E7%A8%8B%E5%BA%8F%E5%85%88%E8%A1%8C%E7%89%88/location.png",
  10. height: 30,
  11. width: 30
  12. }],
  13. logoUrl: 'https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/%E6%B1%87%E5%BE%88%E5%A4%9Alogo-%E5%B7%A6%E5%8F%B3.png'
  14. },
  15. onLoad: function (options) {
  16. let {
  17. latitude,
  18. longitude
  19. } = options
  20. this.data.markers[0].latitude = latitude
  21. this.data.markers[0].longitude = longitude
  22. this.setData({
  23. markers: this.data.markers,
  24. shareImageUrl: (options.shareImageUrl.replace(/qwerdfb000mmmccc/g, '?')).replace(/mmmcccqwerdfb/g, '=')
  25. })
  26. }
  27. })