优化:优化 API 服务调用

This commit is contained in:
2022-11-30 22:39:09 +08:00
parent 699e469c60
commit 94eacb25a6
3 changed files with 30 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
import { request } from './config'
export const getPv = (id, pageUrl, call) => {
export const getArticleViewCount = (id, pageUrl, call) => {
request.get(`/article/view/${id}?pageUrl=${pageUrl}`, {}).then(result => {
call(process(result))
})
@@ -14,4 +14,4 @@ function process(result) {
}
}
export default { getPv }
export default { getArticleViewCount }