| 123456789101112131415161718192021 |
- const { api } = require("./apiConfig");
- function getApi(url, data = {}) {
- return api(url, data, "get");
- }
- /**
- * 向指定URL发送POST请求
- *
- * @param url 请求的URL
- * @param data 请求体数据
- * @returns 返回请求的结果
- */
- function postApi(url, data) {
- return api(url, data, "post");
- }
- module.exports = {
- getApi,
- postApi,
- };
|