查看导航
<block wx:if="{{index_data.shop_list != false}}">
<view class="store_information">
<block wx:for="{{index_data.shop_list}}">
<view class="store_detail">
<text class="store_name">{{item.name}}</text>
<image class="tel_img" src="/images/common/dianhua.png" />
<text class="store_tel">{{item.tel}}</text>
<image class="place_img" src="/images/common/dizhi-1.png" />
<text class="store_place">{{item.distance}}km | {{item.address}}</text>
<view class="navigation_img" data-lng="{{item.longitude}}" data-lat="{{item.latitude}}" bindtap="go_to_map">
<image src="/images/menu/daohang.png" />
</view>
</view>
</block>
</view>
</block>
/**
* 导航
*/
go_to_map: function(e) {
let lng = parseFloat(e.currentTarget.dataset.lng);
let lat = parseFloat(e.currentTarget.dataset.lat);
wx.openLocation({
latitude:lat,
longitude:lng,
scale: 18
})
}
|
请发表评论