|
@@ -11,12 +11,35 @@ export const ExamRoadVideo: React.FC = (props: any) => {
|
|
|
city: "3501"
|
|
|
})
|
|
|
const [province, setProvince] = useState({
|
|
|
- cityName: "province",
|
|
|
- city: "35"
|
|
|
+ provinceName: "province",
|
|
|
+ province: "35"
|
|
|
})
|
|
|
- const [examList, setExamList] = useState([])
|
|
|
+ const [examList, setExamList] = useState<{
|
|
|
+ "id": number,
|
|
|
+ "name": string,
|
|
|
+ "image": string,
|
|
|
+ "provinceId": string,
|
|
|
+ "province": string,
|
|
|
+ "cityId": string,
|
|
|
+ "city": string,
|
|
|
+ "countyId":string,
|
|
|
+ "county":string,
|
|
|
+ "price": number,
|
|
|
+ "videoCount": number,
|
|
|
+ "expirationTime": null,
|
|
|
+ "isVip": 0,
|
|
|
+ "sign": null
|
|
|
+ }[]>([])
|
|
|
useEffect(() => {
|
|
|
api.studentExamInfoIp().then(res => {
|
|
|
+ setCity({
|
|
|
+ cityName:res.data.cityName,
|
|
|
+ city:res.data.city
|
|
|
+ })
|
|
|
+ setProvince({
|
|
|
+ province:res.data.province,
|
|
|
+ provinceName:res.data.provinceName
|
|
|
+ })
|
|
|
console.log(res)
|
|
|
})
|
|
|
api.studentExamInfoList({}).then(res => {
|
|
@@ -32,7 +55,7 @@ export const ExamRoadVideo: React.FC = (props: any) => {
|
|
|
<div className="rect">
|
|
|
<div className="search">
|
|
|
<SearchOutline className="icon1" color="#8A9099" fontSize={18} />
|
|
|
- <input placeholder="输入系列课标题" className="bar" type="search"></input>
|
|
|
+ <input placeholder="输入系列课标题" className="bar" type="search"></input>
|
|
|
</div>
|
|
|
<div
|
|
|
className="select"
|
|
@@ -80,14 +103,15 @@ export const ExamRoadVideo: React.FC = (props: any) => {
|
|
|
/> */}
|
|
|
{examList.map(item => {
|
|
|
return (<div
|
|
|
+ key={item.id}
|
|
|
className="list-item"
|
|
|
|
|
|
>
|
|
|
<img src={item.image} className="list-item-image">
|
|
|
</img>
|
|
|
<div
|
|
|
- className="list-item-textbody"
|
|
|
-
|
|
|
+ className="list-item-textbody"
|
|
|
+
|
|
|
>
|
|
|
<div className="list-item-text1">{item.name}</div>
|
|
|
<div className="list-item-text2">共{item.videoCount}节</div>
|