diff --git a/Dockerfile b/Dockerfile index c753c6f..4fbcc3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY build /usr/share/nginx/html COPY deploy/entrypoint.sh /entrypoint.sh COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf -ENV BACKEND_ADDRESS="http://localhost:31000" +ENV BACKEND_ADDRESS="http://43.138.83.20:10001" ENV BACKEND_TIMEOUT=10000 RUN chmod +x /entrypoint.sh diff --git a/README.md b/README.md index 58beeac..5be0f46 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. +Open [http://43.138.83.20:3000](http://43.138.83.20:3000) to view it in your browser. The page will reload when you make changes.\ You may also see any lint errors in the console. diff --git a/public/runtime-config.js b/public/runtime-config.js index d8c457b..3ab824d 100644 --- a/public/runtime-config.js +++ b/public/runtime-config.js @@ -1,2 +1,2 @@ -window.BACKEND_ADDRESS = "http://localhost:31000"; +window.BACKEND_ADDRESS = "http://localhost:8080"; window.BACKEND_TIMEOUT = 10000; \ No newline at end of file diff --git a/src/http/AuthorizeAxios.js b/src/http/AuthorizeAxios.js index 00b69f6..e8f467b 100644 --- a/src/http/AuthorizeAxios.js +++ b/src/http/AuthorizeAxios.js @@ -2,8 +2,8 @@ import axios from 'axios'; import baseWebConfig from "../config/BaseWebConfig"; const authorizeAxios = axios.create({ - baseURL: window.BACKEND_ADDRESS || baseWebConfig.baseUrl, - timeout: window.BACKEND_TIMEOUT || baseWebConfig.timeout, + baseURL: baseWebConfig.baseUrl, + timeout: baseWebConfig.timeout, }); // 传入messageApi diff --git a/src/http/CreatMessageCommonAxios.js b/src/http/CreatMessageCommonAxios.js index c19b9e4..29ab009 100644 --- a/src/http/CreatMessageCommonAxios.js +++ b/src/http/CreatMessageCommonAxios.js @@ -3,8 +3,8 @@ import baseWebConfig from "../config/BaseWebConfig"; const creatMessageCommonAxios = (messageApi) => { const instance = axios.create({ - baseURL: window.BACKEND_ADDRESS || baseWebConfig.baseUrl, - timeout: window.BACKEND_TIMEOUT || baseWebConfig.timeout, + baseURL: baseWebConfig.baseUrl, + timeout: baseWebConfig.timeout, }); const defaultResponse = { diff --git a/src/menu.zip b/src/menu.zip new file mode 100644 index 0000000..7ec5acf Binary files /dev/null and b/src/menu.zip differ diff --git a/src/menu/DashboardMenuItems.js b/src/menu/DashboardMenuItems.js index 100ee05..7ca3ff0 100644 --- a/src/menu/DashboardMenuItems.js +++ b/src/menu/DashboardMenuItems.js @@ -6,7 +6,9 @@ import { MonitorOutlined, ReconciliationOutlined, UsergroupAddOutlined, - UserSwitchOutlined + UserSwitchOutlined, + NotificationOutlined, + SettingOutlined } from "@ant-design/icons"; import React from "react"; import {NavLink} from "react-router-dom"; @@ -44,21 +46,21 @@ const DashboardMenuItems = [ icon: , label: 用户管理 }, - // { - // key: `announcement-management`, - // icon: , - // label: `公告管理`, - // }, { key: `/data-maintenance`, icon: , label: 数据维护 }, - // { - // key: `settings`, - // icon: , - // label: 系统设置 - // } + { + key: `/generate-certificate`, + icon: , + label: 证书生成 + }, + { + key: `settings`, + icon: , + label: 系统设置 + } ] }, { diff --git a/src/page/Authentication/Login/index.jsx b/src/page/Authentication/Login/index.jsx index 8f27e56..2cee0e3 100644 --- a/src/page/Authentication/Login/index.jsx +++ b/src/page/Authentication/Login/index.jsx @@ -89,7 +89,7 @@ function Login(props) {
} size={"large"} style={{marginBottom: '20px'}} @@ -116,9 +116,9 @@ function Login(props) {
Powered by ©2023 - - {new Date().getFullYear()} SimRobot Studio - SimRobot Studio - 来自哈尔滨师范大学计算机科学与信息工程学院软件工程系 + - {new Date().getFullYear()}来自哈师大教务处 + +
diff --git a/src/page/Dashboard/DataCheck.zip b/src/page/Dashboard/DataCheck.zip new file mode 100644 index 0000000..a2a84c9 Binary files /dev/null and b/src/page/Dashboard/DataCheck.zip differ diff --git a/src/page/Dashboard/DataPrint/RecordCard/CardAction.js b/src/page/Dashboard/DataPrint/RecordCard/CardAction.js index c591039..4e98c76 100644 --- a/src/page/Dashboard/DataPrint/RecordCard/CardAction.js +++ b/src/page/Dashboard/DataPrint/RecordCard/CardAction.js @@ -9,7 +9,7 @@ const CardAction = (record, messageApi, navigator) => { const commonAxios = creatMessageCommonAxios(messageApi); const downloadRecord = (recordId) => { - let baseUrl = window.BACKEND_ADDRESS || baseWebConfig.baseUrl + let baseUrl = baseWebConfig.baseUrl commonAxios.get(`${baseUrl}/api/v1/workload/certificate/download/${recordId}`, {responseType: 'blob'}).then((response) => { if (response.data.type === 'application/json') { messageApi.error('证明已失效 (GENERATE_CERTIFICATE_ERROR_007)'); diff --git a/src/page/Dashboard/UserManagement/AddUserDrawer.jsx b/src/page/Dashboard/UserManagement/AddUserDrawer.jsx index db8e59b..23ff7ed 100644 --- a/src/page/Dashboard/UserManagement/AddUserDrawer.jsx +++ b/src/page/Dashboard/UserManagement/AddUserDrawer.jsx @@ -13,7 +13,7 @@ const AddUserDrawer = props => { }; const fileUploadProps = { name: 'file', - action: window.BACKEND_ADDRESS || baseWebConfig.baseUrl + '/api/v1/teacher/import', + action: baseWebConfig.baseUrl + '/api/v1/teacher/import', headers: { authorization: `Bearer ${localStorage.getItem('token') || ''}`, }, diff --git a/src/routes/DashboardRoutes.js b/src/routes/DashboardRoutes.js index 93b7443..bd4245f 100644 --- a/src/routes/DashboardRoutes.js +++ b/src/routes/DashboardRoutes.js @@ -34,10 +34,12 @@ const DashboardRoutes = { path: 'data-maintenance', element: }, + //未找到 { path: 'system-settings', element: }, + //未找到 { path: 'generate-certificate', element: @@ -46,10 +48,10 @@ const DashboardRoutes = { path: 'user-management', element: }, - { - path: 'about-us', - element: - }, + //{ + // path: 'about-us', + // element: + //}, ] }