邓洁 : 修改发布地址问题

This commit is contained in:
邓洁
2023-12-06 22:51:18 +08:00
parent 2199f88725
commit 12a810cc0d
5 changed files with 20 additions and 8 deletions

View File

@@ -345,11 +345,15 @@
uni.$u.toast('请先选择区域')
return false
}
let address = this.form.region.split('-')[1] + value
// console.log('uni.getStorageSync()', uni.getStorageSync('province'), uni.getStorageSync('city'));
var that = this
uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + that.form.region + value + '&key=' +
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + uni.getStorageSync('province') + uni
.getStorageSync('city') + that.form.region.split('-')[0] + address + '&key=' +
that.$api.key,
success(res) {
// console.log('地址转经纬度', that.form.region.split('-')[0], address, res.data);
// console.log('diz', res.data.result.location);
if (res.data.message == "query ok") {
// console.log('lat', res.data.result.location.lat);