info1.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <view>
  3. <ujp-navbar title="白金会员免费领礼品"></ujp-navbar>
  4. <img style="width: 100%;" src="@/assets/img/20250625/info1.png"></img>
  5. <view class="goto">
  6. <view class="map" @click="gotoMap()">
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. address: "荆州市沙市区江津东路附155号荆鹏软件园",
  16. latitude: 30.306253,
  17. name:"荆鹏软件园",
  18. longitude: 112.276393,
  19. }
  20. },
  21. onReady() {
  22. WxJsApi.getWxConfig(['getLocation', 'openLocation']).then((res) => {
  23. // //(res)
  24. }).catch(error => {
  25. //(res)
  26. })
  27. },
  28. methods: {
  29. navigate() {
  30. //console.log(item)
  31. uni.showLoading({
  32. })
  33. WxJsApi.openLocation({
  34. latitude: parseFloat(this.latitude), //目的地latitude
  35. longitude: parseFloat(this.longitude), //目的地longitude
  36. name: this.name,
  37. address: this.address,
  38. scale: 15, //地图缩放大小,可根据情况具体调整
  39. success(res) {
  40. uni.hideLoading()
  41. },
  42. complete() {
  43. // uni.hideLoading()
  44. }
  45. });
  46. // //('station'+JSON.stringify(_self.stationDetail.station))
  47. // window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
  48. // "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
  49. },
  50. gotoMap() {
  51. console.log("1")
  52. }
  53. },
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. .goto {
  58. height: 0;
  59. position: relative;
  60. width: 100%;
  61. bottom: 380rpx;
  62. .map {
  63. height: 240rpx;
  64. //background-color: red;
  65. width: 100%;
  66. z-index: 999;
  67. }
  68. }
  69. </style>