|
@@ -248,22 +248,33 @@ Page({ |
|
@@ -248,22 +248,33 @@ Page({ |
|
248
|
},
|
248
|
},
|
|
249
|
markertap(e){
|
249
|
markertap(e){
|
|
250
|
console.log(e)
|
250
|
console.log(e)
|
|
251
|
- // let seller = {
|
|
|
|
252
|
- // id: e.markerId
|
|
|
|
253
|
- // };
|
|
|
|
254
|
- // this.sellers.forEach(se => {
|
|
|
|
255
|
- // if (se.id == seller.id) {
|
|
|
|
256
|
- // seller = se;
|
|
|
|
257
|
- // return false;
|
|
|
|
258
|
- // }
|
|
|
|
259
|
- // })
|
|
|
|
260
|
- //this.selectComponent('#seller-box').show(seller);
|
|
|
|
261
|
- //wx.hideTabBar();
|
251
|
+ let markers=this.data.markers;
|
|
|
|
252
|
+ let bl=1.2;
|
|
|
|
253
|
+ markers.forEach(m=>{
|
|
|
|
254
|
+ if(m.width==20*bl){
|
|
|
|
255
|
+ m.width=20;
|
|
|
|
256
|
+ m.height=25;
|
|
|
|
257
|
+ }
|
|
|
|
258
|
+ if(m.width==7*bl){
|
|
|
|
259
|
+ m.width=7;
|
|
|
|
260
|
+ m.height=7;
|
|
|
|
261
|
+ }
|
|
|
|
262
|
+ if(m.id==e.markerId){
|
|
|
|
263
|
+ if(m.width==20){
|
|
|
|
264
|
+ m.width=20*bl;
|
|
|
|
265
|
+ m.height=25*bl;
|
|
|
|
266
|
+ }else{
|
|
|
|
267
|
+ m.width=7*bl;
|
|
|
|
268
|
+ m.height=7*bl;
|
|
|
|
269
|
+ }
|
|
|
|
270
|
+ }
|
|
|
|
271
|
+ })
|
|
262
|
this.setData({
|
272
|
this.setData({
|
|
263
|
- scrollIntoView:'seller-'+e.markerId
|
273
|
+ scrollIntoView:'seller-'+e.markerId,
|
|
|
|
274
|
+ markers:markers,
|
|
264
|
})
|
275
|
})
|
|
265
|
},
|
276
|
},
|
|
266
|
- getMarkers(){
|
277
|
+ async getMarkers(){
|
|
267
|
let cmap=this.data.map;
|
278
|
let cmap=this.data.map;
|
|
268
|
let map = this.mapData;
|
279
|
let map = this.mapData;
|
|
269
|
//console.log('getMarkers',map.region);
|
280
|
//console.log('getMarkers',map.region);
|
|
@@ -274,14 +285,21 @@ Page({ |
|
@@ -274,14 +285,21 @@ Page({ |
|
274
|
}
|
285
|
}
|
|
275
|
let markers = [];
|
286
|
let markers = [];
|
|
276
|
let sellers=[];
|
287
|
let sellers=[];
|
|
277
|
- App.Reserve.SellerList({
|
288
|
+ let param={
|
|
278
|
lat: this.user.latitude,
|
289
|
lat: this.user.latitude,
|
|
279
|
lng: this.user.longitude,
|
290
|
lng: this.user.longitude,
|
|
280
|
offset: 0,
|
291
|
offset: 0,
|
|
281
|
rows: 10000,
|
292
|
rows: 10000,
|
|
282
|
distance: 100000,
|
293
|
distance: 100000,
|
|
283
|
map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale})
|
294
|
map:JSON.stringify({...this.mapData.region,scale:this.mapData.scale})
|
|
284
|
- }).then(res => {
|
295
|
+ }
|
|
|
|
296
|
+ if(this.data.multiIndex[0]>0){
|
|
|
|
297
|
+ param.pnum=this.data.multiIndex[0];
|
|
|
|
298
|
+ }
|
|
|
|
299
|
+ if(this.data.multiIndex[1]>0){
|
|
|
|
300
|
+ param.cuisine=await DA.getCatesID(this.data.multiIndex[1]-1);
|
|
|
|
301
|
+ }
|
|
|
|
302
|
+ App.Reserve.SellerList(param).then(res => {
|
|
285
|
if (res.ret == 200) {
|
303
|
if (res.ret == 200) {
|
|
286
|
let sellersIds=["scale"+this.mapData.scale];
|
304
|
let sellersIds=["scale"+this.mapData.scale];
|
|
287
|
res.data.forEach(seller=>{
|
305
|
res.data.forEach(seller=>{
|
|
@@ -300,18 +318,6 @@ Page({ |
|
@@ -300,18 +318,6 @@ Page({ |
|
300
|
seller.distance+='米';
|
318
|
seller.distance+='米';
|
|
301
|
}
|
319
|
}
|
|
302
|
|
320
|
|
|
303
|
- if(this.mapData.scale<13){
|
|
|
|
304
|
- markers.push({
|
|
|
|
305
|
- id: seller.id,
|
|
|
|
306
|
- iconPath: "http://qn.colorcun.com/custom/lite-yd/image/diandian.png",
|
|
|
|
307
|
- latitude: seller.lat,
|
|
|
|
308
|
- longitude: seller.long,
|
|
|
|
309
|
- width: 6,
|
|
|
|
310
|
- height: 6,
|
|
|
|
311
|
- title:seller.seller_name,
|
|
|
|
312
|
- })
|
|
|
|
313
|
- return;
|
|
|
|
314
|
- }
|
|
|
|
315
|
let namelength = seller.sellername.replace(/[^\x00-\xff]/g, "01").length + 8;
|
321
|
let namelength = seller.sellername.replace(/[^\x00-\xff]/g, "01").length + 8;
|
|
316
|
let marker={
|
322
|
let marker={
|
|
317
|
id: seller.id,
|
323
|
id: seller.id,
|
|
@@ -321,18 +327,6 @@ Page({ |
|
@@ -321,18 +327,6 @@ Page({ |
|
321
|
width: 7,
|
327
|
width: 7,
|
|
322
|
height: 7,
|
328
|
height: 7,
|
|
323
|
//title:seller.seller_name,
|
329
|
//title:seller.seller_name,
|
|
324
|
- callout:{
|
|
|
|
325
|
- content: ' ' + seller.sellername + ' ',
|
|
|
|
326
|
- color: '#fefefe',
|
|
|
|
327
|
- fontSize: 12,
|
|
|
|
328
|
- borderWidth: 1,
|
|
|
|
329
|
- borderColor: '#4C4C4C',
|
|
|
|
330
|
- borderRadius: 50,
|
|
|
|
331
|
- bgColor: '#626262',
|
|
|
|
332
|
- padding: 5,
|
|
|
|
333
|
- textAlign: 'center',
|
|
|
|
334
|
- display:'ALWAYS',
|
|
|
|
335
|
- },
|
|
|
|
336
|
};
|
330
|
};
|
|
337
|
if(seller.level[0].id<3){
|
331
|
if(seller.level[0].id<3){
|
|
338
|
//http://qn.colorcun.com/custom/lite-online/cates/%E6%B1%9F%E6%B5%99%E8%8F%9C.png
|
332
|
//http://qn.colorcun.com/custom/lite-online/cates/%E6%B1%9F%E6%B5%99%E8%8F%9C.png
|
|
@@ -341,6 +335,18 @@ Page({ |
|
@@ -341,6 +335,18 @@ Page({ |
|
341
|
+".png";
|
335
|
+".png";
|
|
342
|
marker.width=20;
|
336
|
marker.width=20;
|
|
343
|
marker.height=25;
|
337
|
marker.height=25;
|
|
|
|
338
|
+ marker.callout={
|
|
|
|
339
|
+ content: ' ' + seller.sellername + ' ',
|
|
|
|
340
|
+ color: '#fefefe',
|
|
|
|
341
|
+ fontSize: 12,
|
|
|
|
342
|
+ borderWidth: 1,
|
|
|
|
343
|
+ borderColor: '#4C4C4C',
|
|
|
|
344
|
+ borderRadius: 50,
|
|
|
|
345
|
+ bgColor: '#626262',
|
|
|
|
346
|
+ padding: 5,
|
|
|
|
347
|
+ textAlign: 'center',
|
|
|
|
348
|
+ display:'ALWAYS',
|
|
|
|
349
|
+ };
|
|
344
|
}
|
350
|
}
|
|
345
|
markers.push(marker)
|
351
|
markers.push(marker)
|
|
346
|
})
|
352
|
})
|
|
@@ -395,6 +401,7 @@ Page({ |
|
@@ -395,6 +401,7 @@ Page({ |
|
395
|
this.setData({
|
401
|
this.setData({
|
|
396
|
multiIndex:util.val(e)
|
402
|
multiIndex:util.val(e)
|
|
397
|
})
|
403
|
})
|
|
|
|
404
|
+ this.getMarkers();
|
|
398
|
},
|
405
|
},
|
|
399
|
setSuggestion(suggestion){
|
406
|
setSuggestion(suggestion){
|
|
400
|
let map=this.data.map;
|
407
|
let map=this.data.map;
|