diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 3c150c90c..9cf68503d 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -// if (isDev) { -// const _search = window.location.search; -// let parsed = {}; -// if (_search) { -// parsed = queryString.parse(_search); -// } -// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : -// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -// } +if (isDev) { + const _search = window.location.search; + let parsed = {}; + if (_search) { + parsed = queryString.parse(_search); + } + debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : + window.location.search.indexOf('debug=s') != -1 ? 'student' : + window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +} window._debugType = debugType; export function initAxiosInterceptors(props) { initOnlineOfflineListener() diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 01f35dace..de9193fd9 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -178,7 +178,13 @@ class UseBank extends Component{ }) }); - } + }; + + getotiku = (url) => { + window.open(url, '_blank'); + } + + render(){ let { flag, nav_my, loading, hasMore, object_list, search, checkBoxValues,isChecked,page,is_teacher }=this.state @@ -217,6 +223,11 @@ class UseBank extends Component{ width:58% !important; Margin-left:15px } + .with63{ + width: 63% !important; + box-sizing: border-box; + margin-left: 15px; + } `} @@ -294,7 +305,7 @@ class UseBank extends Component{ return (

- + 10 && item.course_list_name} @@ -308,25 +319,23 @@ class UseBank extends Component{ {nav_my === "myself" ? (this.props.object_type && this.props.object_type === "normal" ? this.getotiku(`/banks/normal/${item.id}/edit/personal?tab=0`)} >编辑 : this.props.object_type && this.props.object_type === "group" ? this.getotiku(`/banks/group/${item.id}/edit/publicly?tab=0`)} >编辑 : this.props.object_type && this.props.object_type === "exercise" ? this.getotiku(`/banks/exercise/${item.id}/edit/personal`)} >编辑 : this.props.object_type && this.props.object_type === "poll" ? this.getotiku(`/banks/poll/${item.id}/edit/personal`)} >编辑 : "") : "" } - -

) })}