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

dev_hs
jingquan huang 5 years ago
commit aba7ce2f19

@ -29,7 +29,6 @@ module GitCommon
def file_content
@content = git_fle_content @repo_path, @path
Rails.logger.info("##############_____@content.present?___________########################{@content.present?}")
end
# 版本库提交记录

@ -34,7 +34,8 @@ module GitHelper
rescue Exception => e
Rails.logger.error(e.message)
raise Educoder::TipException.new("文档内容获取异常")
Rails.logger.error("#####__________文档内容获取异常")
# raise Educoder::TipException.new("文档内容获取异常")
end
end

@ -9,6 +9,7 @@ json.start_date @course.start_date
json.end_date @course.end_date
json.is_public @course.is_public
json.course_module_types @course.course_modules.where(hidden: 0).pluck(:module_type)
json.course_module_names @course.course_modules.where(hidden: 0).pluck(:module_name)
json.authentication @course.authentication
json.professional_certification @course.professional_certification
json.subject_id @course.subject_id

@ -32,6 +32,7 @@ json.shixun_detail do
if game.try(:lastest_code).blank?
cha_path = challenge_path(shixun_challenge.challenge&.path)
latest_code = git_fle_content(game.myshixun.repo_path,cha_path)
Rails.logger.info("#######_______latest_code______##########################{latest_code.present?}")
else
latest_code = game.try(:lastest_code)
end

@ -19,8 +19,8 @@ import Trialapplicationysl from './modules/login/Trialapplicationysl';
import Trialapplicationreview from './modules/user/Trialapplicationreview';
import Addcourses from "./modules/courses/coursesPublic/Addcourses";
import AccountProfile from "./modules/user/AccountProfile";
import Trialapplication from './modules/login/Trialapplication'
import Trialapplication from './modules/login/Trialapplication';
import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import NotFoundPage from './NotFoundPage'
import Loading from './Loading'
@ -247,12 +247,24 @@ const Messagerouting= Loadable({
class App extends Component {
constructor(props) {
super(props)
// this.state = {
// isRenders:false,
// }
this.state = {
mydisplay:false
}
}
HideAddcoursestypess=(i)=>{
console.log("调用了");
this.setState({
Addcoursestypes:false,
mydisplay:true,
occupation:i,
})
};
ModalCancelsy=()=>{
this.setState({
mydisplay:false,
})
};
componentDidMount() {
// force an update if the URL changes
history.listen(() => {
@ -304,8 +316,8 @@ class App extends Component {
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
<Addcourses {...this.props} {...this.state}/>
<AccountProfile {...this.props} {...this.state}/>
{/*<Certifiedprofessional {...this.props} {...this.state}/>*/}
<AccountProfile {...this.props} {...this.state} HideAddcoursestypess={(i)=>this.HideAddcoursestypess(i)}/>
<Certifiedprofessional {...this.props} {...this.state} ModalCancelsy={this.ModalCancelsy}/>
<Router>
<Switch>

@ -66,12 +66,12 @@ class Goldsubject extends Component {
const { datatime } = this.state;
var datatimes="";
if(datatime!==undefined){
datatimes=datatime;
datatimes=moment(datatimes, dateFormat).subtract(0, 'days');;
}else {
datatimes=datatime;
}
// if(datatime!==undefined){
// datatimes=datatime;
datatimes=moment(datatime, dateFormat);
// }else {
// datatimes=datatime;
// }
if (!startValue || !datatimes) {
return false;
}
@ -84,12 +84,12 @@ class Goldsubject extends Component {
// console.log(moment(new Date(), dateFormat).add(2, 'days'));
const { datatimetwo } = this.state;
var startvalue="";
if(datatimetwo!==undefined){
startvalue=datatimetwo;
startvalue=moment(startvalue, dateFormat).add(1, 'days');
}else {
startvalue=datatimetwo;
}
// if(datatimetwo!==undefined){
// startvalue=datatimetwo;
startvalue=moment(datatimetwo, dateFormat);
// }else {
// startvalue=datatimetwo;
// }
// console.log("结束时间");
// console.log(endValue);
// console.log(startvalue);
@ -359,9 +359,12 @@ class Goldsubject extends Component {
});
} else {
debugger
this.props.form.validateFields((err, values) => {
console.log("错误信息信息信息2");
console.log(err);
console.log("xingxixingxi");
if (err) {
return;
}
@ -384,17 +387,22 @@ class Goldsubject extends Component {
// console.log('Received values of form: ', values);
let subjectid = this.props.match.params.subjectid;
let url = "/courses.json";
axios.post(url, {
subject_id:subjectid, //这是带过来的值
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
start_date:values.starttime,
end_date: values.endtime,
is_public: is_public, //这是也是带过来的值
course_module_types: values.checkboxgroup,
school:values.school
}
var ysldatas={
subject_id:subjectid, //这是带过来的值
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
start_date:values.starttime,
end_date: values.endtime,
is_public: is_public, //这是也是带过来的值
course_module_types: values.checkboxgroup,
school:values.school
};
console.log("提交的ysldatas数据");
console.log(ysldatas);
console.log(JSON.stringify(ysldatas));
axios.post(url,
ysldatas
).then((response) => {
if (response.status === 200) {
// this.goback

Loading…
Cancel
Save