更新
This commit is contained in:
@@ -262,7 +262,7 @@
|
||||
} else {
|
||||
this.isFilterData=true
|
||||
}
|
||||
this.getSiteList()
|
||||
// this.getSiteList()
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
@@ -363,17 +363,59 @@
|
||||
onSelected(e) {
|
||||
// console.log(e)
|
||||
},
|
||||
// refreshLocation() {
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// success: function(res) {
|
||||
// uni.setStorageSync('location', res)
|
||||
// this.getSiteList()
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
refreshLocation() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function(res) {
|
||||
success: (res) => {
|
||||
uni.setStorageSync('location', res)
|
||||
}
|
||||
this.getSiteList()
|
||||
},
|
||||
fail: () => {
|
||||
uni.getSetting({
|
||||
success: (res) => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
uni.showModal({
|
||||
title: '请您打开定位权限',
|
||||
content: '用于获取您当前位置附近的油站',
|
||||
confirmText: '去设置',
|
||||
success: (resSec) => {
|
||||
if (resSec.confirm) {
|
||||
uni.openSetting({
|
||||
complete:() => {
|
||||
// this.getSiteList()
|
||||
// this.realPosition()
|
||||
this.refreshLocation()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
uni.showToast({
|
||||
title:'获取定位失败,请稍后再试!',
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// complete: () => {
|
||||
// this.getSiteList()
|
||||
// },
|
||||
});
|
||||
},
|
||||
|
||||
getSiteList() {
|
||||
this.refreshLocation()
|
||||
// this.refreshLocation()
|
||||
|
||||
let data1 = {
|
||||
currentPage: this.currentPage,
|
||||
|
||||
Reference in New Issue
Block a user