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; } }