Merge branch 'dev_aliyun' into develop

dev_forum
daiao 5 years ago
commit f96a0f747d

@ -32,8 +32,11 @@ class AccountsController < ApplicationController
end
uid_logger("start register: verifi_code is #{verifi_code}, code is #{code}, time is #{Time.now.to_i - verifi_code.try(:created_at).to_i}")
# check_code = (verifi_code.try(:code) == code.strip && (Time.now.to_i - verifi_code.created_at.to_i) <= 10*60)
return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
return normal_status(-2, "验证码已失效") if !verifi_code&.effective?
# todo 上线前请删除万能验证码"513231"
if code != "513231"
return normal_status(-2, "验证码不正确") if verifi_code.try(:code) != code.strip
return normal_status(-2, "验证码已失效") if !verifi_code&.effective?
end
code = generate_identifier User, 8
login = pre + code

@ -233,16 +233,6 @@ class ApplicationController < ActionController::Base
end
# User.current = User.find 81403
if params[:debug] == 'teacher' #todo 为了测试,记得讲debug删除
User.current = User.find 81403
elsif params[:debug] == 'student'
User.current = User.find 8686
elsif params[:debug] == 'admin'
User.current = User.find 1
elsif params[:debug]
User.current = User.find_by_login params[:debug]
end
end
# Sets the logged in user
@ -319,11 +309,13 @@ class ApplicationController < ActionController::Base
# 通关后,把最后一次成功的代码存到数据库
# type 0 创始内容, 1 最新内容
def game_passed_code(path, myshixun, game_id)
# 如果代码窗口是隐藏的,则不用保存代码
return if myshixun.shixun.hide_code
file_content = git_fle_content myshixun.repo_path, path
unless file_content.present?
raise("获取文件代码异常")
end
logger.info("#######game_id:#{game_id}, file_content:#{file_content}")
game_code = GameCode.where(:game_id => game_id, :path => path).first
if game_code.nil?
GameCode.create!(:game_id => game_id, :new_code => file_content, :path => path)

@ -90,10 +90,10 @@ class MyshixunsController < ApplicationController
# params[:pics] = "a.png,b.png,c.png"
def training_task_status
logger.info("##################training_task_status_start#{jsonTestDetails['buildID']}")
ActiveRecord::Base.transaction do
begin
t1 = Time.now
Rails.logger.info("@@@222222#{params[:jsonTestDetails]}")
jsonTestDetails = JSON.parse(params[:jsonTestDetails])
timeCost = JSON.parse(params[:timeCost])
brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present?
@ -130,8 +130,8 @@ class MyshixunsController < ApplicationController
# is_public = test_sets.where(:position => j_test_set['caseId']).first.try(:is_public)
logger.info "actual_output:################################################# #{actual_output}"
ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f
ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f
ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f if j_test_set['testSetTime']
ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f if j_test_set['testSetMem']
Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'],
:actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index,
@ -210,10 +210,10 @@ class MyshixunsController < ApplicationController
end
uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}")
sucess_status
rescue Exception => e
tip_exception(e.message)
uid_logger_error("training_task_status error: #{e}")
raise ActiveRecord::Rollback
# rescue Exception => e
# tip_exception(e.message)
# uid_logger_error("training_task_status error: #{e}")
# raise ActiveRecord::Rollback
end
end
end

@ -171,7 +171,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
#log_reg_content{border-radius: 5px;background: #FFFFff;width: 100%;text-align: center;position: absolute;top: 165px;
left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;margin: 0px 20px;cursor: pointer;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;
/*margin: 0px 20px;*/
cursor: pointer;}
.log_nav li.active{border-bottom: 2px solid #459be5;}
.log-botton{width: 100%;text-align: center;color: #FFFFff!important;display: block;background: #cbcbcb;height: 45px;line-height: 45px;border-radius: 4px;letter-spacing: 2px;cursor: pointer}
.log-botton:hover{color: #FFFFff!important;}

@ -2,7 +2,7 @@ import React from "react";
import axios from 'axios';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage ,SetAppModel} from 'educoder';
import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educoder';
import { notification } from 'antd';
import './index.css'
broadcastChannelOnmessage('refreshPage', () => {
@ -18,10 +18,18 @@ function locationurl(list){
}
// TODO 开发期多个身份切换
const debugType =""
// window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
// window.location.search.indexOf('debug=s') != -1 ? 'student' : 'admin'
// window._debugType = debugType;
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 || ''
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {
// TODO 避免重复的请求 https://github.com/axios/axios#cancellation

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({
type:types,
page:1,
newshixunmodallist:[]
newshixunmodallist:undefined
})
this.funshixunpathlist(Searchvalue,types,true,1)
}
@ -105,7 +105,7 @@ class PathModal extends Component{
SenttotheSearch=(value)=>{
this.setState({
page:1,
newshixunmodallist:[]
newshixunmodallist:undefined
})
let{type}=this.state;
this.funshixunpathlist(value,type,true,1)
@ -267,12 +267,19 @@ class PathModal extends Component{
margin-top:0px !important;
height: 40px;
}
`}
</style>
{ newshixunmodallist&&newshixunmodallist.length===0?"":<div className="over210 pl20 pr20"
{ newshixunmodallist === undefined ? <div className="over210 pl20 pr20" style={{height:"204px"}}></div>:newshixunmodallist&&newshixunmodallist.length===0?<div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}>
style={{height:"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{

@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训
shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[];
if (this.props.singleChoose == true) {
if (list.length > 0) {
@ -330,7 +329,7 @@ debugger
<div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit}
style={{height:"158px"}}>
>
<style>
{
`
@ -355,8 +354,12 @@ debugger
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{
console.log(item)
newshixunmodallist === undefined ? "":newshixunmodallist.length===0?
<div className="alltask edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="/images/educoder/nodata.png" />
<p className="edu-nodata-p mb20">暂时还没有相关数据哦</p></div>
</div>:newshixunmodallist.map((item,key)=>{
return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">

@ -20,7 +20,7 @@ import ShixunAnswer from './question/shixunAnswer'
import update from 'immutability-helper'
import axios from 'axios';
import './new/common.css'
const Textarea =Input.TextArea
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',

@ -222,6 +222,7 @@ class Exercisestatisticalresult extends Component {
)
}):
<Exercisetablesmubu
tableNum={key}
data={item.ques_details}
type={item.ques_type}
effictive_counts={item.effictive_counts}

@ -1,8 +1,14 @@
import React, {Component} from "react";
import {WordsBtn} from 'educoder';
import {WordsBtn, MarkdownToHtml} from 'educoder';
import {Table,Progress} from "antd";
import {Link,Switch,Route,Redirect} from 'react-router-dom';
const tagArray = [
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Exercisetablesmubus extends Component {
constructor(props) {
@ -19,12 +25,17 @@ class Exercisetablesmubus extends Component {
render() {
let {data,type,effictive_counts,choicetype}=this.props;
let {data,type,effictive_counts,choicetype, tableNum}=this.props;
let datas=[];
data&&data.forEach((item,key)=>{
datas.push({
commit_percent:{num:item.choice_position,value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,type:item.choice_right_boolean},
commit_percent:{
num:item.choice_position,
value:type===4||type===5?choicetype[item.choice_text-1]:item.choice_text,
type:item.choice_right_boolean,
_type: type
},
min_score:{value:item.choice_users_count,type:item.choice_right_boolean},
max_score:item.choice_percent,
})
@ -40,13 +51,23 @@ class Exercisetablesmubus extends Component {
title: '选项',
dataIndex: 'commit_percent',
key: 'commit_percent',
render: (text, record) => (
<span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong"?text.value:false}
{text.value==="wrong"?"填写了错误答案":false}
{text.value==="有效填写量"?"有效填写量":false}
</span>
),
render: (text, record, index) => {
const _content = <span style={{color:text.type===true? "#29BD8B":'#333333'}}>
{text.value!="有效填写量"&&text.value!="wrong" &&
<MarkdownToHtml content={text.value} selector={(tableNum+1) + '' + (index+1)}></MarkdownToHtml>
}
{text.value==="wrong" && "填写了错误答案" }
{text.value==="有效填写量" && "有效填写量" }
</span>
return (
(text._type === 0 || text._type === 1) ? <div style={{ display: 'flex'}}>
{<span style={{ 'margin-right': '4px', 'margin-top': '-2px'}}>{tagArray[index]}.</span>}
{_content}
</div> : <React.Fragment>{_content}</React.Fragment>
)
},
}, {
title: '小计',
dataIndex: 'min_score',

@ -93,9 +93,9 @@ class SingleDisplay extends Component{
<div className="options">
{ question_choices.map((item, optionIndex) => {
let prefix = undefined
if (!isPreviewPage) {
// if (!isPreviewPage) {
prefix = `${tagArray[optionIndex]}.`
}
// }
if (question_type == 0) { // 单选
return (
<div className="mb10 clearfix" key={optionIndex}>

@ -34,3 +34,7 @@
.singleDisplay .options .markdown-body {
max-width: 1116px;
}
.singleDisplay .ant-radio-wrapper span:last-child
, .singleDisplay .ant-checkbox-wrapper span:last-child {
padding-right: 0px;
}

@ -4,9 +4,9 @@ import {markdownToHTML} from 'educoder'
import axios from 'axios'
const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class Multiple extends Component{
constructor(props){
@ -41,14 +41,17 @@ class Multiple extends Component{
let isStudent =this.props.isStudent();
console.log(questionType);
return(
<div className="pl30 pr30">
<div className="pl30 pr30 singleDisplay">
<Checkbox.Group disabled={ user_exercise_status == 1 ? true : false } onChange={this.saveId} defaultValue={questionType.user_answer}>
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return(
<p className="clearfix mb15 df">
<Checkbox className="fl lineh-20 " value={item.choice_id}></Checkbox>
<span class="fl lineh-20 mt1"></span><span style={{display:"inline-block"}} className="markdown-body mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
<Checkbox className="fl lineh-20 " value={item.choice_id}>{prefix}</Checkbox>
{/* <span class="fl lineh-20 mt1"></span> */}
<span style={{display:"inline-block"}} className="markdown-body " dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p>
)
})

@ -4,9 +4,9 @@ import {Checkbox,Radio, Input} from "antd";
import {markdownToHTML} from 'educoder'
import axios from 'axios'
const tagArray = [
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
// 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
// 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
class single extends Component{
constructor(props){
@ -36,14 +36,16 @@ class single extends Component{
let isStudent =this.props.isStudent();
return(
<div className="pl30 pr30">
<div className="pl30 pr30 singleDisplay">
<Radio.Group disabled={ user_exercise_status == 1 ? true : false } defaultValue={questionType.user_answer[0]} onChange={this.changeItem}>
{
questionType.question_choices && questionType.question_choices.map((item,key)=>{
let prefix = `${tagArray[key]}.`
return(
<p className={parseInt(questionType.question_type) == 0 ? "clearfix mb15 df" : "fl mr40"}>
<Radio className="fl lineh-20" value={item.choice_id}></Radio>
<span className="fl lineh-20 mr3 mt1"></span><span style={{display:"inline-block"}} className="markdown-body fl mt1" dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
<Radio className="fl lineh-20" value={item.choice_id}>{prefix}</Radio>
{/* <span className="fl lineh-20 mr3 "></span> */}
<span style={{display:"inline-block", 'margin-top': '-1px'}} className="markdown-body fl " dangerouslySetInnerHTML={{__html: markdownToHTML(item.choice_text)}}></span>
</p>
)
})

@ -117,7 +117,6 @@ class GraduationTasksSubmitnew extends Component{
}
// 附件相关 START
handleChange = (info) => {
debugger
if (info.file.status === 'uploading') {
let fileList = info.fileList;
this.setState({ fileList:appendFileSizeToUploadFileAll(fileList) });

@ -80,7 +80,6 @@ class GraduateTopicDetailTable extends Component{
}
sureAgreeTopic=(count)=>{
if(count > 0){
debugger
let{tableData}=this.props;
let{operationId,classesId}=this.state
let courseId=this.props.match.params.course_id;
@ -118,7 +117,6 @@ class GraduateTopicDetailTable extends Component{
//切换分班
changeClasses=(value)=>{
debugger
this.setState({
classesId:value
})

@ -1,5 +1,6 @@
import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios';
import "../css/Courses.css";
import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -7,6 +8,7 @@ import moment from 'moment';
import Modals from '../../modals/Modals';
const { Option } = Select;
@ -134,7 +136,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state
// console.log(is_public)
if (coursesId != undefined) {
// 编辑
@ -180,7 +181,7 @@ class CoursesNew extends Component {
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
end_date: datatime,
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
@ -234,7 +235,7 @@ class CoursesNew extends Component {
name: values.classroom,
class_period: values.period,
credit: parseFloat(values.credit),
end_date: datatime,
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification,
@ -285,12 +286,13 @@ class CoursesNew extends Component {
// console.log(e.target.checked);
}
Searchvalue=(value)=>{
let url="/courses/search_course_list.json";
axios.post(url,{
search:value
}).then((result)=>{
// console.log(result.data)
if (result.data.message===undefined) {
if (result.data.status===0) {
this.setState({
searchlist: result.data.course_lists,
// course:value,
@ -305,14 +307,19 @@ class CoursesNew extends Component {
})
}
handleSearch=(value)=>{
this.props.form.setFieldsValue({
classroom:value,
course:value
});
this.Searchvalue(value)
if(value!=""){
this.props.form.setFieldsValue({
classroom:value,
course:value
});
this.Searchvalue(value)
}
};
handleChange=(value)=>{
this.props.form.setFieldsValue({
course:value,
classroom:value
@ -321,13 +328,24 @@ class CoursesNew extends Component {
handleSearchschool=(value)=>{
this.props.form.setFieldsValue({
school:value,
fetching:true,
});
this.Searchvalue(value)
if(value!="") {
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
this.getschool(value)
}
};
handleChangeschools=(value)=>{
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
}
handleChangeschool=(value)=>{
this.setState({
@ -339,35 +357,56 @@ class CoursesNew extends Component {
};
getschool=(value)=>{
let url="/schools/school_list.json";
axios.get(url,{
params: {
search: value
}
}).then((result)=>{
if (result.data.message===undefined) {
if (result.data.status===0) {
this.setState({
searchlistscholl: result.data.school_names,
scholl: value
school: value
})
this.props.form.setFieldsValue({
scholl: value
school: value
})
}
}).catch((error)=>{
console.log(error)
})
}
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
render() {
let {datatime} = this.state;
let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
const options = this.state.searchlist && this.state.searchlist.map(d => <Option key={d.name} value={d.name}>{d.name}</Option>);
const optionschool = this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
const optionschool = this.state.searchlistscholl&&this.state.searchlistscholl.map(z => <Option key={z} value={z}>{z}</Option>);
// console.log(this.props.current_user.user_school)
// form合并了
// console.log(optionschool)
return (
<React.Fragment>
<div>
<style>
{
`
.color-green-light {
color: #45E660!important;
}
`
}
</style>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...propsWithoutForm}></ApplyForAddOrgModal>
{/*提示*/}
<Modals
modalsType={this.state.Modalstype}
@ -412,31 +451,9 @@ class CoursesNew extends Component {
}
`}
</style>
<div className="stud-class-set bor-bottom-greyE padding10200">
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', {
rules: [{required: true, message: "不能为空"}],
})(
<Select
showSearch
className={"fl construction mr10 "}
placeholder="请输入并选择课本堂的所属单位"
// value={this.state.school}
onSearch={this.handleSearchschool}
// notFoundContent={this.state.fetching ? <Spin size="small" /> : null}
onChange={this.handleChangeschool}
onFocus={()=>this.getschool("")}
allowClear={true}
>
{optionschool}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>
<div id='isschool'></div>
</Form.Item>
</div>
{/*<div className="stud-class-set bor-bottom-greyE padding10200">*/}
{/*</div>*/}
<div className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}>
@ -456,7 +473,6 @@ class CoursesNew extends Component {
>
{options}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
@ -606,7 +622,7 @@ class CoursesNew extends Component {
</Form.Item>
</span>
</div>
<div className="stud-class-set padding10200 coursenavbox">
<div className="stud-class-set padding10200 coursenavbox bor-bottom-greyE">
<Form.Item
label="公开设置"
hasFeedback
@ -620,9 +636,45 @@ class CoursesNew extends Component {
<span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span>
</Form.Item>
</div>
<div className="stud-class-set padding10200 coursenavbox mb20">
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', {
rules: [{required: true, message: "不能为空"}],
})(
<Select
showSearch
className={"fl construction mr10 "}
placeholder="请输入并选择课本堂的所属单位"
// value={this.state.school}
onSearch={this.handleSearchschool}
// notFoundContent={this.state.fetching ? <Spin size="small" /> : null}
onChange={this.handleChangeschools}
allowClear={true}
>
{optionschool}
</Select>
)}
<span className={"newcoursestitle fl"}>
{/*(输入内容出现匹配的下拉菜单←同账号管理的单位信息填写)*/}
</span>
<div id='isschool'></div>
</Form.Item>
{searchlistscholl.length===0?<div style={{height:"20px",lineHeight:"20px"}} className="ml20">
<span>
<span style={{color: '#CDCDCD'}}>未找到包含{school}的高校</span>
<span style={{color: '#4CACFF', cursor: 'pointer'}} onClick={this.showApplyForAddOrgModal}>申请新增</span>
</span>
</div>:""}
</div>
<div className={"FAFAFA"}>
<Form.Item wrapperCol={{span: 12, offset: 5}}>
<div className="clearfix mt80 mb30">
<Form.Item >
<div className="clearfix mt40 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交
</Button>

@ -2074,7 +2074,6 @@ class PollNew extends Component {
//最小值
HandleGradationGroupChangee = (value, index, max, length) => {
debugger
var minbool = false;
var maxbool = false;
let arr = this.state.adddom;

@ -993,7 +993,7 @@ class Listofworksstudentone extends Component {
}
axios.post(urll, datasysl).then((result) => {
console.log("980000000____________________");
debugger
if(result === undefined){
return
}

@ -337,6 +337,7 @@ class LoginDialog extends Component {
}
loginEDU=()=>{
let {loginValue,passValue,regular,isGoingValue}=this.state;
if(regular===1){
return
@ -372,14 +373,16 @@ class LoginDialog extends Component {
this.setState({
isRender:false
})
this.props.Modifyloginvalue();
window.location.reload();
}
}
try {
this.props.Modifyloginvalue();
}catch (e) {
}
// try {
// this.props.Modifyloginvalue();
// }catch (e) {
//
// }
}).catch((error) => {
console.log("356");
console.log(error)
@ -408,6 +411,7 @@ class LoginDialog extends Component {
<Dialog open={true} id="DialogID"
style={{ display: isRender==false? 'none' : ''}}
disableEscapeKeyDown={true}
disableBackdropClick={true}
onClose={() => this.handleDialogClose()}
>
{isRender===true?
@ -474,7 +478,7 @@ class LoginDialog extends Component {
登录
</div>
<p className="clearfix mt10">
<p className="clearfix mt20">
<span className="fl">
<input type="checkbox"

@ -376,7 +376,7 @@ class Trialapplication extends Component {
// console.log(this.props);
return (
<div>
<div style={{ariaHidden:"true",dataBackdrop:"static"}}>
{
isRenders === false ? "" :

@ -394,7 +394,7 @@ class Trialapplicationysl extends Component {
// console.log(this.props);
return (
<div>
<div style={{ariaHidden:"true",dataBackdrop:"static"}}>
{
isRenders === false ? "" :

@ -298,7 +298,6 @@ class DetailCardsEditAndAdd extends Component{
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
debugger
this.setState({
hometypepvisible:true
})

@ -139,21 +139,20 @@ class PathDetailIndex extends Component{
let pathid=this.props.match.params.pathId;
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status == 407 || result.data.status == 401) {
if (result.data.status === 407 || result.data.status === 401) {
return;
}
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
items: getItems(result.data.members.length),
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
if (result.data.status === 403) {
return;
}
if(result.data.allow_visit===true){
this.setState({
detailInfoList:result.data,
items: getItems(result.data.members.length),
})
}
}).catch((error)=>{
console.log(error);
@ -168,6 +167,9 @@ class PathDetailIndex extends Component{
if (result.data.status == 407 || result.data.status == 401) {
return;
}
if (result.data.status === 403 ) {
return;
}
if(result.data.allow_visit===true){
this.setState({
@ -175,13 +177,8 @@ class PathDetailIndex extends Component{
items: getItems(result.data.members.length),
user_id:undefined,
})
}else{
window.location.href = "/403";
// this.setState({
// Modalstype:true,
// Modalstopval:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
}).catch((error)=>{
console.log(error);
})

@ -487,7 +487,6 @@ submittojoinclass=(value)=>{
}
showSearchOpen=(e)=>{
debugger
this.setState({
showSearchOpentype:true
})
@ -495,7 +494,6 @@ submittojoinclass=(value)=>{
}
hideshowSearchOpen=(e)=>{
debugger
let {setevaluatinghides}=this.state;
if(setevaluatinghides===true){
this.setState({
@ -520,7 +518,6 @@ submittojoinclass=(value)=>{
}
setevaluatinghides=()=>{
debugger
this.setState(
{
setevaluatinghides:true
@ -602,7 +599,6 @@ submittojoinclass=(value)=>{
// rolearr:["",""],
// console.log("618");
// console.log(user_phone_binded);
console.log(showSearchOpentype)
return (
<div className="newHeader" id="nHeader" >

@ -136,7 +136,7 @@ body>.-task-title {
margin-right: 20px;
}
.HeaderSearch .ant-input-search .ant-input{
height:30px;
/*height:30px;*/
background: #373e3f !important;
border: 1px solid #373e3f !important;

File diff suppressed because it is too large Load Diff

@ -51,7 +51,7 @@ export default class TpmQuestionMain extends Component {
<span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20">
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500}
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval}></TPMMDEditor>
watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval} height={700}></TPMMDEditor>
</div>
<div>
<span

@ -71,7 +71,23 @@ class InterestpageComponent extends Component {
}if(response.data.repertoires[i].id===9){
qdkfys=rgzn;
}
var datas={id:response.data.repertoires[i].id,name:response.data.repertoires[i].name,bool:false,url:qdkfys};
if(response.data.repertoires[i].id===1) {
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: true,
url: qdkfys
};
} else{
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: false,
url: qdkfys
};
}
gouxuans4.push(datas);
this.setState({
gouxuans4:gouxuans4,
@ -166,7 +182,7 @@ class InterestpageComponent extends Component {
//兴趣页面点击
Interestcompletionpage(){
if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业");
this.openNotification("请选择职业");
return
}
@ -177,7 +193,7 @@ class InterestpageComponent extends Component {
}
}
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -188,11 +204,11 @@ class InterestpageComponent extends Component {
if (response !== undefined) {
// this.Jumptotheinterestpage();
// window.location.href = "/"
if(response.data.message!==undefined){
if(response.data.status===0){
return;
this.setMyEduCoderModals()
}
this.setMyEduCoderModals()
}
@ -258,15 +274,15 @@ class InterestpageComponent extends Component {
<div className="ysldivhome1" >
<div className="ysldivhomediv" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("teacher")}>{gouxuans ==="teacher"? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimgsy" ><img src={skzbdx} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy" ><img onClick={()=>this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("student")}>{gouxuans==="student"? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimgsy"><img src={mytc} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy"><img onClick={()=>this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher("professional")}>{gouxuans==="professional"?<img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimgsy"><img src={zyrs1} className="ysldivhomedivimg"/></div>
<div className="ysldivhomedivimgsy"><img onClick={()=>this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg"/></div>
</div>
</div>
<p className="yslspans2">选择你可能感兴趣的内容</p>

@ -71,7 +71,23 @@ class InterestpageMax extends Component {
}if(response.data.repertoires[i].id===9){
qdkfys=rgzn;
}
var datas={id:response.data.repertoires[i].id,name:response.data.repertoires[i].name,bool:false,url:qdkfys};
if(response.data.repertoires[i].id===1) {
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: true,
url: qdkfys
};
} else{
var datas = {
id: response.data.repertoires[i].id,
name: response.data.repertoires[i].name,
bool: false,
url: qdkfys
};
}
gouxuans4.push(datas);
this.setState({
gouxuans4:gouxuans4,
@ -166,8 +182,12 @@ class InterestpageMax extends Component {
//兴趣页面点击
Interestcompletionpage(){
this.setState({
setpagecomplet:true
})
if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业");
this.openNotification("请选择职业");
return
}
@ -178,7 +198,7 @@ class InterestpageMax extends Component {
}
}
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -189,12 +209,9 @@ class InterestpageMax extends Component {
if (response !== undefined) {
// this.Jumptotheinterestpage();
// window.location.href = "/"
if(response.data.message!==undefined){
return;
if(response.data.status===0){
this.setMyEduCoderModals()
}
this.setMyEduCoderModals()
}
@ -260,15 +277,15 @@ class InterestpageMax extends Component {
<div className="ysldivhome12" >
<div className="ysldivhomediv222" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("teacher")}>{gouxuans ==="teacher"? <img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimg2" ><img src={skzbdx} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2" ><img onClick={()=>this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg2"/></div>
</div>
<div className="ysldivhomediv222" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("student")}>{gouxuans==="student"? <img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimg2"><img src={mytc} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2"><img onClick={()=>this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg2"/></div>
</div>
<div className="ysldivhomediv222" >
<div className="ysldivhomedivtxt2" onClick={()=>this.Clickteacher("professional")}>{gouxuans==="professional"?<img src={gouxuan} className="gouxuanimg2"/>:<img className="gouxuanimg2" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimg2"><img src={zyrs1} className="ysldivhomedivimg2"/></div>
<div className="ysldivhomedivimg2"><img onClick={()=>this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg2"/></div>
</div>
</div>
<div><span className="yslspans22">选择你可能感兴趣的内容</span></div>
@ -285,7 +302,7 @@ class InterestpageMax extends Component {
)
})}
</div>
<Button className="yslbutton2" size={"large"} type="primary"onClick={()=>this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成</Button>
<Button className="yslbutton2" size={"large"} type="primary"onClick={this.state.setpagecomplet===true?"":()=>this.Interestcompletionpage()} style={{width:"255px",height: "35px",background: "#4CACFF",marginTop: "17px"} }>完成</Button>
</div>
</div>

@ -70,7 +70,7 @@
margin-right: 129px;
}
.ysldivhome2{
width: 100%;
width: 800px;
display: flex;
flex-flow: row wrap;
align-content:stretch;

@ -71,6 +71,7 @@
margin-top: 10px;
}
.ysldivhome22{
width: 800px;
display: flex;
flex-flow: row wrap;
align-content:stretch;

@ -173,7 +173,9 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
#log_reg_content{border-radius: 5px;background: #FFFFff;width: 100%;text-align: center;position: absolute;top: 165px;
left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;margin: 0px 20px;cursor: pointer;}
.log_nav li{float: left;text-align: center;font-size: 16px;padding-bottom:15px;
/*margin: 0px 20px;*/
cursor: pointer;}
.log_nav li.active{border-bottom: 2px solid #459be5;}
.log-botton{width: 100%;text-align: center;color: #FFFFff!important;display: block;background: #cbcbcb;height: 45px;line-height: 45px;border-radius: 4px;letter-spacing: 2px;cursor: pointer}
.log-botton:hover{color: #FFFFff!important;}

Loading…
Cancel
Save