1、在Controller中根据查询条件查到两个对象,把这两个对象放在一个list中,并返回给js,前台是vue。代码如下:
①前段代码
showAppointRecord(this.vmessage.wxOpenid).then(response => {
if (response.code !== 200) {
utils.danger(response.message)
}else{
this.$router.push({
path: '/appointmentRecord',
query: {
appointRecord:JSON.stringify(response.data)
},
})
}
});
②后台代码
List<Appointmentrecord> appointmentRecord = appointmentRecordService.getAppointmentRecord(wxOpenid);
return new ErrorResponseData(200, "ok", appointmentRecord);
其中前台的response.data就是返回的list,但是在vue中是数组的形式。截图如下:
而他的长度是805
,
请问如何把返回的list的两个对象给取出来。