fix: 1. 全局axios添加formData文件上传的检测,删除Content-Type让axios自动检测。
2. 完善入口模块管理的接口的对接。 3. 完善角色权限管理的接口对接和测试。 4. 完善主页的入口模块的图标的显示和图片的显示。
This commit is contained in:
+13
-9
@@ -5,6 +5,7 @@ import styles from "~/styles/pages/home.css?url";
|
||||
import dayjs from 'dayjs';
|
||||
import { getUserSession, logout } from "~/api/login/auth.server";
|
||||
import { toastService } from '~/components/ui';
|
||||
import { DOCUMENT_URL } from '~/config/api-config';
|
||||
|
||||
export const links = () => [
|
||||
{ rel: "stylesheet", href: styles }
|
||||
@@ -227,14 +228,17 @@ export default function Index() {
|
||||
// 获取模块图标(根据模块 path 或 id)
|
||||
const getModuleIcon = (module: typeof loaderData.entryModules[0]) => {
|
||||
// 根据 path 判断图标
|
||||
if (module.path?.includes('ht')) {
|
||||
return '/images/icon_hetong.png';
|
||||
} else if (module.path?.includes('aj')) {
|
||||
return '/images/icon_anjuan.png';
|
||||
} else if (module.path?.includes('nw')) {
|
||||
return '/images/icon_assistant.png';
|
||||
}
|
||||
// if (module.path?.includes('ht')) {
|
||||
// return '/images/icon_hetong.png';
|
||||
// } else if (module.path?.includes('aj')) {
|
||||
// return '/images/icon_anjuan.png';
|
||||
// } else if (module.path?.includes('nw')) {
|
||||
// return '/images/icon_assistant.png';
|
||||
// }
|
||||
// 默认图标
|
||||
if (module.path){
|
||||
return `${DOCUMENT_URL}${module.path}`
|
||||
}
|
||||
return '/images/icon_assistant.png';
|
||||
};
|
||||
|
||||
@@ -388,7 +392,7 @@ export default function Index() {
|
||||
aria-label="交叉评查"
|
||||
>
|
||||
<img
|
||||
src="/images/icon_cross_checking.png"
|
||||
src="/images/icon_assistant.png"
|
||||
alt="交叉评查"
|
||||
className="w-12 h-12 mx-1"
|
||||
onError={(e) => {
|
||||
@@ -418,7 +422,7 @@ export default function Index() {
|
||||
aria-label={module.name}
|
||||
>
|
||||
<img
|
||||
src={getModuleIcon(module)}
|
||||
src={isLLMModule ? '/images/icon_assistant.png' : getModuleIcon(module)}
|
||||
alt={module.name}
|
||||
className="w-12 h-12 mx-1"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user