Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

competitions
cxt 5 years ago
commit 10d3cdaef7

@ -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()

@ -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;
}
`}</style>
@ -294,7 +305,7 @@ class UseBank extends Component{
return (
<p className="clearfix mb7" key={item.id}>
<Checkbox className="fl" value={item.id} key={item.id}></Checkbox>
<span className={nav_my === 'myself' ? "fl with58" : "fl with65"}>
<span className={nav_my === 'myself' ? "fl with58" : "fl with63"}>
<label className="task-hide fl" title={item.name && item.name.length > 30 ? item.name:""} style={{"maxWidth":"100%"}}>{item.name}</label>
</span>
<span title={item.course_list_name && item.course_list_name.length > 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" ?
<a style={{textAlign: "center"}} key={item.id} className="color-blue font-14 pl5"
href={`/banks/normal/${item.id}/edit/personal?tab=0`}
onClick={() => this.getotiku(`/banks/normal/${item.id}/edit/personal?tab=0`)}
>编辑</a>
: this.props.object_type && this.props.object_type === "group" ?
<a style={{textAlign: "center"}} key={item.id} className="color-blue font-14 pl5"
href={`/banks/group/${item.id}/edit/publicly?tab=0`}
onClick={() => this.getotiku(`/banks/group/${item.id}/edit/publicly?tab=0`)}
>编辑</a>
: this.props.object_type && this.props.object_type === "exercise" ?
<a style={{textAlign: "center"}} key={item.id} className="color-blue font-14 pl5"
href={`/banks/exercise/${item.id}/edit/personal`}
onClick={() => this.getotiku(`/banks/exercise/${item.id}/edit/personal`)}
>编辑</a>
: this.props.object_type && this.props.object_type === "poll" ?
<a style={{textAlign: "center"}} key={item.id} className="color-blue font-14 pl5"
href={`/banks/poll/${item.id}/edit/personal`}
onClick={() => this.getotiku(`/banks/poll/${item.id}/edit/personal`)}
>编辑</a>
: "")
: ""
}
</p>
)
})}

Loading…
Cancel
Save