From a387a61d02dce9d06d05edeaf63a40d64a04152f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4=E6=B5=AE=E5=B0=98?=
<18510549872@163.comm>
Date: Wed, 11 Oct 2023 01:08:08 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E5=88=B7=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.tsx | 39 +-
src/components/category-list/index.jsx | 4 +-
.../good-collection-error/constant.js | 9 +
.../good-collection-error/index.jsx | 262 ++++++++++++++
.../good-collection-error/index.less | 42 +++
src/components/question-list/index.jsx | 159 ++++----
src/components/top-menu/index.jsx | 23 +-
src/main.tsx | 29 +-
src/router/index.ts | 26 +-
src/utils/request.ts | 4 +-
src/views/brush-questions/constant.ts | 9 +
src/views/brush-questions/index.less | 160 ++++++++
src/views/brush-questions/index.tsx | 191 ++++++++++
src/views/brush-questions/mock.js | 18 +
.../components/ranking-box/index.jsx | 3 +
.../{constant.js => constant.ts} | 12 +-
src/views/question-bank/index.tsx | 342 ++++++++++--------
vite.config.ts | 10 +-
18 files changed, 1045 insertions(+), 297 deletions(-)
create mode 100644 src/components/good-collection-error/constant.js
create mode 100644 src/components/good-collection-error/index.jsx
create mode 100644 src/components/good-collection-error/index.less
create mode 100644 src/views/brush-questions/constant.ts
create mode 100644 src/views/brush-questions/index.less
create mode 100644 src/views/brush-questions/index.tsx
create mode 100644 src/views/brush-questions/mock.js
rename src/views/question-bank/{constant.js => constant.ts} (91%)
diff --git a/src/App.tsx b/src/App.tsx
index 5c410cc..291c456 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,11 +1,8 @@
import React, { Component } from 'react';
import './App.less';
-import { Routes, Route, Link } from "react-router-dom"
-import req from '@utils/request.ts';
+import { Outlet } from "react-router-dom"
import PubSub from 'pubsub-js';
import { Input } from 'antd';
-import QuestionBank from './views/question-bank';
-import UploadQuestions from './views/upload-questions';
import Logo from '@views/imgs/logo.jpg'
import Head from '@views/imgs/head.jpg'
import TopMenu from '@components/top-menu'
@@ -25,22 +22,7 @@ class NavTop extends Component {
timerRef = React.createRef();
componentDidMount() {
- // req({
- // method: 'post',
- // url: 'admin/interview/peo/getDirectorInfo',
- // }).then((re) => {
- // this.setState(
- // {
- // userName: re.data?.name ?? '',
- // intervieweEamil: re.data?.email ?? '',
- // headImg: '',
- // },
- // () => {
- // window.localStorage.setItem('interviewerName', re.data?.name ?? 'XXX');
- // window.localStorage.setItem('intervieweEamil', re.data?.email ?? 'XXX');
- // }
- // );
- // });
+
PubSub.subscribe('handleToRender', () => {
this.setState({});
});
@@ -88,25 +70,12 @@ class NavTop extends Component {
);
}
}
-class RouteExample extends Component {
- render() {
- return (
- <>
-