From 2c590a4bea7852d0f4d1685161d77b9dd9317992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 30 Jul 2019 23:44:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/exercise/Testpapersettinghomepage.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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)