wx 小程序 - 地址 [记录]

wx.getLocation({
          type: 'wgs84',
          success: res => {
            this._ajxGetaddress(res.latitude, res.longitude)
          },
          fail: () => {
            this._ajxGetaddress()
            console.log('授权失败')
            console.log(res)
            if (res.errMsg.indexOf('auth deny') > -1 || res.errMsg.indexOf('auth denied') > -1) {
              this.$tools.toast('o…o 您可以去授权页同意位置定位哦')
              this.scopeWritePhotosAlbum = false
            }
          }
        })

猜你喜欢

转载自www.cnblogs.com/caiCheryl/p/10929444.html