fix(worker): 修复寄卖页分片加载失败导致的白屏
- 新增全局/页面级错误边界,页面渲染异常不再整页白屏 - 监听 vite:preloadError,部署后旧分片加载失败自动刷新一次 - 修复长会话 setTimeout 2^31 溢出导致立即登出 - 寄卖页资料接口失败给出重试态,不再误报未开通
This commit is contained in:
@@ -846,6 +846,31 @@ export default function WorkerConsignmentPage() {
|
||||
<div style={{ padding: '48px 16px', textAlign: 'center' }}>
|
||||
<Spin />
|
||||
</div>
|
||||
) : profileQuery.isError ? (
|
||||
// 资料接口失败(历史上生产出现过 15s 语句超时)不能误显示成「未开通寄卖」,
|
||||
// 这里给出明确错误和重试入口,避免用户以为是自己没有权限。
|
||||
<div style={{ padding: '36px 16px', textAlign: 'center' }}>
|
||||
<Empty
|
||||
image={Empty.PRESENTED_IMAGE_SIMPLE}
|
||||
description={
|
||||
<div style={{ maxWidth: 420, margin: '0 auto' }}>
|
||||
<Typography.Title level={5} style={{ marginBottom: 8 }}>
|
||||
寄卖资料加载失败
|
||||
</Typography.Title>
|
||||
<Typography.Paragraph type="secondary" style={{ fontSize: 13, marginBottom: 20 }}>
|
||||
网络波动或服务繁忙时可能出现,请点击下方按钮重试;多次失败请联系客服。
|
||||
</Typography.Paragraph>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={profileQuery.isFetching}
|
||||
onClick={() => void profileQuery.refetch()}
|
||||
>
|
||||
重新加载
|
||||
</Button>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
) : !canConsign ? (
|
||||
<div style={{ padding: '36px 16px', textAlign: 'center' }}>
|
||||
<Empty
|
||||
|
||||
Reference in New Issue
Block a user