ApiService.js 769 字节
Newer Older
1 2 3
import axios from 'axios'
// 创建一个名为 ApiService 的对象,包含您的异步方法
const ApiService = {
4
	async triplet(articleId) {
5
		return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/triplet?articleId=' + articleId)
6
	},
7
	async syncMyBlog() {
8
		return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/syncMyBlog')
9
	},
10
	async resetLikes() {
11
		return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus')
12 13
	},
	async allTriplet(articleIds) {
14
		return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds)
15 16
	},
	async onDelete(id) {
17
		return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', {
18 19 20 21 22
			params: {
				id: id,
			},
		})
	},
23
}
24
export default ApiService