Files
asset-tracker/web/dist/_assets/errors-E9D9vVes.js

2 lines
591 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function a(e,o="请求失败,请稍后重试"){const t=e?.response?.status,n=e?.response?.data?.message;if(n&&typeof n=="string"){const i=e?.response?.data?.request_id;return i?`${n}(请求编号: ${i}`:n}let s=o;t===400?s="请求参数有误,请检查后重试":t===401?s="登录状态已失效,请重新登录":t===403?s="你没有权限执行该操作":t===404?s="请求资源不存在":t>=500&&(s="服务暂时不可用,请稍后重试");const r=e?.response?.data?.request_id||e?.response?.headers?.["x-request-id"];return r?`${s}(请求编号: ${r}`:s}export{a as g};