在自定义组件页面请求接口获取数据,把返回的数据复制到页面上,赋值成功,但是页面上获取不到数据,获取到的还是空值
const that = this;
let val = {
lat: that.detail.lat,
lng: that.detail.lng,
keywords: that.keyText[that.tabIdx],
page: 1,
limit: 5
};
let url = 'api/api/wxlnglat';
util.httpRequest(url, val, 'GET').then(res => {
if (res.result === 'success') {
that.nearList = res.results;
that.$emit('detMatching', {});
}
});
请问是否赋值方式有问题,应该怎样赋值
0 个回复