add profile function

This commit is contained in:
simple321vip
2023-04-03 21:37:44 +08:00
parent ad0234fc45
commit c0a8a9cd95
6 changed files with 193 additions and 3 deletions
+55
View File
@@ -0,0 +1,55 @@
import { service } from '../utils/request'
const headers = {
'Content-Type': 'application/json;charsetset=UTF-8'
}
const create_profile = (data: Object) => {
return service({
url: '/wiki/api/v1/author/profile',
method: 'POST',
data: data
})
}
const update_profile = (data: Object) => {
return service({
url: '/wiki/api/v1/author/profile',
method: 'PUT',
data: data
})
}
const get_profile = () => {
return service({
url: '/wiki/api/v1/author/profile',
method: 'GET',
headers: headers
})
}
const get_profileName = () => {
return service({
url: '/wiki/api/v1/author/profile/name',
method: 'GET',
headers: headers
})
}
const judge_profile = (data: Object) => {
return service({
url: '/wiki/api/v1/author/profile/judge',
method: 'POST',
data: data
})
}
export {
create_profile,
get_profile,
update_profile,
get_profileName,
judge_profile
}