对接数据

This commit is contained in:
2025-10-24 15:45:38 +08:00
parent 672a2f4c90
commit d3375a347f
138 changed files with 16904 additions and 1026 deletions

18
api/article.js Normal file
View File

@ -0,0 +1,18 @@
export default ($axios) => ({
// 获取文章详情
getArticleDetail(slug) {
return $axios.get('/articles/slug/' + slug)
},
// 获取文章列表
getArticleList(params) {
return $axios.get('/articles', { params })
},
// 记录文章点击
recordArticleClick(id) {
return $axios.post('/articles/click', {id})
},
// 文章点赞
clickArticleLike(id) {
return $axios.post('/articles/like', {id})
}
})

8
api/comment.js Normal file
View File

@ -0,0 +1,8 @@
export default ($axios) => ({
getToolCommentList(params) {
return $axios.get('/comment', { params })
},
addToolComment(data) {
return $axios.post('/comment', data)
},
})

8
api/config.js Normal file
View File

@ -0,0 +1,8 @@
export default ($axios) => ({
getModuleConfigKey(Key) {
return $axios.get('/setting', { params: { Key }});
},
getModuleConfigs() {
return $axios.get('/settings');
}
})

View File

@ -1,5 +0,0 @@
export default ($axios) => ({
// getGameList(params) {
// return $axios.get('/x/game', { params })
// },
})

23
api/tools.js Normal file
View File

@ -0,0 +1,23 @@
export default ($axios) => ({
getToolsList(params) {
return $axios.get('/tool', { params })
},
getCategoryList(params) {
return $axios.get('/category', { params })
},
getToolByCategory(params) {
return $axios.get('/tool/group', { params })
},
getToolDetailBySlug(slug) {
return $axios.get('/tool/' + slug)
},
clickToolLike(id) {
return $axios.post('/tool/like', {id})
},
recordToolClickNum(id) {
return $axios.post('/tool/click', {id})
},
searchToolByWord(word) {
return $axios.get('/tool/search', { params:{q: word, limit:50}})
}
})

View File

@ -1,3 +0,0 @@
export default ($axios) => ({
})