修改服务范围地址选择

master
chen 2022-03-25 17:40:15 +08:00
parent 56aed02bbd
commit 98757fa99a
4 changed files with 49 additions and 6 deletions

View File

@ -83,7 +83,11 @@
}, },
"h5" : { "h5" : {
"sdkConfigs" : { "sdkConfigs" : {
"maps" : {} "maps" : {
"qqmap" : {
"key" : "TMWBZ-XA3CD-HA74Y-PNUS4-SAV6Q-X7FXH"
}
}
}, },
"devServer" : { "devServer" : {
"https" : false, "https" : false,

View File

@ -342,6 +342,15 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}
,{
"path" : "map/map",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
] ]
} }

21
pagesB/map/map.vue Normal file
View File

@ -0,0 +1,21 @@
<template>
<view>
<map :latitude="30.656693" :longitude="104.136425"></map>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@ -76,13 +76,22 @@
const latitude = res.latitude; const latitude = res.latitude;
const longitude = res.longitude; const longitude = res.longitude;
console.log(latitude,longitude,78); console.log(latitude,longitude,78);
uni.openLocation({ uni.chooseLocation({
latitude: latitude, success: function (res) {
longitude: longitude, console.log(res,81);
success: function () { console.log('位置名称:' + res.name);
console.log('success'); console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
} }
}); });
// uni.openLocation({
// latitude: latitude,
// longitude: longitude,
// success: function () {
// console.log('success');
// }
// });
} }
}); });
}, },