dev_forum
杨树明 5 years ago
parent ac2a798c76
commit a6142f8cd1

@ -955,7 +955,7 @@ class Fileslists extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>

@ -772,7 +772,7 @@ class GraduationTasks extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>

@ -229,7 +229,7 @@ class TraineetraininginformationModal extends Component {
<div style={{"clear": "both"}}>
<div className="fl edu-back-white ml10 ">
<img alt="头像" className="radius mt10" height="70" id="nh_user_logo" name="avatar_image"
src={this.props.viewtrainingdata === undefined ? "" : "https://www.educoder.net/images/" + `${this.props.viewtrainingdata.image_url}`}
src={this.props.viewtrainingdata === undefined ? "" : "/images/" + `${this.props.viewtrainingdata.image_url}`}
width="70"/>
</div>
<div className="fl edu-back-white ml20 mt15">

@ -1202,7 +1202,7 @@ class ShixunHomework extends Component{
}
>
<div className="edu-tab-con-box clearfix edu-txt-center"><img className="edu-nodata-img mb20"
src="https://www.educoder.net/images/educoder/nodata.png" />
src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂无数据哦~</p></div>
</div>
</Spin>

@ -49,7 +49,7 @@ function get_login_verification_code(btn) {
type = 7;
}
$.get(
'https://www.educoder.net/account/get_verification_code',
'/account/get_verification_code',
{ value: $('#pass_name_input').val().trim(),
type: type},
function (data) {

@ -38,7 +38,7 @@ class LeftNav extends Component {
<div className="user-info">
<a href="/users/p69243850" alt="用户头像" className="user-info-img">
<img alt="0?1442652658" height="50" src="https://www.educoder.net/images/avatars/User/0?1442652658" width="50"/>
<img alt="0?1442652658" height="50" src="/images/avatars/User/0?1442652658" width="50"/>
</a>
<a href="/users/p69243850" className="user-info-name">Jimmy</a>
</div>

@ -1,207 +1,207 @@
import React,{ Component } from "react";
import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col } from "antd";
import axios from 'axios';
import { SnackbarHOC } from 'educoder';
import Modals from '../../modals/Modals';
const Option = Select.Option;
const CheckboxGroup = Checkbox.Group;
class sendPanel extends Component{
constructor(props){
super(props);
this.state={
sentShixunPath:false,
sendToCourseList:undefined,
openSearch:false,
sendToCourseId:undefined,
sendToShixunArray:[],
shixunNum:0,
Modalstype:false,
cardsModalcancel:this.cardsModalcancel,
cardsModalsave:this.cardsModalsave,
modalsTopval:'',
Modalsbottomval:'',
courseurl:''
}
}
//发送至
SentToLesson =() =>{
this.setState({
sentShixunPath:true
})
}
//隐藏发送至弹框
hideSenttothevalue =()=>{
this.setState({
sentShixunPath:false
})
}
//打开课堂列表下拉框
openList=()=>{
this.setState({
openSearch:true
})
}
//关闭课堂列表下拉框
closeList=()=>{
this.setState({
openSearch:false
})
}
// 选择课堂获取选中的Id
selectCloseList=(e)=>{
this.setState({
openSearch:false,
sendToCourseId:e
})
}
//选择checkbox
changeCheckBoxs=(list)=>{
this.setState({
sendToShixunArray:list,
shixunNum:list.length
})
}
//确认提交
submitInfo=()=>{
let {sendToCourseId,sendToShixunArray}=this.state;
if(sendToCourseId===undefined){
this.props.showSnackbar("您还未选择发送的课堂");
}else if(parseInt(sendToShixunArray.length)==0){
this.props.showSnackbar("您还未选择实训");
}else{
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/send_to_course.json";
axios.post(url,{
shixun_ids:sendToShixunArray,
course_id:sendToCourseId
}).then((result)=>{
if(result.data.status===1){
this.setState({
Modalstype:true,
sentShixunPath:false,
Modalstopval:result.data.message,
courseurl:result.data.url
})
}
}).catch((error)=>{
console.log(error);
})
}
}
componentDidMount(){
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
sendToCourseList:result.data
})
}
}).catch((error)=>{
console.log(error);
})
}
cardsModalcancel=()=>{
this.setState({
Modalstype:false,
})
}
cardsModalsave=()=>{
let {courseurl}=this.state;
window.location.href = "https://www.educoder.net/"+courseurl;
}
render(){
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
return(
<div>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel}
modalSave={cardsModalsave}
>
</Modals>
{
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title="以实训作业的形式发送到我的课堂">
<a onClick = {this.SentToLesson} className="user_default_btn edu-greenline-btn fr font-18 mr20">
发送至
</a>
</Tooltip>:''
}
<Modal
keyboard={false}
title="发送至课堂"
visible={sentShixunPath}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox">
<div className="mb20" onMouseLeave={this.closeList}>
<Select
placeholder="请选择您要发送的课堂"
style={{"width":"100%"}}
onSelect={this.selectCloseList}
onMouseEnter={this.openList}
defaultOpen={false}
open={openSearch}
optionLabelProp="name"
>
{
sendToCourseList === undefined ? "": sendToCourseList.courses.map((item,key)=>{
return(
<Option key={item.course_id} id={key} name={item.course_name}>
<Row>
<Col className="fl with70 task-hide">{item.course_name}</Col>
<Col className="fl color-grey-9 with30 edu-txt-center">{item.created_at}</Col>
</Row>
</Option>
)
})
}
</Select>
</div>
<div className="edu-back-skyblue pl15 pr15 clearfix over280 pt5">
<CheckboxGroup onChange={this.changeCheckBoxs}>
{
sendToCourseList && sendToCourseList.stages.map((item,key)=>{
return(
item.shixuns.map((items,keys)=>{
return(
<div className="mt5" key={keys}>
<Checkbox name={key} value={items.shixun_id}>{items.shixun_name}</Checkbox>
</div>
)
})
)
})
}
</CheckboxGroup>
</div>
<p className="color-grey-9 pl15 font-12 mt10">已选择 {shixunNum} 个实训</p>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideSenttothevalue} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.submitInfo}>确定</a>
</div>
</div>
</Modal>
</div>
)
}
}
import React,{ Component } from "react";
import { Modal,Radio,Input,Tooltip,Checkbox,Select, Row,Col } from "antd";
import axios from 'axios';
import { SnackbarHOC } from 'educoder';
import Modals from '../../modals/Modals';
const Option = Select.Option;
const CheckboxGroup = Checkbox.Group;
class sendPanel extends Component{
constructor(props){
super(props);
this.state={
sentShixunPath:false,
sendToCourseList:undefined,
openSearch:false,
sendToCourseId:undefined,
sendToShixunArray:[],
shixunNum:0,
Modalstype:false,
cardsModalcancel:this.cardsModalcancel,
cardsModalsave:this.cardsModalsave,
modalsTopval:'',
Modalsbottomval:'',
courseurl:''
}
}
//发送至
SentToLesson =() =>{
this.setState({
sentShixunPath:true
})
}
//隐藏发送至弹框
hideSenttothevalue =()=>{
this.setState({
sentShixunPath:false
})
}
//打开课堂列表下拉框
openList=()=>{
this.setState({
openSearch:true
})
}
//关闭课堂列表下拉框
closeList=()=>{
this.setState({
openSearch:false
})
}
// 选择课堂获取选中的Id
selectCloseList=(e)=>{
this.setState({
openSearch:false,
sendToCourseId:e
})
}
//选择checkbox
changeCheckBoxs=(list)=>{
this.setState({
sendToShixunArray:list,
shixunNum:list.length
})
}
//确认提交
submitInfo=()=>{
let {sendToCourseId,sendToShixunArray}=this.state;
if(sendToCourseId===undefined){
this.props.showSnackbar("您还未选择发送的课堂");
}else if(parseInt(sendToShixunArray.length)==0){
this.props.showSnackbar("您还未选择实训");
}else{
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/send_to_course.json";
axios.post(url,{
shixun_ids:sendToShixunArray,
course_id:sendToCourseId
}).then((result)=>{
if(result.data.status===1){
this.setState({
Modalstype:true,
sentShixunPath:false,
Modalstopval:result.data.message,
courseurl:result.data.url
})
}
}).catch((error)=>{
console.log(error);
})
}
}
componentDidMount(){
let id=this.props.detailInfoList.id;
let url="/paths/"+id+"/choose_course.json";
axios.get(url).then((result)=>{
if(result.status==200){
this.setState({
sendToCourseList:result.data
})
}
}).catch((error)=>{
console.log(error);
})
}
cardsModalcancel=()=>{
this.setState({
Modalstype:false,
})
}
cardsModalsave=()=>{
let {courseurl}=this.state;
window.location.href =courseurl;
}
render(){
let{sentShixunPath,sendToCourseList,openSearch,shixunNum,Modalstype,Modalstopval,Modalsbottomval,cardsModalcancel,cardsModalsave}= this.state;
return(
<div>
<Modals
modalsType={Modalstype}
modalsTopval={Modalstopval}
modalsBottomval={Modalsbottomval}
modalCancel={cardsModalcancel}
modalSave={cardsModalsave}
>
</Modals>
{
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_statistics===true?
<Tooltip placement="bottom" title="以实训作业的形式发送到我的课堂">
<a onClick = {this.SentToLesson} className="user_default_btn edu-greenline-btn fr font-18 mr20">
发送至
</a>
</Tooltip>:''
}
<Modal
keyboard={false}
title="发送至课堂"
visible={sentShixunPath}
closable={false}
footer={null}
destroyOnClose={true}
>
<div className="newupload_conbox">
<div className="mb20" onMouseLeave={this.closeList}>
<Select
placeholder="请选择您要发送的课堂"
style={{"width":"100%"}}
onSelect={this.selectCloseList}
onMouseEnter={this.openList}
defaultOpen={false}
open={openSearch}
optionLabelProp="name"
>
{
sendToCourseList === undefined ? "": sendToCourseList.courses.map((item,key)=>{
return(
<Option key={item.course_id} id={key} name={item.course_name}>
<Row>
<Col className="fl with70 task-hide">{item.course_name}</Col>
<Col className="fl color-grey-9 with30 edu-txt-center">{item.created_at}</Col>
</Row>
</Option>
)
})
}
</Select>
</div>
<div className="edu-back-skyblue pl15 pr15 clearfix over280 pt5">
<CheckboxGroup onChange={this.changeCheckBoxs}>
{
sendToCourseList && sendToCourseList.stages.map((item,key)=>{
return(
item.shixuns.map((items,keys)=>{
return(
<div className="mt5" key={keys}>
<Checkbox name={key} value={items.shixun_id}>{items.shixun_name}</Checkbox>
</div>
)
})
)
})
}
</CheckboxGroup>
</div>
<p className="color-grey-9 pl15 font-12 mt10">已选择 {shixunNum} 个实训</p>
<div className="mt20 clearfix edu-txt-center">
<a onClick={this.hideSenttothevalue} className="pop_close task-btn mr30">取消</a>
<a className="task-btn task-btn-orange" onClick={this.submitInfo}>确定</a>
</div>
</div>
</Modal>
</div>
)
}
}
export default SnackbarHOC()(sendPanel);

@ -317,11 +317,11 @@ class NewHeader extends Component {
})
if(submitapplicationssum===0){
if(submitapplicationsvaluedata!=undefined){
window.location.href = "https://www.educoder.net/courses/"+submitapplicationsvaluedata;
window.location.href = "/courses/"+submitapplicationsvaluedata;
}
}else if(submitapplicationssum===1){
if(submitapplicationsvaluedata!=undefined){
window.location.href = "https://www.educoder.net/projects/"+submitapplicationsvaluedata;
window.location.href = "/projects/"+submitapplicationsvaluedata;
}
}
}
@ -480,7 +480,7 @@ submittojoinclass=(value)=>{
}
if(value===0){
let url="https://www.educoder.net/courses/join_course_multi_role.json"
let url="/courses/join_course_multi_role.json"
const form = new FormData();
form.append('invite_code', tojoinclasstitle);
form.append('role', pamst);
@ -526,7 +526,7 @@ submittojoinclass=(value)=>{
}
if(value===1){
let url="https://www.educoder.net/applied_project/applied_project_info.json"
let url="/applied_project/applied_project_info.json"
const form = new FormData();
form.append('invite_code', tojoinclasstitle);
form.append('member', RadioGroupvalue);

@ -45,7 +45,7 @@ function _initSider() {
return;
}
var $tool = $(this).attr("tooltips");
$descSide.html($tool+"<div><img src='https://www.educoder.net/images/edu_user/jt.png'></div>");
$descSide.html($tool+"<div><img src='/images/edu_user/jt.png'></div>");
$descSide.data('_dom', this)
$descSide.show().css({
left:$(this).offset().left - $descSide.width()-30,

@ -865,7 +865,7 @@ class Newshixuns extends Component {
<div className="mb10 edu-back-white">
<p className="padding10-20 bor-bottom-greyE color-grey-3 clearfix">
<span className="fl font-18 lineh-35">创建实训</span>
<a className="fr font-16 mt3 color-blue" href="https://www.educoder.net/forums/2943"
<a className="fr font-16 mt3 color-blue" href="/forums/2943"
target="_blank">实训制作指南</a>
</p>

@ -80,7 +80,7 @@ class Repository extends Component {
<input id="rev" name="rev" size="8" type="hidden" value=""></input>
</form> */}
<a href="https://www.educoder.net/forums/2784" target="_blank"
<a href="/forums/2784" target="_blank"
className=" guideBtn" >Git使用指南</a>
<div className="fr font-12 color-grey-9 pr">

Loading…
Cancel
Save