<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>