From 6c5660484b54408677737660f4323edee985d77c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 29 Aug 2019 11:58:18 +0800 Subject: [PATCH] b --- .../src/modules/courses/members/studentsList.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 371d4e74e..79a29de1e 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -8,7 +8,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent' import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import ColorCountText from '../common/titleSearch/ColorCountText' -import { WordsBtn, trigger, on, off } from 'educoder' +import { WordsBtn, trigger, on, off ,downloadFile} from 'educoder' import Modals from "../../modals/Modals"; import axios from 'axios' import _ from 'lodash' @@ -152,7 +152,16 @@ class studentsList extends Component{ } }else { this.props.showNotification(`正在下载中`); - window.open("/api"+url, '_blank'); + // window.open("/api"+url, '_blank'); + downloadFile({ + url: url, + successCallback: (url) => { + console.log('successCallback') + }, + failCallback: (responseHtml, url) => { + console.log('failCallback') + } + }) } }).catch((error) => { console.log(error)