<div class="p-s-i l" v-for="item in product.productItems">
<img class="icon" src="../images/home_icon_zt.png">
<img src="../images/product_bg_cam.png">
<p>{{item.title}}</p>
<span>{{item.description}}</span>
</div>
var product = new Vue({
el: '#app-product',
data: {
product: null,
},
methods: {
imgFormatter(val) {
return IMGPATH + val
},
getProductData() {
let this_ = this
$.ajax({
success: function success(res) {
console.log(res);//已打印,结构和上图一样
this_.product = res.data
}
});
}
})
一直报错
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…