flat: 暂存

This commit is contained in:
Apcallover
2024-04-25 19:53:08 +08:00
parent 9642c98111
commit 1b3ca37c3b
2 changed files with 30 additions and 30 deletions

View File

@@ -89,35 +89,35 @@
},
onShow() {
const _this = this
// uni.getLocation({
// type: 'gcj02',
// success: function(res) {
// const {
// longitude,
// latitude
// } = res
// _this.$api.msg('成功获得周边信息')
// console.log('成功获得周边信息', res)
// _this.latitude = latitude
// _this.longitude = longitude
// _this.$api.msg('获得周边信息')
// _this.getList(lon, lat).then((covers) => {
// _this.covers = covers
// })
// },
// fail: function(err) {
// _this.$api.msg('无法获得周边信息')
// },
// complete: function(e) {}
// })
this.mockGetLocation().then((myPoint) => {
// this.latitude = myPoint.latitude
// this.longitude = myPoint.longitude
_this.getList(_this.longitude, _this.latitude).then((covers) => {
_this.$api.msg('成功获得周边信息')
_this.covers = covers
})
uni.getLocation({
type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
// _this.$api.msg('成功获得周边信息')
// console.log('成功获得周边信息', res)
_this.latitude = latitude
_this.longitude = longitude
// _this.$api.msg('获得周边信息')
_this.getList(longitude, latitude).then((covers) => {
_this.covers = covers
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
})
// this.mockGetLocation().then((myPoint) => {
// // this.latitude = myPoint.latitude
// // this.longitude = myPoint.longitude
// _this.getList(_this.longitude, _this.latitude).then((covers) => {
// _this.$api.msg('成功获得周边信息')
// _this.covers = covers
// })
// })
},
methods: {
openMap(lon, lat) {