//预约到店 获取当前经纬度getLocation() {const that = this;uni.authorize({scope: 'scope.userLocation',geocode: true,success() { // 允许授权// that.getLocationInfo();uni.getLocation({ //获取经纬度信息type: 'wgs84',success(res) {let latitude, longitude;latitude = res.latitude.toString();longitude = res.longitude.toString();}});},fail() { // 拒绝授权// that.openConfirm();console.log("你拒绝了授权,无法获得周边信息")}})},
700字范文,内容丰富有趣,生活中的好帮手!