From fbb8dd52c5a769b6c52057c02fa44a439d55506e Mon Sep 17 00:00:00 2001 From: zhaofengliang Date: Mon, 12 Aug 2024 20:42:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/get-location/get-location.uvue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/API/get-location/get-location.uvue b/pages/API/get-location/get-location.uvue index a4742b53..84c0b310 100644 --- a/pages/API/get-location/get-location.uvue +++ b/pages/API/get-location/get-location.uvue @@ -213,14 +213,16 @@ altitude: this.jest_isAltitude, isHighAccuracy: this.jest_isHighAccuracy, geocode: this.jest_isGeocode, - success: (res : any) => { - this.jest_address = res.address + success: (res) => { + if (res.address != null) { + this.jest_address = res.address! + } this.jest_longitude = res.longitude this.jest_latitude = res.latitude this.jest_altitude = res.altitude this.jest_complete = true }, - fail: (err : any) => { + fail: (err ) => { this.jest_errCode = err.errCode this.jest_complete = true } -- GitLab