优化分类tab展示

master
wayn 4 years ago
parent 6937cbab57
commit 1f80e9dae4

@ -6,10 +6,10 @@ export function getCategoryData() {
method: 'get'
})
}
export function getCategoryContent(data) {
export function getCategoryContent(query) {
return request({
url: '/category/content',
method: 'post',
data
method: 'get',
params: query
})
}

@ -58,15 +58,15 @@ export default {
},
getCategoryContent() {
getCategoryContent({
index: this.active
id: this.categoryList[this.active].id
}).then((res) => {
const { currentCategory, listItem } = res.map
this.subCategoryList = listItem
const { currentCategory, subCategoryList } = res.map
this.currentCategory = currentCategory
this.subCategoryList = subCategoryList
})
},
onNavClick() {
this.getCateContent()
this.getCategoryContent()
}
}
}

Loading…
Cancel
Save