Commit 6b1520f0fb47ed3d46d7c47bcd833f9f28d7c749

Authored by vking
1 parent df523398

search

Showing 1 changed file with 3 additions and 2 deletions
@@ -86,13 +86,14 @@ Page({ @@ -86,13 +86,14 @@ Page({
86 * 生命周期函数--监听页面初次渲染完成 86 * 生命周期函数--监听页面初次渲染完成
87 */ 87 */
88 onReady: function () { 88 onReady: function () {
89 - this.selectComponent('#getpos').getPos(); 89 +
90 }, 90 },
91 91
92 /** 92 /**
93 * 生命周期函数--监听页面显示 93 * 生命周期函数--监听页面显示
94 */ 94 */
95 onShow: function () { 95 onShow: function () {
  96 + this.selectComponent('#getpos').getPos();
96 PubSub.on( 97 PubSub.on(
97 'searchParamList', 98 'searchParamList',
98 data=>{ 99 data=>{
@@ -438,7 +439,7 @@ Page({ @@ -438,7 +439,7 @@ Page({
438 this.getList() 439 this.getList()
439 }, 440 },
440 moveToLocation(){ 441 moveToLocation(){
441 - if(!this.position || !this.position.latitude || !this.position.longitude){ 442 + if(!this.location || !this.location.latitude || !this.location.longitude){
442 this.selectComponent('#getpos').getPos(true); 443 this.selectComponent('#getpos').getPos(true);
443 return; 444 return;
444 } 445 }