重构搜索页面逻辑

This commit is contained in:
lyswhut
2019-09-20 22:09:18 +08:00
parent a16c4c3657
commit c12bbc7f0f
15 changed files with 276 additions and 32 deletions
@@ -187,6 +187,7 @@ export default {
list,
limit: this.limit,
page,
source: 'kw',
}
})
},
@@ -138,6 +138,7 @@ export default {
list,
allPage: this.allPage,
total: this.total,
source: 'kw',
})
})
},
+6
View File
@@ -59,6 +59,7 @@ export default {
return rawList.map(item => ({
id: `${item.id}-${item.digest}`,
name: item.name,
source: 'kw',
}))
},
filterTagInfo(rawList) {
@@ -69,6 +70,7 @@ export default {
parent_name: type.name,
id: `${item.id}-${item.digest}`,
name: item.name,
source: 'kw',
})),
}))
},
@@ -94,6 +96,7 @@ export default {
total: body.data.total,
page: body.data.pn,
limit: body.data.rn,
source: 'kw',
}
} else if (!body.length) {
return this.getListUrl({ sortId, id, type, page })
@@ -103,6 +106,7 @@ export default {
total: 1000,
page,
limit: 1000,
source: 'kw',
}
})
},
@@ -127,6 +131,7 @@ export default {
img: item.img,
grade: item.favorcnt / 10,
desc: item.desc,
source: 'kw',
}))
},
filterList2(rawData) {
@@ -160,6 +165,7 @@ export default {
page,
limit: body.rn,
total: body.total,
source: 'kw',
}
})
},