diff --git a/src/utils/external-api.js b/src/utils/external-api.js new file mode 100644 index 0000000..875bbaa --- /dev/null +++ b/src/utils/external-api.js @@ -0,0 +1,15 @@ +/** + * 外部接口调用通用方法 + */ +import axios from "axios"; + +export function getstate() { + + return axios.get('/all/getstate?UTF-8') + .then(response => { + return response.data; + }) + .catch(error => { + console.error('API 请求失败:', error); + }); +} \ No newline at end of file