-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: EITSxiaozhai <watch.dog@qq.com>
- Loading branch information
Showing
5 changed files
with
85 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
import backApi from "@/utils/backApi"; | ||
import backApi from "@/utils/backApi"; | ||
|
||
export function postBlogRatings(blogId: string, queryParams: URLSearchParams) { | ||
return backApi({ | ||
url: `/views/blogs/${blogId}/ratings/?${queryParams.toString()}`, | ||
method: 'post' | ||
}); | ||
return backApi({ | ||
url: `/views/blogs/${blogId}/ratings/?${queryParams.toString()}`, | ||
method: 'post' | ||
}); | ||
} | ||
|
||
export function postUserBlogId(blogId: string) { | ||
return backApi({ | ||
url: `/views/user/Blogid?blog_id=${blogId}`, | ||
method: 'post' | ||
}); | ||
return backApi({ | ||
url: `/views/user/Blogid?blog_id=${blogId}`, | ||
method: 'post' | ||
}); | ||
} | ||
|
||
export function getAverageRatingRequest(blogId: string) { | ||
return backApi({ | ||
url: `/views/blogs/${blogId}/average-rating/`, | ||
method: 'get' | ||
}); | ||
return backApi({ | ||
url: `/views/blogs/${blogId}/average-rating/`, | ||
method: 'get' | ||
}); | ||
} | ||
|
||
export function postCommentList(blogId: string) { | ||
return backApi({ | ||
url: `/generaluser/${blogId}/commentlist`, | ||
method: 'post' | ||
}); | ||
return backApi({ | ||
url: `/generaluser/${blogId}/commentlist`, | ||
method: 'post' | ||
}); | ||
} | ||
|
||
|
||
export function Postlist(blogId: string) { | ||
return backApi({ | ||
url: `/views/blog/BlogIndex`, | ||
method: 'get' | ||
}); | ||
return backApi({ | ||
url: `/views/blog/BlogIndex`, | ||
method: 'get' | ||
}); | ||
} | ||
|
||
|
||
export function fetchBlogIndex({ page, pageSize }: { page: number; pageSize: number }) { | ||
return backApi({ | ||
url: `/views/blog/BlogIndex?initialLoad=false&page=${page}&pageSize=${pageSize}`, | ||
method: 'get' | ||
}); | ||
export function fetchBlogIndex({page, pageSize}: { page: number; pageSize: number }) { | ||
return backApi({ | ||
url: `/views/blog/BlogIndex?initialLoad=false&page=${page}&pageSize=${pageSize}`, | ||
method: 'get' | ||
}); | ||
} | ||
|
||
export function GoogleUVPV(blogId: string) { | ||
return backApi({ | ||
url: `/views/blogs/total_uvpv`, | ||
method: 'get' | ||
}); | ||
return backApi({ | ||
url: `/views/blogs/total_uvpv`, | ||
method: 'get' | ||
}); | ||
} | ||
|
||
|
||
export function postCommentSave(blogId: string, str: string, token: string) { | ||
return backApi({ | ||
url: `/generaluser/commentsave/vueblogid=${blogId}`, | ||
method: 'post', | ||
data: { | ||
content: str, | ||
}, | ||
headers: { | ||
'Authorization': `Bearer ${token}`, | ||
} | ||
}); | ||
return backApi({ | ||
url: `/generaluser/commentsave/vueblogid=${blogId}`, | ||
method: 'post', | ||
data: { | ||
content: str, | ||
}, | ||
headers: { | ||
'Authorization': `Bearer ${token}`, | ||
} | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters