|
@@ -62,7 +62,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- var timer = null;
|
|
|
+ var timer = null,timer2 = null;
|
|
|
const QQMapWX = require('../static/lib/qqmap-wx-jssdk.min.js');
|
|
|
const qqmapsdk = new QQMapWX({
|
|
|
key: 'V3NBZ-6NRKT-QOQXY-LU6RY-PNHJ5-QDBTQKEY'
|
|
@@ -103,10 +103,14 @@
|
|
|
},
|
|
|
onUnload() {
|
|
|
clearInterval(timer)
|
|
|
+ clearInterval(timer2)
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getRules();
|
|
|
this.getCurrentLocation();
|
|
|
+ timer2 = setInterval(()=>{
|
|
|
+ this.getCurrentLocation();
|
|
|
+ },5000)
|
|
|
this.getUserInfo();
|
|
|
},
|
|
|
methods:{
|
|
@@ -187,6 +191,7 @@
|
|
|
success: (res) => {
|
|
|
if(res.result && res.result.elements.length > 0) {
|
|
|
this.distance = res.result.elements[0].distance;
|
|
|
+ console.log(this.distance,'distance');
|
|
|
}
|
|
|
},
|
|
|
fail: (err) => {
|