亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

wx.getLocation無法正確執行回調,估計是作用域的原因

wx.getLocation無法正確執行回調,估計是作用域的原因

慕無忌1623718 2018-10-18 14:41:57
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 回答
  • 0 關注
  • 3220 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號