You've already forked qlg.frontend
样式调整
This commit is contained in:
@ -232,6 +232,8 @@ const app = new Vue({
|
||||
method: "GET",
|
||||
data: {
|
||||
page: this.currentPage,
|
||||
lat: this.location[0],
|
||||
lng: this.location[1],
|
||||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
@ -251,14 +253,21 @@ const app = new Vue({
|
||||
},
|
||||
},
|
||||
created() {
|
||||
plus.geolocation.getCurrentPosition((p) => {
|
||||
console.log(p.coords.latitude);
|
||||
console.log(p.coords.longitude);
|
||||
this.location=[p.coords.latitude, p.coords.longitude];
|
||||
var lat = localStorage.getItem('lat');
|
||||
var lng = localStorage.getItem('lng');
|
||||
if (!lat || !lng) {
|
||||
plus.geolocation.getCurrentPosition((p) => {
|
||||
console.log(p.coords.latitude);
|
||||
console.log(p.coords.longitude);
|
||||
this.location=[p.coords.latitude, p.coords.longitude];
|
||||
this.loadData();
|
||||
},function (err) {
|
||||
mui.alert('获取当前位置失败')
|
||||
waiting.close();
|
||||
})
|
||||
} else {
|
||||
this.location=[lat, lng];
|
||||
this.loadData();
|
||||
},function (err) {
|
||||
mui.alert('获取当前位置失败')
|
||||
waiting.close();
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user