微信小程序后台传值wx.request,出现undefined

用数据集记录中的字段进行查询where({字段:this.data.前台输入绑定的value})

注意:res.data[0].name,不然会输出undefined;

还有一种可能是:

后台使用string类型,前端输出undefined,可使用JSON.stringify(res.data[0].age)进行转换

猜你喜欢

转载自blog.csdn.net/qq_36664799/article/details/89101702
今日推荐