that.dataList = res.data.data; //这里获取不到函数外面的this,所以一定要that

getMap() {
let that = this;
console.log('=========getMap');
uni.getLocation({

 

。。。。

success: (res) => {
that.dataList = res.data.data; //这里获取不到函数外面的this,所以一定要that 

posted @ 2023-09-30 00:20  ucdos2023  阅读(16)  评论(0编辑  收藏  举报