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