修改企查查使用真实的接口
This commit is contained in:
@@ -145,7 +145,7 @@ const MOCK_DISHONESTY_NO_RECORDS = {
|
||||
};
|
||||
|
||||
/** 是否使用 Mock 数据 */
|
||||
const USE_MOCK = true;
|
||||
const USE_MOCK = false;
|
||||
|
||||
// ==================== API 方法 ====================
|
||||
|
||||
|
||||
@@ -313,8 +313,9 @@ export function CorporateInfoModal({
|
||||
color: '#ffffff',
|
||||
cursor: refreshing || businessLoading || dishonestyLoading ? 'not-allowed' : 'pointer',
|
||||
transition: 'all 0.2s',
|
||||
display: 'flex',
|
||||
display: 'inline-flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
gap: '6px',
|
||||
opacity: refreshing || businessLoading || dishonestyLoading ? 0.6 : 1,
|
||||
}}
|
||||
@@ -329,8 +330,15 @@ export function CorporateInfoModal({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<i className={refreshing ? 'ri-loader-4-line' : 'ri-refresh-line'} style={{ fontSize: '14px' }}></i>
|
||||
{refreshing ? '查询中...' : '对接企查查重新查询'}
|
||||
<i
|
||||
className={refreshing ? 'ri-loader-4-line' : 'ri-refresh-line'}
|
||||
style={{
|
||||
fontSize: '14px',
|
||||
position: 'relative',
|
||||
top: '1px',
|
||||
}}
|
||||
></i>
|
||||
<span>{refreshing ? '查询中...' : '对接企查查重新查询'}</span>
|
||||
</button>
|
||||
|
||||
{/* 关闭按钮 */}
|
||||
|
||||
@@ -69,7 +69,7 @@ export async function loader({ request }: { request: Request }) {
|
||||
} catch (error) {
|
||||
console.error('加载评查点分组失败:', error);
|
||||
return Response.json({
|
||||
error: error,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
groups: [],
|
||||
totalCount: 0,
|
||||
page: 1,
|
||||
@@ -98,8 +98,12 @@ export default function RuleGroupsIndex() {
|
||||
const canBatchOperation = canBatch('evaluation_group'); // ✅ 批量操作权限
|
||||
|
||||
useEffect(() => {
|
||||
if(error){
|
||||
toastService.error(error.message);
|
||||
if (error) {
|
||||
let errorMsg = typeof error === 'string' ? error : (error.msg || error.message || '加载评查点分组失败');
|
||||
if(errorMsg.includes('Permission denied')){
|
||||
errorMsg = '您没有权限访问该页面';
|
||||
}
|
||||
toastService.error(errorMsg);
|
||||
}
|
||||
}, [error]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user