|
@@ -39,7 +39,7 @@
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
<mescroll-uni :up="upOption" :down="downOption" ref="mescrollRef" @init="mescrollInit"
|
|
<mescroll-uni :up="upOption" :down="downOption" ref="mescrollRef" @init="mescrollInit"
|
|
- @up="upCallback" @down="downCallback" height="660">
|
|
|
|
|
|
+ @up="upCallback" @down="downCallback" height="730">
|
|
<view class='findItem' v-for='item in findList'>
|
|
<view class='findItem' v-for='item in findList'>
|
|
<view style='align-items: flex-start;' class='flex'>
|
|
<view style='align-items: flex-start;' class='flex'>
|
|
<view class="left">
|
|
<view class="left">
|
|
@@ -170,6 +170,50 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ isdingwei() {
|
|
|
|
+ authorizedLocation().then(res => {
|
|
|
|
+ let _obj = {}
|
|
|
|
+ if (res == '取消授权') {
|
|
|
|
+ //获取上一次,无上一次山海广场
|
|
|
|
+ let _place = uni.getStorageSync("LocationPlace")
|
|
|
|
+ if (_place && _place.latitude) {
|
|
|
|
+ _obj = {
|
|
|
|
+ latitude: _place.latitude,
|
|
|
|
+ longitude: _place.longitude
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ _obj = {
|
|
|
|
+ latitude: 40.22086204872,
|
|
|
|
+ longitude: 122.08338497727
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ _obj = {
|
|
|
|
+ latitude: res.latitude,
|
|
|
|
+ longitude: res.longitude
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.longitude = _obj.longitude
|
|
|
|
+ this.latitude = _obj.latitude
|
|
|
|
+ qqmapsdk.reverseGeocoder({
|
|
|
|
+ location: _obj,
|
|
|
|
+ success: function(res) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ that.detailedAddress = res.result.formatted_addresses.recommend
|
|
|
|
+ that.mescroll.resetUpScroll()
|
|
|
|
+ },
|
|
|
|
+ fail: function(error) {
|
|
|
|
+ console.error(error);
|
|
|
|
+ },
|
|
|
|
+ complete: function(res) {
|
|
|
|
+ // console.log(res);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
mescrollInit(mescroll) {
|
|
mescrollInit(mescroll) {
|
|
this.mescroll = mescroll;
|
|
this.mescroll = mescroll;
|
|
},
|
|
},
|
|
@@ -226,23 +270,21 @@
|
|
that.curPageLen = finddata.data.items.length;
|
|
that.curPageLen = finddata.data.items.length;
|
|
that.handleList = finddata.data.items
|
|
that.handleList = finddata.data.items
|
|
that.totalPage = finddata.data.total;
|
|
that.totalPage = finddata.data.total;
|
|
- for(var i=0;i<that.handleList.length;i++){
|
|
|
|
- that.handleList[i].latitude=that.handleList[i].location.split(',')[0]
|
|
|
|
- that.handleList[i].longitude=that.handleList[i].location.split(',')[1]
|
|
|
|
- // var data=await that.getDistance(that.handleList[i].latitude,that.handleList[i].longitude)
|
|
|
|
- that.handleList[i].distance=(that.handleList[i].distance/1000).toFixed(2)
|
|
|
|
- if(i==that.handleList.length-1){
|
|
|
|
- setTimeout(()=>{
|
|
|
|
- console.log(that.handleList)
|
|
|
|
- that.findList = that.handleList
|
|
|
|
- that.loading = false
|
|
|
|
- that.$nextTick(() => {
|
|
|
|
- that.mescroll.endBySize(that.curPageLen, that.totalPage)
|
|
|
|
- });
|
|
|
|
- uni.hideLoading()
|
|
|
|
- },100)
|
|
|
|
|
|
+ if(that.handleList.length > 0){
|
|
|
|
+ for(var i=0;i<that.handleList.length;i++){
|
|
|
|
+ that.handleList[i].latitude=that.handleList[i].location.split(',')[0]
|
|
|
|
+ that.handleList[i].longitude=that.handleList[i].location.split(',')[1]
|
|
|
|
+ // var data=await that.getDistance(that.handleList[i].latitude,that.handleList[i].longitude)
|
|
|
|
+ that.handleList[i].distance=(that.handleList[i].distance/1000).toFixed(2)
|
|
|
|
+ console.log(that.handleList)
|
|
|
|
+ that.findList = that.handleList
|
|
|
|
+ that.loading = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ that.$nextTick(() => {
|
|
|
|
+ that.mescroll.endBySize(that.curPageLen, that.totalPage)
|
|
|
|
+ });
|
|
|
|
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
@@ -271,6 +313,8 @@
|
|
that.$request.baseRequest('admin.tourism.productManagement', 'list', {
|
|
that.$request.baseRequest('admin.tourism.productManagement', 'list', {
|
|
page: page.num,
|
|
page: page.num,
|
|
limit: page.size,
|
|
limit: page.size,
|
|
|
|
+ latitude: that.latitude,
|
|
|
|
+ longitude: that.longitude
|
|
// searchContent: this.searchVal,
|
|
// searchContent: this.searchVal,
|
|
// classify: this.typeName
|
|
// classify: this.typeName
|
|
}, failres => {
|
|
}, failres => {
|