diff --git a/.env.development b/.env.development index 3a55d35..204eaff 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1,2 @@ -VITE_API_HOST1=http://117.72.14.166:3010 +VITE_API_HOST=http://117.72.10.84:3010 VITE_IMG_HOST=http://117.72.14.166:9000 \ No newline at end of file diff --git a/src/components/question-list/index.jsx b/src/components/question-list/index.jsx index 51d2dd7..c720fc9 100644 --- a/src/components/question-list/index.jsx +++ b/src/components/question-list/index.jsx @@ -1,8 +1,9 @@ import React, { Fragment, useState } from "react"; -import { Tag, Table, Input } from "antd"; +import { Tag, Table, Input, Radio, Space, Button, Divider } from "antd"; import { filterDifficulty, gradeObject } from "@constants"; import { useNavigate } from "react-router-dom"; import "./index.less"; + const { Search } = Input; const colors = ['#ffffb8', '#f4ffb8', '#b5f5ec', '#bae0ff', '#d9f7be', '#efdbff', ' #ffd6e7', '#d6e4ff'] @@ -10,12 +11,9 @@ const colors = ['#ffffb8', '#f4ffb8', '#b5f5ec', '#bae0ff', '#d9f7be', '#efdbff' const QuestionList = (props) => { - - const [selectValue, setSelectValue] = useState('难度') + const [difficuty, setDifficuty] = useState(0) const navigate = useNavigate(); - - const RandomNumBoth = (Min, Max) => { //差值 const Range = Max - Min; @@ -24,6 +22,15 @@ const QuestionList = (props) => { return Min + Math.round(Rand * Range); //四舍五入 } + const handleSearch = (close) => { + props.changeDifficuty(difficuty) + close() + } + + const changeDifficuty = (e) => { + setDifficuty(e.target.value) + } + /** * 题目列表 */ @@ -40,8 +47,7 @@ const QuestionList = (props) => { return (