|
...
|
...
|
@@ -14,14 +14,14 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad: function (options) {
|
|
|
|
this.GetUserCard()
|
|
|
|
//this.GetUserCard()
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady: function () {
|
|
|
|
|
|
|
|
this.selectComponent('#getpos').getPos();
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -56,14 +56,30 @@ Page({ |
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom: function () {
|
|
|
|
if(this.hasMore){
|
|
|
|
this.page+=1;
|
|
|
|
this.GetUserCard()
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
page:1,
|
|
|
|
size:10,
|
|
|
|
hasMore:true,
|
|
|
|
GetUserCard(){
|
|
|
|
App.Customer.GetUserCard({
|
|
|
|
page:this.page,
|
|
|
|
size:this.size,
|
|
|
|
status:0,
|
|
|
|
lat:this.location.latitude,
|
|
|
|
lng:this.location.longitude,
|
|
|
|
}).then(res=> {
|
|
|
|
let list=this.data.list
|
|
|
|
list=list.concat(res.data)
|
|
|
|
if(res.data.length<this.size){
|
|
|
|
this.hasMore=false;
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
list: res.data
|
|
|
|
list: list
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
...
|
...
|
@@ -77,9 +93,9 @@ Page({ |
|
|
|
//lat=39.62420161&lng=118.1174469&multiIndex=0¢re_pos=39.62420161,118.1174469&hasSuggestion=
|
|
|
|
wx.navigateTo({
|
|
|
|
url: util.http_build_query({
|
|
|
|
lat:34.216529,
|
|
|
|
lng:108.894677,
|
|
|
|
centre_pos:'34.216529,108.894677',
|
|
|
|
lat:this.location.latitude,
|
|
|
|
lng:this.location.longitude,
|
|
|
|
centre_pos:`${this.location.latitude},${this.location.longitude}`,
|
|
|
|
keyword:' ',
|
|
|
|
isopen_md:1,
|
|
|
|
multiIndex:0,
|
|
...
|
...
|
@@ -87,4 +103,10 @@ Page({ |
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
location:null,
|
|
|
|
onpos(e){
|
|
|
|
console.log('onpos',e);
|
|
|
|
this.location=e.detail
|
|
|
|
this.GetUserCard();
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|