jWeixin.ready(() => {
jWeixin.getLocation({
type: 'gcj02',
success: (res) => {
console.log('location success: ', res)
this.locationInfo.latitude = res.latitude;
this.locationInfo.longitude = res.longitude;
this.locationInfo.customerId = this.customerId
this.locationInfo.platform = 'dzy'
this.locationInfo.contractType = this.contractType
this.locationInfo.order = this.contractType
this.locationInfo.name = _item.name
this.locationInfo.cardNo = _item.cardNo
this.locationInfo.phone = _item.phone
this.locationInfo.type = _item.type
this.locationInfo.openid = this.openid
this.locationInfo.miniPhone = this.miniPhone
this.locationInfo.deviceModel = this.deviceModel
this.locationInfo.deviceCode = this.deviceCode
console.log('locationInfo: ', this.locationInfo)
API_INVOICE.getAddrResolve(this.locationInfo).then(res => {
console.log('获取成功')
}).catch(err => {
console.log(err)
this.$u.toast(err)
})
},fail(res){
console.log('location fail: ', res)
}
})
w我在本地测试时,用微信内置浏览器,是不是无法获取到定位?还是说是因为域名白名单的原因?希望哪位大佬可以解答
你好,打印config入参和fail,fail吐出来的完整报错信息