Commit 9d14b8345611b106a17d6d3b3fa678a2a45fb219

Authored by wangfan
1 parent bfcd787f

c端预定

Showing 1 changed file with 10 additions and 3 deletions
@@ -3,7 +3,8 @@ import util from '../../utils/util'; @@ -3,7 +3,8 @@ import util from '../../utils/util';
3 import App from '../../utils/api'; 3 import App from '../../utils/api';
4 import DA from './data'; 4 import DA from './data';
5 const {regeneratorRuntime} = global 5 const {regeneratorRuntime} = global
6 -const mapScale=18 6 +const mapScale=18;
  7 +const transverseViewHeight=170;
7 const renNum=function(){ 8 const renNum=function(){
8 let arr=[] 9 let arr=[]
9 for(let i=1;i<=30;i++){ 10 for(let i=1;i<=30;i++){
@@ -32,7 +33,7 @@ Page({ @@ -32,7 +33,7 @@ Page({
32 suggestion:{}, 33 suggestion:{},
33 hasSuggestion:false, 34 hasSuggestion:false,
34 }, 35 },
35 - transverseViewHeight:170,//横向滚动高度 36 + transverseViewHeight:transverseViewHeight,//横向滚动高度,苹果要比安卓多20
36 //qqmapsdk:null, 37 //qqmapsdk:null,
37 sellers: [], 38 sellers: [],
38 sellersIds:[], 39 sellersIds:[],
@@ -85,7 +86,10 @@ Page({ @@ -85,7 +86,10 @@ Page({
85 if(this.data.hasSuggestion) return; 86 if(this.data.hasSuggestion) return;
86 await getApp().getSystemInfo(); 87 await getApp().getSystemInfo();
87 let sys=getApp().system; 88 let sys=getApp().system;
88 - console.log('onShow',sys.windowHeight,sys.windowHeight-this.transverseViewHeight) 89 + if(sys.system.toLowerCase().indexOf('ios')>-1){
  90 + this.transverseViewHeight=transverseViewHeight+20;
  91 + }
  92 + console.log('onShow',sys,sys.windowHeight,sys.windowHeight-this.transverseViewHeight)
89 this.setData({ 93 this.setData({
90 [`map.height`]: sys.windowHeight-this.transverseViewHeight, 94 [`map.height`]: sys.windowHeight-this.transverseViewHeight,
91 searchAddrTop:sys.statusBarHeight 95 searchAddrTop:sys.statusBarHeight
@@ -345,6 +349,9 @@ Page({ @@ -345,6 +349,9 @@ Page({
345 if(seller.cate.length>0){ 349 if(seller.cate.length>0){
346 marker.iconPath=seller.cate[0].icon 350 marker.iconPath=seller.cate[0].icon
347 } 351 }
  352 + marker.iconPath=marker.iconPath.replace(/\/cates\/(.*)\.png/,function ($0,$1) {
  353 + return '/cates/'+encodeURI($1)+'.png'
  354 + })
348 marker.width=20; 355 marker.width=20;
349 marker.height=25; 356 marker.height=25;
350 marker.callout={ 357 marker.callout={