blog機能完成

This commit is contained in:
simple321vip
2022-05-02 22:10:20 +08:00
parent 91ee8a9577
commit 0a2c848fa0
10 changed files with 254 additions and 80 deletions
+35
View File
@@ -0,0 +1,35 @@
import request from '../utils/request'
import Qs from 'qs'
const headers = {
'Content-Type': 'application/json;charsetset=UTF-8'
}
const getBlogs = (params: Object) => {
return request({
url: '/reader/blogs',
method: 'GET',
params: params,
paramsSerializer: (params) => {
return Qs.stringify(params, { arrayFormat: 'repeat' })
},
})
}
const getBtName = () => {
return request({
url: '/reader/blog_type',
method: 'GET',
headers: headers
})
}
const getBlog = (bid: string) => {
return request({
url: '/reader/blog/' + bid,
method: 'GET',
headers: headers
})
}
export { getBlogs, getBlog, getBtName }