Showing
2 changed files
with
5 additions
and
1 deletions
| @@ -438,6 +438,10 @@ Page({ | @@ -438,6 +438,10 @@ Page({ | ||
| 438 | this.getList() | 438 | this.getList() |
| 439 | }, | 439 | }, |
| 440 | moveToLocation(){ | 440 | moveToLocation(){ |
| 441 | + if(!this.position || !this.position.latitude || !this.position.longitude){ | ||
| 442 | + this.selectComponent('#getpos').getPos(true); | ||
| 443 | + return; | ||
| 444 | + } | ||
| 441 | this.suggestion=null | 445 | this.suggestion=null |
| 442 | this.hasCleanSuggestion=true | 446 | this.hasCleanSuggestion=true |
| 443 | this.setData({ | 447 | this.setData({ |
| @@ -108,5 +108,5 @@ | @@ -108,5 +108,5 @@ | ||
| 108 | </view> | 108 | </view> |
| 109 | </view> | 109 | </view> |
| 110 | </block> | 110 | </block> |
| 111 | -<getpos bindpos="onpos" id="getpos" hasAllowFail hasAllowLoading="{{false}}"></getpos> | 111 | +<getpos bindpos="onpos" id="getpos" hasAllowLoading="{{false}}"></getpos> |
| 112 | <as-phone id="as"></as-phone> | 112 | <as-phone id="as"></as-phone> |
-
Please register or login to post a comment