Init project

This commit is contained in:
lifizer
2023-09-20 21:49:33 +08:00
parent 85a5989c96
commit c9ceac9f37
710 changed files with 125705 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
import config from '@/utils/mapConfig';
module.exports = {
getLocation() {
return uni.getLocation({
type: 'wgs84'
})
},
getCurAddress(latitude, longitude) {
return uni.request({
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
'&key=' + config.key
});
},
getUrlParam(url, name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = url.match(reg);
if (r != null) return (r[2]);
return null;
}
}