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

dev_hss
cxt 5 years ago
commit 690a92f0b2

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

@ -548,7 +548,7 @@ class ExerciseReviewAndAnswer extends Component{
}
.setRadioStyle .ant-radio,.setRadioStyle .ant-checkbox{
height:16px;
margin-top:4px;
margin-top:5px;
}
.standardAnswer.editormd-html-preview,.answerStyle.editormd-html-preview{
width:100%!important

@ -49,7 +49,7 @@ class single extends Component{
<Radio className="df lineh-25 setRadioStyle" value={item.choice_id}>
<span className="fl mr3 lineh-25">{prefix}</span>
<MarkdownToHtml content={item.choice_text} selector={'single_' + (this.props.index + 1) + (key + 1)}
className="flex1" style={{display:"inline-block", 'margin-top': '-1px'}}
className="flex1" style={{display:"inline-block"}}
></MarkdownToHtml>
</Radio>
</p>

@ -21,11 +21,11 @@ class PollDetailTabThirdInfo extends Component{
<p style={{whiteSpace:"pre-wrap"}} className="color-grey-3 padding20-30">{ pollDetail.poll.polls_description }</p>
}
<p className="padding20-30 clearfix edu-txt-left" style={{background:"#fafafa"}}>
{ pollDetail && pollDetail.question_types.q_counts===0 ? "" :
{ !pollDetail || !pollDetail.question_types || pollDetail.question_types.q_counts===0 ? "" :
<span className="color-grey-3">
{
pollDetail && pollDetail.question_types.q_counts > 0 &&
<span>合计{pollDetail.question_types.q_counts}</span>
pollDetail && pollDetail.question_types && pollDetail.question_types.q_counts > 0 &&
<span>合计{pollDetail.question_types && pollDetail.question_types.q_counts}</span>
}
{
pollDetail && pollDetail.question_types.q_singles > 0 &&
@ -44,7 +44,7 @@ class PollDetailTabThirdInfo extends Component{
</p>
{
pollDetail && pollDetail.questions.map((item,key)=>{
pollDetail && pollDetail.questions && pollDetail.questions.map((item,key)=>{
return(
<div className="previewList">
<p className="pl30 pr30 pt30 pb15 font-16 clearfix">

@ -76,7 +76,7 @@
width: 100%;
}
.squareCard .squareImg img:hover{
transform: scale(1.2);
transform: scale(1.05);
}
/* card info */

@ -70,20 +70,22 @@ class InfosTopics extends Component{
// }else{
//
// }
this.setState({
isSpin:true
})
let types=this.props.match.params.topicstype;
let user_id="";
this.setState({
isSpin:true
})
let types=this.props.match.params.topicstype;
let user_id="";
if(types==="publicly"){
user_id=this.props.current_user&&this.props.current_user.login;
}else{
user_id=this.props.match.params&&this.props.match.params.username;
}
if(types==="publicly"){
user_id=this.props.current_user&&this.props.current_user.login;
}else{
user_id=this.props.match.params&&this.props.match.params.username;
}
if(user_id!=undefined){
console.log(user_id)
if(user_id===undefined){
user_id=this.props.match.params&&this.props.match.params.username;
}
let {per_page}=this.state;
let url=`/users/${user_id}/question_banks.json`;
@ -107,7 +109,7 @@ class InfosTopics extends Component{
isSpin:false
})
});
}
}
searchCategory=(type)=>{

@ -18,7 +18,7 @@ class NewGtaskForms extends Component{
initValue = (data) => {
if (data.isEdit) {
const contentFileList = data.attachments.map(item => {
return {
id: item.id,
@ -47,9 +47,7 @@ class NewGtaskForms extends Component{
});
})
} else { // new
}
}
@ -109,19 +107,19 @@ class NewGtaskForms extends Component{
}
handleSubmit = () => {
debugger
let {contentFileList,min_num,max_num,base_on_project}=this.state;
let {data}=this.props;
let task_type=data.task_type
let topicId=this.props.topicId
this.props.form.validateFieldsAndScroll((err, values) => {
this.props.form.validateFields((err, values) => {
const mdContnet = this.contentMdRef.current.getValue().trim();
values.description = mdContnet;
if (!err) {
if (this.state.isEdit) {
let url="/task_banks/"+topicId+".json";
axios.put(url, {
gtask_bank: {
@ -143,10 +141,6 @@ class NewGtaskForms extends Component{
console.log(error)
})
} else {
}
} else {
$("html").animate({ scrollTop: $('html').scrollTop() - 100 })
}
@ -222,7 +216,7 @@ class NewGtaskForms extends Component{
`
}
</style>
<Form className="courseForm">
<Form className="courseForm" onClick={this.handleSubmit} >
<div className={"ant-row ant-form-item AboutInputForm newAboutInputForm "}>
<div className="ant-col ant-form-item-label margin0">
<label htmlFor="coursesNew_course" className="ant-form-item-required ">类型</label> <span className={"tasktypes"}>{this.props.data&&this.props.data.task_type===1?"":this.props.data&&this.props.data.task_type===2?"":""}</span>
@ -342,7 +336,7 @@ class NewGtaskForms extends Component{
<Form.Item>
<div className="clearfix mt30 mb30">
{/* htmlType="submit" */}
<Button type="primary" onClick={this.handleSubmit} className="defalutSubmitbtn fl mr20">提交</Button>
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">提交</Button>
<a className="defalutCancelbtn fl" onClick={() => this.props.onCancel()}>取消</ a>
</div>
</Form.Item>

Loading…
Cancel
Save