ApiService.js 575 字节
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
  },
  async allTriplet(articleIds) {
8
    return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds);
9 10
  },
  async onDelete(id) {
11
    return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', {
12 13 14 15 16 17
      params: {
        id: id
      }
    })
  }
}
18
export default ApiService;