share.js 904 B

12345678910111213141516171819202122232425262728293031
  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. wx.hideHomeButton()
  17. let {
  18. latitude,
  19. longitude
  20. } = options
  21. this.data.markers[0].latitude = latitude
  22. this.data.markers[0].longitude = longitude
  23. this.setData({
  24. markers: this.data.markers,
  25. shareImageUrl: (options.shareImageUrl.replace(/qwerdfb000mmmccc/g, '?')).replace(/mmmcccqwerdfb/g, '=')
  26. })
  27. }
  28. })