将接口内的数据拆分
async showImage() {
const rest = await classService.getByType({ classId: this.$util.getLocal('classes').id })
this.$nextTick(() => {
rest.data.syList.forEach((element, index) => {
if (index >= 1) {
this.imgList.push(element)
} else {
this.imgListTop.push(element)
}
})
})
},
serviceNews
.getDocumentDetail({ id: this.id })
.then((res) => {
this.list = res
console.log(this.list)
})
.catch((err) => {
console.log(err)
})