<div class="food" v-for="(value,index) in goodsList" v-if="value.state!==Nav && value.sid==activeKey">
getList(){
//接口请求数据
const requestTask = uni.request({
url: '../../static/home.json', //仅为示例,并非真实接口地址。
dataType:'json',
data:{},
success: function (res) {
this.goodsList = res.data.goods
console.log(this.goodsList);
}
});
},
onLoad(){
this.getList();
console.log(this.goodsList);
},
数据已获取到 为啥无法渲染页面上去
0 个回复