所有设备按店铺营业时段访问台账

This commit is contained in:
summer committed 2026-12-04 22:33:09 +08:00
1 parent 67b145c4b8
commit 76db0e0277
10 files changed
+223 -22

No files matched your search

+4
View File
@@ -112,6 +112,10 @@ async function api(url,data,operation,retryContext){
const binary=r.ok&&retryContext?.responseType==='xlsx';
if(binary&&r.headers.get('content-type')?.split(';')[0]!=='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')throw Object.assign(new Error('导出文件格式异常,请重新导出。'),{confirmed:true,status:r.status});
let result;try{result=binary?{blob:await r.blob(),contentDisposition:r.headers.get('content-disposition')}:await r.json();}catch(error){if(r.ok){error.retryable=true;throw error;}result=null;}
if(!r.ok&&result?.code==='BUSINESS_HOURS'){
document.documentElement.style.visibility='hidden';
location.replace('/');
}
if(!r.ok){const confirmed=!!result&&typeof result.error==='string';throw Object.assign(new Error(confirmed?result.error:'请求被拒绝('+r.status+'),服务器未返回可确认的业务结果。'),{confirmed,status:r.status,...(result?.code?{code:result.code}:{})});}
if(!active())throw Object.assign(accountChangedError(),{completed:true});
return result;