share.js 893 B

1234567891011121314151617181920212223242526272829303132
  1. // pages/share/share.js
  2. Page({
  3. data: {
  4. shareImageUrl: "",
  5. markers: [],
  6. logoUrl:
  7. "https://frontend-1255802371.cos.ap-shanghai.myqcloud.com/miniapp-static/%E6%B1%87%E5%BE%88%E5%A4%9Alogo-%E5%B7%A6%E5%8F%B3.png",
  8. },
  9. onLoad: function (options) {
  10. let { latitude, longitude } = options;
  11. let markers = [
  12. {
  13. id: 999,
  14. latitude: "32.001233",
  15. longitude: "120.5475",
  16. iconPath:
  17. "https://frontend-1255802371.cos.ap-shanghai.myqcloud.com/miniapp-static/red-circle.png?sign=6d208881376358fb4111aa6d7f1a7846&t=1647934972",
  18. height: 20,
  19. width: 20,
  20. },
  21. ];
  22. markers[0].latitude = latitude;
  23. markers[0].longitude = longitude;
  24. this.setData({
  25. markers,
  26. shareImageUrl: options.shareImageUrl
  27. .replace(/qwerdfb000mmmccc/g, "?")
  28. .replace(/mmmcccqwerdfb/g, "="),
  29. });
  30. },
  31. });