小程序数据接收

async getGoodsList(){
    const res=await request({url:"https://api-hmugo-web.itheima.net/api/public/v1/goods/search",data:this.QueryParams});
    
    this.setData({
      
      goodsList:res.data.message.goods
    })


  },

goodsList:res.goods没有定义规则,不可以这样用需要改成goodsList:res.data.message.goods

 
posted @ 2020-08-12 21:33  安全舟  阅读(216)  评论(0)    收藏  举报
QQ:3378757846