feat(web): 同步预约演示与兜底渠道优化

This commit is contained in:
qiubaishen
2026-11-23 17:54:37 +08:00
parent 45979985fe
commit 574b6efa1e
11 changed files with 361 additions and 79 deletions
+5 -4
View File
@@ -6,14 +6,15 @@ export async function requestWebsite(
url,
body,
fallback = '请求失败,请稍后重试',
{ params, signal } = {},
) {
let response;
try {
const options = { skipErrorHandler: true, timeout: 20000 };
const options = { skipErrorHandler: true, timeout: 20000, params, signal };
response =
method === 'get'
? await API.get(url, options)
: await API.post(url, body, options);
method === 'get' || method === 'delete'
? await API[method](url, options)
: await API[method](url, body, options);
} catch (error) {
if (error.response?.status === 401) {
showError(error);