|
|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;">
|
|
|
|
|
<text class="icon-ditu-dibiao iconfont"></text>
|
|
|
|
|
<text>距离:11.3km</text>
|
|
|
|
|
<text>距离:{{isUnde(item.distance)}}km</text>
|
|
|
|
|
<view class="tomap">
|
|
|
|
|
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
|
|
|
|
|
</view>
|
|
|
|
|
@ -63,22 +63,36 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
showInfo: true,
|
|
|
|
|
list: [],
|
|
|
|
|
list: [],
|
|
|
|
|
latitude:"",
|
|
|
|
|
longitude:"",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.loadActivity()
|
|
|
|
|
var that = this;
|
|
|
|
|
wx.getLocation({
|
|
|
|
|
success(res) {
|
|
|
|
|
console.log(res)
|
|
|
|
|
that.latitude=res.latitude;
|
|
|
|
|
that.longitude=res.longitude;
|
|
|
|
|
that.loadActivity()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
openInfo(obj) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: "info?id="+obj.id+"&latitude="+obj.latitude+"&longitude="+obj.longitude
|
|
|
|
|
url: "info?id="+obj.id
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
loadActivity(){
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
api: '/api/mobile/activity/index',
|
|
|
|
|
data:{
|
|
|
|
|
latitude:that.latitude,
|
|
|
|
|
longitude:that.longitude,
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.list = res.data;
|
|
|
|
|
},
|
|
|
|
|
|