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