|
...
|
...
|
@@ -31,8 +31,23 @@ Page({ |
|
|
|
*/
|
|
|
|
eventChannel:null,
|
|
|
|
onLoad: async function (options) {
|
|
|
|
//lat=34.21719&lng=108.89155&map={"errMsg":"getMapRegion:ok","southwest":{"longitude":108.87545674591064,"latitude":34.204520114013846},"northeast":{"longitude":108.90764325408935,"latitude":34.229857981005225},"scale":15}&multiIndex=1&tags=1,2
|
|
|
|
//lat=39.65273&lng=118.15813&map={"errMsg":"getMapRegion:ok","southwest":{"longitude":118.11012337295534,"latitude":39.61934377763755},"northeast":{"longitude":118.1262166270447,"latitude":39.63137569933196},"scale":15}&multiIndex=0¢re_pos=39.625360,118.118170&hasSuggestion=1&keywordTip=唐山站
|
|
|
|
/**
|
|
|
|
* lat=39.65273
|
|
|
|
* &lng=118.15813
|
|
|
|
* &map={"errMsg":"getMapRegion:ok","southwest":{"longitude":118.15008337295534,"latitude":39.64671615783738},"northeast":{"longitude":118.16617662704469,"latitude":39.65874331903751},"scale":15}
|
|
|
|
* &multiIndex=0
|
|
|
|
* ¢re_pos=39.65273,118.15813
|
|
|
|
* &hasSuggestion=
|
|
|
|
* &keyword=
|
|
|
|
* &filterParams={"consumeStr":"¥200-300","min":"200","max":"300","active":"200,300"}
|
|
|
|
*/
|
|
|
|
this.filterParams=null
|
|
|
|
if(options.filterParams){
|
|
|
|
this.filterParams=JSON.parse(options.filterParams)
|
|
|
|
this.setData({
|
|
|
|
filterParams:this.filterParams,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
this.options=options;
|
|
|
|
if(options.hasSuggestion){
|
|
|
|
let pos=options.centre_pos.split(',')
|
|
...
|
...
|
@@ -244,6 +259,13 @@ Page({ |
|
|
|
this.setData({
|
|
|
|
placeholder:placeholder,
|
|
|
|
})
|
|
|
|
if(this.filterParams){//人均过滤
|
|
|
|
let filterParams=this.filterParams.min+','+this.filterParams.max
|
|
|
|
if(this.filterParams.min==this.filterParams.max && this.filterParams.min==300){
|
|
|
|
filterParams=this.filterParams.min+','+parseInt(new Date()/1000)
|
|
|
|
}
|
|
|
|
this.param.average=filterParams
|
|
|
|
}
|
|
|
|
App.Customer.SellerLists(this.param).then(res=>{
|
|
|
|
this.setData({
|
|
|
|
rsl:[],
|
|
...
|
...
|
@@ -453,4 +475,32 @@ Page({ |
|
|
|
//PubSub.emit('searchParam', {fun:'moveToLocation'})
|
|
|
|
setTimeout(()=>{this.getList()},0)
|
|
|
|
},
|
|
|
|
filterShow(){
|
|
|
|
this.selectComponent('#filter').show(this.filterParams);
|
|
|
|
},
|
|
|
|
filterParams:null,
|
|
|
|
filterEvent(e){
|
|
|
|
console.log('filterEvent',e)
|
|
|
|
if(e.detail.type=='clean'){
|
|
|
|
this.filterParams=null
|
|
|
|
this.setData({
|
|
|
|
filterParams:null,
|
|
|
|
})
|
|
|
|
}else{
|
|
|
|
this.filterParams=e.detail.data
|
|
|
|
this.setData({
|
|
|
|
filterParams:this.filterParams,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
setTimeout(()=>{this.getList();},0)
|
|
|
|
if(this.hasOneListPage()){
|
|
|
|
PubSub.emit(
|
|
|
|
'searchParam',
|
|
|
|
{
|
|
|
|
fun:'filterEvent',
|
|
|
|
e:e,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}) |
|
|
\ No newline at end of file |
...
|
...
|
|