woddle
woddle
  • 发布:2019-01-16 18:50
  • 更新:2019-01-16 19:30
  • 阅读:1325

uni.getLocation回调修改数据后,界面没刷新

分类:uni-app

uni.getLocation({
type: 'wgs84',
success: function (res) {
this.d = res.longitude
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
}
});
在界面中d没有被修改成功

2019-01-16 18:50 负责人:无 分享
已邀请:
虫雪浓

虫雪浓 - 热爱生活,热爱编程

this指向错误 ,回调改成键头函数。

该问题目前已经被锁定, 无法添加新回复