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