提交 d669ab64 编写于 作者: H hdx

long-list: 简化响应数据处理方式

上级 90cdef7e
......@@ -73,14 +73,16 @@
},
dataType: '',
success: (res) => {
const responseData = JSON.parse<ResponseDataType>(res.data as string)!
const list = responseData.data
const responseData = JSON.parse<ResponseDataType>(res.data as string)
if (responseData == null) {
return
}
list.forEach((item) => {
responseData.data.forEach((item) => {
this.dataList.push(item)
})
this.isEnded = list.length <= 0;
this.isEnded = responseData.data.length <= 0;
this.$currentPage++
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册