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

woddle
- 发布:2019-01-16 18:50
- 更新:2019-01-16 19:30
- 阅读:1325
uni.getLocation回调修改数据后,界面没刷新
分类:uni-app
1 个回复
虫雪浓 - 热爱生活,热爱编程
this指向错误 ,回调改成键头函数。