1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <template>
- <view>
- <ujp-navbar title="白金会员免费领礼品"></ujp-navbar>
- <img style="width: 100%;" src="@/assets/img/20250625/info1.png"></img>
- <view class="goto">
- <view class="map" @click="gotoMap()">
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- address: "荆州市沙市区江津东路附155号荆鹏软件园",
- latitude: 30.306253,
- name:"荆鹏软件园",
- longitude: 112.276393,
- }
- },
- onReady() {
- WxJsApi.getWxConfig(['getLocation', 'openLocation']).then((res) => {
- // //(res)
- }).catch(error => {
- //(res)
- })
- },
- methods: {
- navigate() {
-
- //console.log(item)
- uni.showLoading({
- })
- WxJsApi.openLocation({
- latitude: parseFloat(this.latitude), //目的地latitude
- longitude: parseFloat(this.longitude), //目的地longitude
- name: this.name,
- address: this.address,
- scale: 15, //地图缩放大小,可根据情况具体调整
- success(res) {
- uni.hideLoading()
- },
- complete() {
- // uni.hideLoading()
- }
- });
- // //('station'+JSON.stringify(_self.stationDetail.station))
- // window.location.href = "https://uri.amap.com/marker?position=" + _self.stationDetail.station.longitude +
- // "," + _self.stationDetail.station.latitude + "&name=" + _self.stationDetail.station.name;
- },
- gotoMap() {
- console.log("1")
- }
- },
- }
- </script>
- <style scoped lang="scss">
- .goto {
- height: 0;
- position: relative;
- width: 100%;
- bottom: 380rpx;
- .map {
- height: 240rpx;
- //background-color: red;
- width: 100%;
- z-index: 999;
- }
- }
- </style>
|