diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index 076f6a759..24e960a9d 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Checkbox,Input,Table, Pagination,Menu} from "antd"; import {Link,NavLink} from 'react-router-dom'; -import { WordsBtn ,ActionBtn} from 'educoder'; +import { WordsBtn ,ActionBtn,queryString} from 'educoder'; import CoursesListType from '../coursesPublic/CoursesListType'; import '../css/members.css'; import '../css/busyWork.css'; @@ -170,12 +170,7 @@ class Testpapersettinghomepage extends Component{ } console.log("170"); console.log(params); - axios.get(url,{ - params, - paramsSerializer: function(params) { - return qs.stringify(params, {arrayFormat: 'brackets'}) - } - }).then((response) => { + axios.get(url+`?${queryString.stringify(params)}`).then((response) => { if(response===undefined){ return } @@ -198,7 +193,7 @@ class Testpapersettinghomepage extends Component{ } }else { this.props.showNotification(`正在下载中`); - window.open("/api"+url, '_blank'); + window.open("/api"+url+`?${queryString.stringify(params)}`, '_blank'); } }).catch((error) => { console.log(error)