dev_forum
杨树明 5 years ago
parent 1aec807d6b
commit 5bfb41ad37

@ -408,7 +408,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===2?"新建分班":"添加目录",
Navtitles:id===2?"分班名称":"目录名称",
Navplaceholder:id===2?"示例分班最佳4个字符":"示例第一阶段最佳4个字符",
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
@ -419,7 +419,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===5?"分班重命名":"目录重命名",
Navtitles:id===5?"分班名称":"目录名称",
Navplaceholder:id===5?"示例分班最佳4个字符":"示例第一阶段最佳4个字符",
Navplaceholder:"请输入名称最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,

@ -34,7 +34,7 @@ class AddcoursesNav extends Component{
{this.props.addnametab===2?
<div>
<div className={"fl mt5"}>目录名称</div>
<Input placeholder="示例:第一阶段"
<Input placeholder="请输入名称最大限制60个字符"
className={"inputNav greyInput fl mb40"}
maxLength="60"
style={{width:'450px'}}

@ -44,7 +44,7 @@ class ModalsRename extends Component{
className={"Navmodal"}
>
<div className={"fl mt5"}>{this.props.Navname}名称</div>
<Input placeholder={"示例:第一阶段"}
<Input placeholder={"请输入名称最大限制60个字符"}
className={"inputNav greyInput fl"}
maxLength="60"
style={{width:'450px'}}

@ -36,13 +36,19 @@ class Index extends Component{
<div>
<Switch {...this.props}>
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
<Route path="/paths/new" exact
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/:pathId/edit" exact
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>
<Route path="/paths/:pathId" exact
render={(props)=>(<PathsDetail {...this.props} {...this.state} {...props}/>)}
></Route>
{/*<Route path="/paths/:pathId" exact component = {PathsDetail} {...this.props} {...this.state}></Route>*/}
<Route exact path="/paths" exact component={ShixunPaths} {...this.props} {...this.state}></Route>
</Switch>
</div>

@ -314,6 +314,7 @@ class DetailCards extends Component{
showparagraphindex
}=this.state;
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
return(
<div>
<Modals
@ -363,6 +364,19 @@ class DetailCards extends Component{
</div>
</Spin>
</Modal>
<style>
{
`
.lessonvalue{
max-width: 556px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}
`
}
</style>
<div className="lesson-saved-list">
{
pathCardsList && pathCardsList.map((item,key)=>{
@ -374,7 +388,7 @@ class DetailCards extends Component{
<a className="fl ring-blue mr10 mt2">
<img src={getImageUrl("images/educoder/icon/charpter-white.svg")} className="fl ml3 mt3"/>
</a>
<span className="font-18 font-bd">{item.stage_name}</span>
<span className="font-18 font-bd lessonvalue" title={item.stage_name}>{item.stage_name}</span>
{
idsum===key&&pathCardsedittype===true?'':
@ -442,13 +456,13 @@ class DetailCards extends Component{
:<i className="iconfont icon-bofang progressRing-part font-18 mt10"></i>
}
</span>
<span className={line.shixun_status==="暂未公开"?"paragraph_name color204":"paragraph_name color-grey3"}>
<span className={this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?"paragraph_name color204":"paragraph_name color-grey3"}>
<span className="subject_stage_shixun_index">{key+1}</span>-{index+1}&nbsp;&nbsp;{line.shixun_name}
</span>
</li>
{
line.shixun_status==="暂未公开"?
this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?
<li className="fr status_li"><span className="fr color204">暂未公开</span></li>
:
<li className={showparagraph===false?"none":"fr status_li"}>

@ -402,7 +402,7 @@ class DetailCardsEditAndAdd extends Component{
<div className="df mb30">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<input maxLength="60" type="text" style={{width:'670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_names} onInput={this.updatastage_names} placeholder={"请输入第"+this.props.sum+"阶段名称"}/>
<input maxLength="60" type="text" style={{width:'670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_names} onInput={this.updatastage_names} placeholder={"请输入第"+this.props.sum+"阶段名称,最大限制60个字符"}/>
<div className={stage_nametype===true?"red":'none'}>名称不能为空</div>
</div>
<div style={{"width":"60px"}}><span className="color-orange fl mt8 none" id="stage_name_notice"><i className="iconfont icon-tishi font-14 mr3"></i></span></div>

@ -435,7 +435,7 @@ class DetailCardsEditAndEdit extends Component{
<div className="df mb30">
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<input type="text" style={{width: '670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_name} onInput={this.updatastage_name} placeholder={"请输入第"+(this.props.keys+1)+"阶段名称"}/>
<input maxLength="60" type="text" style={{width: '670px'}} className={stage_nametype===false?"input-100-45 greyInput":"input-100-45 greyInput bor-red"} name="stage_name" value={stage_name} onInput={this.updatastage_name} placeholder={"请输入第"+(this.props.keys+1)+"阶段名称,最大限制60个字符"}/>
<div className={stage_nametype===true?"red":'none'}>名称不能为空</div>
</div>
<div style={{"width":"60px"}}><span className="color-orange fl mt8 none" id="stage_name_notice"><i className="iconfont icon-tishi font-14 mr3"></i></span></div>

@ -140,10 +140,13 @@ class PathDetailIndex extends Component{
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status === 407 || result.data.status === 401) {
debugger
return;
}
if (result.data.status === 403) {
debugger
window.location.href = "/403";
return;
}
@ -165,9 +168,12 @@ class PathDetailIndex extends Component{
axios.get(url).then((result)=>{
// TODO 403 让后台返回status 403 比较好
if (result.data.status == 407 || result.data.status == 401) {
debugger
return;
}
if (result.data.status === 403 ) {
debugger
window.location.href = "/403";
return;
}

Loading…
Cancel
Save