wx.getLocation({ type: 'wgs84', success: function (res) { alert("=======" + res.latitude); coords.latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90 coords.longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。 alert("com here===" + coords.longitude); getShopList(); }, cancel: function (res) { getShopList(); }, fail: function (res) { getShopList(); } }); 上面是我写的调用方法,能进success方法,并且执行了第一个alert,但是下面的不能执行了。我怀疑是js不识别coords和getShopList方法,这我都在外层定义的,我怀疑是作用域的问题。但是不知道怎么解决
添加回答
举报
0/150
提交
取消