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
            }
          }
        })

 

posted @ 2019-05-27 10:43  丶七月小先生丶  阅读(202)  评论(0编辑  收藏  举报