share.js 857 B

12345678910111213141516171819202122232425262728293031
  1. // pages/share/share.js
  2. Page({
  3. data: {
  4. shareImageUrl: '',
  5. markers: [],
  6. 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'
  7. },
  8. onLoad: function (options) {
  9. let {
  10. latitude,
  11. longitude
  12. } = options
  13. let markers = [{
  14. id: 999,
  15. latitude: '32.001233',
  16. longitude: '120.5475',
  17. iconPath: "https://6875-huihenduo-2gx127w7f837b584-1255802371.tcb.qcloud.la/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
  18. height: 20,
  19. width: 20
  20. }]
  21. markers[0].latitude = latitude
  22. markers[0].longitude = longitude
  23. this.setData({
  24. markers,
  25. shareImageUrl: (options.shareImageUrl.replace(/qwerdfb000mmmccc/g, '?')).replace(/mmmcccqwerdfb/g, '=')
  26. })
  27. }
  28. })