flat: 国庆节暂存

This commit is contained in:
史典卓
2024-10-09 10:14:51 +08:00
parent 6504a558ac
commit a4ffe68ec2
32 changed files with 2663 additions and 2135 deletions

View File

@@ -92,24 +92,18 @@
},
mounted() {
const _this = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
})
console.log(this.$store.state.user.userLocation)
if (this.$store.state.user.userLocation) {
const {
latitude,
longitude
} = this.$store.state.user.userLocation
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
} else {
_this.$api.msg('无法获得周边信息')
}
},
onShow() {
// const _this = this
@@ -144,25 +138,17 @@
},
search() {
const _this = this
uni.getLocation({
type: 'gcj02',
success: function(res) {
const {
longitude,
latitude
} = res
_this.latitude = latitude
_this.longitude = longitude
_this.getList(longitude, latitude).then((covers) => {
_this.$api.msg('成功获得周边信息')
_this.$refs.uMap.addFeature(covers)
})
},
fail: function(err) {
_this.$api.msg('无法获得周边信息')
},
complete: function(e) {}
})
if (this.$store.state.user.userLocation) {
const {
latitude,
longitude
} = this.$store.state.user.userLocation
_this.getList(longitude, latitude).then((covers) => {
_this.$refs.uMap.addFeature(covers)
})
} else {
_this.$api.msg('无法获得周边信息')
}
// this.getList(this.longitude, this.latitude).then((covers) => {
// this.$api.msg('成功获得周边信息')
// console.log(covers)