Commit 220e49b2fb8140b7392009310dc67f2963d65162

Authored by wangfan
1 parent 0b368fbd

C端调整

Showing 1 changed file with 15 additions and 4 deletions
@@ -107,6 +107,12 @@ Page({ @@ -107,6 +107,12 @@ Page({
107 * 生命周期函数--监听页面显示 107 * 生命周期函数--监听页面显示
108 */ 108 */
109 onShow: async function () { 109 onShow: async function () {
  110 + console.log({
  111 + 'this.hasGetLocation':this.hasGetLocation,
  112 + 'this.hasOnLoad':this.hasOnLoad,
  113 + 'this.hasClickMoveToLocation':this.hasClickMoveToLocation,
  114 + 'this.data.hasSuggestion':this.data.hasSuggestion,
  115 + })
110 this.getClassNameFlag=true; 116 this.getClassNameFlag=true;
111 //this.getPos(); 117 //this.getPos();
112 if(this.data.hasSuggestion) return; 118 if(this.data.hasSuggestion) return;
@@ -139,7 +145,10 @@ Page({ @@ -139,7 +145,10 @@ Page({
139 //this.getPos(systemInfo); 145 //this.getPos(systemInfo);
140 this.systemInfo=systemInfo 146 this.systemInfo=systemInfo
141 this.selectComponent('#getpos').getPos(); 147 this.selectComponent('#getpos').getPos();
142 - this.getMarkers(); 148 + if(!this.hasClickMoveToLocation){
  149 + this.getMarkers();
  150 + }
  151 +
143 }, 152 },
144 153
145 /** 154 /**
@@ -177,9 +186,10 @@ Page({ @@ -177,9 +186,10 @@ Page({
177 186
178 }, 187 },
179 onpos(e){ 188 onpos(e){
  189 + console.log('onpos',e);
180 let res=e.detail; 190 let res=e.detail;
181 - this.hasGetLocation=true;  
182 if(!res.latitude) return; 191 if(!res.latitude) return;
  192 + this.hasGetLocation=true;
183 this.sellersIds=[] 193 this.sellersIds=[]
184 this.sellers=[] 194 this.sellers=[]
185 let map = this.data.map; 195 let map = this.data.map;
@@ -195,6 +205,7 @@ Page({ @@ -195,6 +205,7 @@ Page({
195 hasSuggestion:false, 205 hasSuggestion:false,
196 }) 206 })
197 if(this.mapCtx){ 207 if(this.mapCtx){
  208 + //this.mapCtx.moveToLocation();
198 this.mapCtx.getRegion({ 209 this.mapCtx.getRegion({
199 success:(res)=>{ 210 success:(res)=>{
200 console.log('onpos.getRegion',res) 211 console.log('onpos.getRegion',res)
@@ -556,13 +567,13 @@ Page({ @@ -556,13 +567,13 @@ Page({
556 },300) 567 },300)
557 }, 568 },
558 bindtransition(e){ 569 bindtransition(e){
559 - console.log('bindtransition',this.sellersNow,e.detail.current,this.sellersNow[e.detail.current]);  
560 - if(this.hasMarkertap){ 570 + if(this.hasMarkertap){
561 this.hasMarkertap=false; 571 this.hasMarkertap=false;
562 return; 572 return;
563 } 573 }
564 let i=e.detail.current 574 let i=e.detail.current
565 this.activeSellerID=this.data.markers[i].id 575 this.activeSellerID=this.data.markers[i].id
  576 + console.log('bindtransition',this.sellersNow,e.detail.current,this.sellersNow[e.detail.current],this.activeSellerID);
566 // this.activeSellerID=this.sellersNow[i]; 577 // this.activeSellerID=this.sellersNow[i];
567 // this.markertap({ 578 // this.markertap({
568 // markerId:this.activeSellerID 579 // markerId:this.activeSellerID