Merge pull request '邓洁 : 修改细节' (#37) from dj1 into master

Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/37
This commit is contained in:
odjbin
2023-11-13 14:01:58 +00:00

View File

@@ -49,7 +49,7 @@
this.open() this.open()
}, },
methods: { methods: {
getLocation1() { getUserLocation() {
var that = this var that = this
let qqmapsdk = new QQMapWX({ let qqmapsdk = new QQMapWX({
key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB' key: 'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB'
@@ -66,8 +66,8 @@
}, },
success: (re) => { success: (re) => {
console.log("解析地址成功", re); console.log("解析地址成功", re);
console.log(re.result.ad_info.city, ); console.log(re.result.ad_info.city);
console.log(re.result.ad_info.district, ); console.log(re.result.ad_info.district);
let city = re.result.ad_info.city let city = re.result.ad_info.city
let district = re.result.ad_info.district let district = re.result.ad_info.district
that.position = city.slice(0, 2) + district.slice(0, 2) that.position = city.slice(0, 2) + district.slice(0, 2)
@@ -89,7 +89,7 @@
scope: 'scope.userFuzzyLocation', scope: 'scope.userFuzzyLocation',
success: function() { success: function() {
console.log('授权成功'); console.log('授权成功');
that.getLocation1() that.getUserLocation()
}, },
fail: function() { fail: function() {
console.log('授权失败'); console.log('授权失败');
@@ -102,7 +102,7 @@
uni.openSetting({ uni.openSetting({
success: (res) => { success: (res) => {
console.log(res); console.log(res);
that.getLocation1(); that.getUserLocation();
} }
}) })
} else { } else {