From db3bd9f510a1ac4e3b8c908bf34fc3c4fcbcc619 Mon Sep 17 00:00:00 2001 From: lfs3 Date: Wed, 28 Aug 2019 15:08:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/wxLocation.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/models/wxLocation.js b/src/models/wxLocation.js index a44daa9..29fa4ce 100644 --- a/src/models/wxLocation.js +++ b/src/models/wxLocation.js @@ -37,7 +37,7 @@ Vue.prototype.wxLocation = function () { type: "gcj02", // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02' success: function (res) { console.log('res:'+res); - alert('res:'+res); + alert('res.latitude:'+res.latitude+'------res.longitude:'+res.longitude); localStorage.setItem("latitude", res.latitude); localStorage.setItem("longitude", res.longitude); $.ajax({ @@ -46,8 +46,7 @@ Vue.prototype.wxLocation = function () { dataType: "jsonp", jsonp: "callback", success: function (data) { - console.log('data:'+data); - alert('data:'+data); + alert('data.result:'+data.result); } }); },