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