Commit 59054319 authored by zhengke's avatar zhengke

修改地图

parent 24f3e350
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<view>{{dataList.AddressDes}}</view> <view>{{dataList.AddressDes}}</view>
</view> </view>
</view> </view>
<view class="loc-right"> <view class="loc-right" @click="goMap(dataList.Address,dataList.Lng,dataList.Lat)">
<text style="margin-right: 20rpx;">地图详情</text> <text style="margin-right: 20rpx;">地图详情</text>
<u-icon name="arrow" size="20" /> <u-icon name="arrow" size="20" />
</view> </view>
...@@ -336,17 +336,18 @@ ...@@ -336,17 +336,18 @@
); );
}, },
goMap(name, lon, lat) { goMap(name, lon, lat) {
let newLon=parseFloat(lon)
let newLat=parseFloat(lat)
wx.openLocation({ wx.openLocation({
latitude: lat, latitude:newLat,
longitude: lon, longitude:newLon,
scale: 18, scale: 18,
name, name,
address: "武侯区科华中路 2 号", success:(res)=>{
success: (res) => { console.log(res)
// console.log(res)
}, },
fail: (err) => { fail: (err) => {
// console.log(err) console.log(err)
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment