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

dev_forum
hjm 5 years ago
commit c9801f9259

@ -32,8 +32,11 @@ class AccountsController < ApplicationController
end 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}") 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) # 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 # todo 上线前请删除万能验证码"513231"
return normal_status(-2, "验证码已失效") if !verifi_code&.effective? 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 code = generate_identifier User, 8
login = pre + code login = pre + code

@ -2,8 +2,8 @@ class AddDepartmentAppliesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth
def create def create
CreateAddDepartmentApplyService.call(current_user, create_params) department = CreateAddDepartmentApplyService.call(current_user, create_params)
render_ok render_ok(id: department.id)
rescue CreateAddDepartmentApplyService::Error => ex rescue CreateAddDepartmentApplyService::Error => ex
render_error(ex.message) render_error(ex.message)
end end

@ -2,8 +2,8 @@ class AddSchoolAppliesController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth
def create def create
CreateAddSchoolApplyService.call(current_user, create_params) school = CreateAddSchoolApplyService.call(current_user, create_params)
render_ok render_ok(id: school.id)
rescue CreateAddSchoolApplyService::Error => ex rescue CreateAddSchoolApplyService::Error => ex
render_error(ex.message) render_error(ex.message)
end end

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
# #
# 文件上传 # 文件上传
class AttachmentsController < ApplicationController class AttachmentsController < ApplicationController
before_action :require_login, :check_auth before_action :require_login, :check_auth, except: [:show]
before_action :find_file, only: %i[show destroy] before_action :find_file, only: %i[show destroy]
include ApplicationHelper include ApplicationHelper
@ -10,6 +10,8 @@ class AttachmentsController < ApplicationController
def show def show
# 1. 优先跳到cdn # 1. 优先跳到cdn
# 2. 如果没有cdnsend_file # 2. 如果没有cdnsend_file
candown = attachment_candown @file
tip_exception("您没有权限下载该附件") if !candown
if @file.cloud_url.present? if @file.cloud_url.present?
update_downloads(@file) update_downloads(@file)
redirect_to @file.cloud_url and return redirect_to @file.cloud_url and return
@ -157,4 +159,33 @@ class AttachmentsController < ApplicationController
end end
edu_setting('public_cdn_host') + "/" + path edu_setting('public_cdn_host') + "/" + path
end end
def attachment_candown attachment
return true if current_user.admin? || current_user.business?
candown = false
if attachment.container && current_user.logged?
# 课堂资源、作业、毕设相关资源的权限判断
if attachment.container.is_a?(Course)
course = attachment.container
candown = current_user.member_of_course?(course) || attachment.is_public == 1
elsif attachment.container.is_a?(HomeworkCommon) || attachment.container.is_a?(GraduationTask) || attachment.container.is_a?(GraduationTopic)
course = attachment.container&.course
elsif attachment.container.is_a?(StudentWork)
course = attachment.container&.homework_common&.course
elsif attachment.container.is_a?(StudentWorksScore)
course = attachment.container&.student_work&.homework_common&.course
elsif attachment.container.is_a?(GraduationWork)
course = attachment.container&.graduation_task&.course
elsif attachment.container.is_a?(GraduationWorkScore)
course = attachment.container&.graduation_work&.graduation_task&.course
else
candown = true
end
candown = !candown && course.present? ? current_user.member_of_course?(course) : candown
else
candown = true
end
candown
end
end end

@ -29,10 +29,10 @@ class CoursesController < ApplicationController
:transfer_to_course_group, :delete_from_course, :transfer_to_course_group, :delete_from_course,
:search_users, :add_students_by_search, :get_historical_courses, :add_teacher_popup, :add_teacher] :search_users, :add_students_by_search, :get_historical_courses, :add_teacher_popup, :add_teacher]
before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, :change_course_admin, before_action :admin_allowed, only: [:set_invite_code_halt, :set_public_or_private, :change_course_admin,
:set_course_group, :delete_course_teacher, :create_group_by_importing_file] :set_course_group, :create_group_by_importing_file]
before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group, before_action :teacher_or_admin_allowed, only: [:graduation_group_list, :create_graduation_group, :join_graduation_group,
:change_course_teacher, :export_member_scores_excel, :course_group_list, :change_course_teacher, :export_member_scores_excel, :course_group_list,
:teacher_application_review, :apply_teachers] :teacher_application_review, :apply_teachers, :delete_course_teacher]
before_action :validate_course_name, only: [:create, :update] before_action :validate_course_name, only: [:create, :update]
before_action :find_board, only: :board_list before_action :find_board, only: :board_list
before_action :validate_page_size, only: :mine before_action :validate_page_size, only: :mine

@ -9,13 +9,15 @@ class Users::InterestsController < Users::BaseController
extension = current_user.user_extension || current_user.build_user_extension extension = current_user.user_extension || current_user.build_user_extension
return render_error('请选择职业') unless %w(teacher student professional).include?(identity) return render_error('请选择职业') unless %w(teacher student professional).include?(identity)
interest_ids = Array.wrap(params[:interest_ids]).map(&:to_i)
return render_error('请选择兴趣') if interest_ids.blank?
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
extension.update_column(:identity, identity) extension.update_column(:identity, identity)
# 兴趣 # 兴趣
current_user.user_interests.delete_all
UserInterest.bulk_insert(:user_id, :repertoire_id) do |worker| UserInterest.bulk_insert(:user_id, :repertoire_id) do |worker|
(Repertoire.pluck(:id) & Array.wrap(params[:interest_ids]).map(&:to_i)).each do |repertoire_id| (Repertoire.pluck(:id) & interest_ids).each do |repertoire_id|
worker.add(user_id: current_user.id, repertoire_id: repertoire_id) worker.add(user_id: current_user.id, repertoire_id: repertoire_id)
end end
end end

@ -250,7 +250,7 @@ class User < ApplicationRecord
# 课堂成员 # 课堂成员
def member_of_course?(course) def member_of_course?(course)
course.course_members.exists?(user_id: id) course&.course_members.exists?(user_id: id)
end end
# 实训路径管理员创建者或admin # 实训路径管理员创建者或admin

@ -38,6 +38,6 @@ class CreateAddDepartmentApplyService < ApplicationService
message.save(validate: false) message.save(validate: false)
end end
school department
end end
end end

@ -13,7 +13,7 @@ class Users::BindPhoneService < ApplicationService
raise Error, '该手机号已被绑定' if User.where.not(id: user.id).exists?(phone: params[:phone]) raise Error, '该手机号已被绑定' if User.where.not(id: user.id).exists?(phone: params[:phone])
code = VerificationCode.where(phone: params[:phone], code: params[:code], code_type: 5).last code = VerificationCode.where(phone: params[:phone], code: params[:code], code_type: 4).last
raise Error, '验证码无效' unless code&.effective? raise Error, '验证码无效' unless code&.effective?
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do

@ -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; #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} left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;} .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_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{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;} .log-botton:hover{color: #FFFFff!important;}

@ -26,7 +26,7 @@ if (isDev) {
parsed = queryString.parse(_search); parsed = queryString.parse(_search);
} }
debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' :
window.location.search.indexOf('debug=s') != -1 ? 'student' : window.location.search.indexOf('debug=s') != -1 ? 'student' :
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || '' window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || ''
} }
window._debugType = debugType; window._debugType = debugType;

@ -91,7 +91,7 @@ class PathModal extends Component{
this.setState({ this.setState({
type:types, type:types,
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
this.funshixunpathlist(Searchvalue,types,true,1) this.funshixunpathlist(Searchvalue,types,true,1)
} }
@ -105,7 +105,7 @@ class PathModal extends Component{
SenttotheSearch=(value)=>{ SenttotheSearch=(value)=>{
this.setState({ this.setState({
page:1, page:1,
newshixunmodallist:[] newshixunmodallist:undefined
}) })
let{type}=this.state; let{type}=this.state;
this.funshixunpathlist(value,type,true,1) this.funshixunpathlist(value,type,true,1)
@ -267,12 +267,19 @@ class PathModal extends Component{
margin-top:0px !important; margin-top:0px !important;
height: 40px; height: 40px;
} }
`} `}
</style> </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} onScroll={this.contentViewScrolledit}
style={{"Height":"204px"}}> style={{height:"204px"}}>
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit}>
{ {

@ -82,7 +82,6 @@ class ShixunModal extends Component{
//勾选实训 //勾选实训
shixunhomeworkedit=(list)=>{ shixunhomeworkedit=(list)=>{
debugger
let newpatheditarry=[]; let newpatheditarry=[];
if (this.props.singleChoose == true) { if (this.props.singleChoose == true) {
if (list.length > 0) { if (list.length > 0) {
@ -330,7 +329,7 @@ debugger
<div className="over210 pl20 pr20" <div className="over210 pl20 pr20"
onScroll={this.contentViewScrolledit} onScroll={this.contentViewScrolledit}
style={{height:"158px"}}> >
<style> <style>
{ {
` `
@ -355,8 +354,12 @@ debugger
{/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/} {/*<Loading visible={hometypepvisible} shape="dot-circle" className="newnext-loading" color='#4AC7FF'>*/}
<Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}> <Checkbox.Group style={{ width: '100%' }} value={patheditarry} onChange={this.shixunhomeworkedit}>
{ {
newshixunmodallist === undefined ? "": newshixunmodallist.map((item,key)=>{ newshixunmodallist === undefined ? "":newshixunmodallist.length===0?
console.log(item) <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( return(
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}> <div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
<li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide"> <li className="fl with40 edu-txt-left task-hide paddingl5 newtaskhide">

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

@ -1,309 +1,307 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import '../../css/members.css' import '../../css/members.css'
import '../../css/busyWork.css' import '../../css/busyWork.css'
import '../style.css' import '../style.css'
import { WordsBtn } from 'educoder' import { WordsBtn } from 'educoder'
import NoneData from '../../coursesPublic/NoneData' import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals" import Modals from "../../../modals/Modals"
import axios from 'axios' import axios from 'axios'
import { Modal,Select,Input } from "antd"; import { Modal,Select,Input } from "antd";
const Option = Select.Option const Option = Select.Option
class GraduateTopicDetailTable extends Component{ class GraduateTopicDetailTable extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
modalsType:false, modalsType:false,
modalsTopval:'', modalsTopval:'',
operationId:undefined, operationId:undefined,
agreeFlag:false, agreeFlag:false,
classesId:undefined, classesId:undefined,
agreeCheck:false, agreeCheck:false,
visible:false, visible:false,
un_addClass:undefined, un_addClass:undefined,
un_addClass_notice:"", un_addClass_notice:"",
un_choose_notice:"" un_choose_notice:""
} }
} }
// 拒绝 // 拒绝
aboutTopic=(id)=>{ aboutTopic=(id)=>{
this.setState({ this.setState({
modalsType:true, modalsType:true,
modalsTopval:'是否确认拒绝学生选题?', modalsTopval:'是否确认拒绝学生选题?',
operationId:id operationId:id
}) })
} }
cancelAboutTopic=()=>{ cancelAboutTopic=()=>{
this.setState({ this.setState({
modalsType:false, modalsType:false,
modalsTopval:'' modalsTopval:''
}) })
} }
sureAboutTopic=()=>{ sureAboutTopic=()=>{
let{operationId}=this.state let{operationId}=this.state
let courseId=this.props.match.params.course_id; let courseId=this.props.match.params.course_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id; let graduation_topic_id=this.props.match.params.graduation_topic_id;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId; let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/refuse_student_topic.json?student_graduation_topic=`+operationId;
axios.post(url).then((result)=>{ axios.post(url).then((result)=>{
if(result.data.status==0){ if(result.data.status==0){
this.props.showNotification(`${result.data.message}`); this.props.showNotification(`${result.data.message}`);
this.setState({ this.setState({
modalsType:false, modalsType:false,
modalsTopval:'' modalsTopval:''
}) })
//成功后调用列表接口,刷新 //成功后调用列表接口,刷新
this.props.getDetailList(this.props.page); this.props.getDetailList(this.props.page);
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
this.setState({ this.setState({
modalsType:false, modalsType:false,
modalsTopval:'' modalsTopval:''
}) })
} }
//同意 //同意
agreeTopic=(id)=>{ agreeTopic=(id)=>{
this.setState({ this.setState({
agreeFlag:true, agreeFlag:true,
operationId:id operationId:id
}) })
} }
hideAgreeTopic=()=>{ hideAgreeTopic=()=>{
this.setState({ this.setState({
agreeFlag:false, agreeFlag:false,
classesId:undefined classesId:undefined
}) })
} }
sureAgreeTopic=(count)=>{ sureAgreeTopic=(count)=>{
if(count > 0){ if(count > 0){
debugger let{tableData}=this.props;
let{tableData}=this.props; let{operationId,classesId}=this.state
let{operationId,classesId}=this.state let courseId=this.props.match.params.course_id;
let courseId=this.props.match.params.course_id; let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name;
let name=tableData.group_list.filter(item=>item.group_id==classesId)[0].group_name; this.agreeChoose(courseId,operationId,classesId,name);
this.agreeChoose(courseId,operationId,classesId,name); }else{
}else{ this.setState({
this.setState({ un_choose_notice:"请先添加分班"
un_choose_notice:"请先添加分班" })
}) }
} }
}
agreeChoose=(courseId,operationId,classesId,courseName)=>{
agreeChoose=(courseId,operationId,classesId,courseName)=>{ let graduation_topic_id=this.props.match.params.graduation_topic_id;
let graduation_topic_id=this.props.match.params.graduation_topic_id; let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`;
let url =`/courses/${courseId}/graduation_topics/${graduation_topic_id}/accept_student_topic.json`; axios.post(url,{
axios.post(url,{ student_graduation_topic_id:operationId,
student_graduation_topic_id:operationId, group_id:classesId,
group_id:classesId, course_group_name:courseName
course_group_name:courseName }).then((result)=>{
}).then((result)=>{ if(result.data.status==0){
if(result.data.status==0){ this.props.showNotification(`${result.data.message}`);
this.props.showNotification(`${result.data.message}`); this.setState({
this.setState({ agreeFlag:false,
agreeFlag:false, agreeCheck:true,
agreeCheck:true, visible:false
visible:false })
}) //成功后调用列表接口,刷新
//成功后调用列表接口,刷新 this.props.getDetailList(this.props.page);
this.props.getDetailList(this.props.page); }
} }).catch((error)=>{
}).catch((error)=>{ console.log(error);
console.log(error); })
}) }
}
//切换分班
//切换分班 changeClasses=(value)=>{
changeClasses=(value)=>{ this.setState({
debugger classesId:value
this.setState({ })
classesId:value }
})
} //新增分班
topicAddClasses=()=>{
//新增分班 this.setState({
topicAddClasses=()=>{ visible:true,
this.setState({ agreeFlag:false
visible:true, })
agreeFlag:false }
}) hideClasses=()=>{
} this.setState({
hideClasses=()=>{ visible:false,
this.setState({ classesId:undefined
visible:false, })
classesId:undefined }
})
} //新建分班--输入分班
inputClasses=(e)=>{
//新建分班--输入分班 this.setState({
inputClasses=(e)=>{ un_addClass:e.target.value
this.setState({ })
un_addClass:e.target.value }
})
} // 新建分班---确定
sureAddClass=()=>{
// 新建分班---确定 let {un_addClass}=this.state;
sureAddClass=()=>{ if(!un_addClass){
let {un_addClass}=this.state; this.setState({
if(!un_addClass){ un_addClass_notice:"请输入分班名称"
this.setState({ })
un_addClass_notice:"请输入分班名称" return;
}) }
return; console.log(this.props)
} let{operationId}=this.state
console.log(this.props) let courseId=this.props.match.params.course_id;
let{operationId}=this.state this.agreeChoose(courseId,operationId,-1,un_addClass);
let courseId=this.props.match.params.course_id; }
this.agreeChoose(courseId,operationId,-1,un_addClass);
} render(){
let {page,tableData}=this.props
render(){ let { modalsType,modalsTopval,agreeFlag,classesId,visible
let {page,tableData}=this.props ,un_addClass_notice
let { modalsType,modalsTopval,agreeFlag,classesId,visible ,un_addClass,
,un_addClass_notice un_choose_notice
,un_addClass, } = this.state
un_choose_notice const isAdmin =this.props.isAdmin();
} = this.state const isStudent =this.props.isStudent();
const isAdmin =this.props.isAdmin(); const isNotMember=this.props.isNotMember();
const isStudent =this.props.isStudent(); console.log(un_addClass_notice)
const isNotMember=this.props.isNotMember(); return(
console.log(un_addClass_notice) <div className="minH-560 edu-back-white">
return( <div className="TopicDetailTable">
<div className="minH-560 edu-back-white"> <div className="topHead edu-txt-center">
<div className="TopicDetailTable"> <span style={{"width":"5%"}}>序号</span>
<div className="topHead edu-txt-center"> <span style={{"width":"12%"}}>姓名</span>
<span style={{"width":"5%"}}>序号</span> {isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"12%"}}>姓名</span> <span style={{"width":"15%"}}>分班</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>} <span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"15%"}}>分班</span> <span style={{"width":"12%"}} className="fr">操作</span>
<span style={{"width":"15%"}}>选题时间</span> {
<span style={{"width":"12%"}} className="fr">操作</span> isAdmin &&
{ <span style={{"width":"12%"}} className="fr">确认结果</span>
isAdmin && }
<span style={{"width":"12%"}} className="fr">确认结果</span>
} </div>
{/* 拒绝弹框 */}
</div> <Modals
{/* 拒绝弹框 */} modalsType={modalsType}
<Modals modalsTopval={modalsTopval}
modalsType={modalsType} modalsBottomval=""
modalsTopval={modalsTopval} modalCancel={this.cancelAboutTopic}
modalsBottomval="" modalSave={this.sureAboutTopic}
modalCancel={this.cancelAboutTopic} ></Modals>
modalSave={this.sureAboutTopic} {/* 同意弹框 */}
></Modals> <Modal
{/* 同意弹框 */} title="同意选题"
<Modal visible={agreeFlag}
title="同意选题" closable={false}
visible={agreeFlag} footer={null}
closable={false} destroyOnClose={true}
footer={null} centered={true}
destroyOnClose={true} keyboard={false}
centered={true} >
keyboard={false} <div className="newupload_conbox">
> <p className="color-grey-9 mb15 edu-txt-center">确认同意学生的选题将学生加入我的分班</p>
<div className="newupload_conbox"> <div className="df">
<p className="color-grey-9 mb15 edu-txt-center">确认同意学生的选题将学生加入我的分班</p> <span className="lineh-40 mr10">选择</span>
<div className="df"> <div className="flex1">
<span className="lineh-40 mr10">选择</span> <Select placeholder="请选择分班" style={{"width":"100%"}} value={classesId} onChange={this.changeClasses}>
<div className="flex1"> {
<Select placeholder="请选择分班" style={{"width":"100%"}} value={classesId} onChange={this.changeClasses}> tableData.group_list && tableData.group_list.map((item,key)=>{
{ return(
tableData.group_list && tableData.group_list.map((item,key)=>{ <Option value={item.group_id} key={key}>{item.group_name}</Option>
return( )
<Option value={item.group_id} key={key}>{item.group_name}</Option> })
) }
}) <Option key="0"><a onClick={this.topicAddClasses} style={{display:"block"}}>添加分班</a></Option>
} </Select>
<Option key="0"><a onClick={this.topicAddClasses} style={{display:"block"}}>添加分班</a></Option> <p style={{height:"20px",lineHeight:"20px"}}><span className="color-orange-tip">{un_choose_notice}</span></p>
</Select> </div>
<p style={{height:"20px",lineHeight:"20px"}}><span className="color-orange-tip">{un_choose_notice}</span></p> </div>
</div> <div className="mt20 clearfix edu-txt-center">
</div> <a onClick={this.hideAgreeTopic} className="pop_close task-btn mr30">取消</a>
<div className="mt20 clearfix edu-txt-center"> <a className="task-btn task-btn-orange" onClick={()=>this.sureAgreeTopic(tableData.group_list.length)}>确定</a>
<a onClick={this.hideAgreeTopic} className="pop_close task-btn mr30">取消</a> </div>
<a className="task-btn task-btn-orange" onClick={()=>this.sureAgreeTopic(tableData.group_list.length)}>确定</a> </div>
</div> </Modal>
</div> <Modal
</Modal> visible={visible}
<Modal title="新建分班"
visible={visible} closable={false}
title="新建分班" footer={null}
closable={false} destroyOnClose={true}
footer={null} centered={true}
destroyOnClose={true} keyboard={false}
centered={true} >
keyboard={false} <div className="newupload_conbox">
> <div className="df">
<div className="newupload_conbox"> <span className="lineh-40 mr10">分班</span>
<div className="df"> <div className="flex1">
<span className="lineh-40 mr10">分班</span> <Input className="input-flex-40" value={un_addClass} onInput={this.inputClasses} placeholder="示例:分班(最佳4个字符)"></Input>
<div className="flex1"> <p style={{height:"20px",lineHeight:"20px"}}>
<Input className="input-flex-40" value={un_addClass} onInput={this.inputClasses} placeholder="示例:分班(最佳4个字符)"></Input> <span className="color-orange-tip">{un_addClass_notice}</span>
<p style={{height:"20px",lineHeight:"20px"}}> </p>
<span className="color-orange-tip">{un_addClass_notice}</span> </div>
</p> </div>
</div> <div className="clearfix edu-txt-center">
</div> <a onClick={this.hideClasses} className="pop_close task-btn mr30">取消</a>
<div className="clearfix edu-txt-center"> <a className="task-btn task-btn-orange" onClick={this.sureAddClass}>确定</a>
<a onClick={this.hideClasses} className="pop_close task-btn mr30">取消</a> </div>
<a className="task-btn task-btn-orange" onClick={this.sureAddClass}>确定</a> </div>
</div> </Modal>
</div> <div className="bottomBody">
</Modal> {
<div className="bottomBody"> tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{
{ return(
tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{ <li className="color-grey-9 clearfix" key={key}>
return( <span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<li className="color-grey-9 clearfix" key={key}> <span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span> {isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>}
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span> <span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>
{isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>} <span style={{"width":"15%"}}>{item.selected_time}</span>
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span> {
<span style={{"width":"15%"}}>{item.selected_time}</span> isAdmin &&
{ <span style={{"width":"12%"}} className="fr">
isAdmin && {
<span style={{"width":"12%"}} className="fr"> item.result == "待确认" ?
{ <span>
item.result == "待确认" ? <a className="mr20 color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
<span> <a className="color-blue" onClick={()=>this.agreeTopic(`${item.id}`)}>同意</a>
<a className="mr20 color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a> </span>:
<a className="color-blue" onClick={()=>this.agreeTopic(`${item.id}`)}>同意</a> (
</span>: item.result === "已拒绝" ? <span className="color-grey-B3">--</span>
( :
item.result === "已拒绝" ? <span className="color-grey-B3">--</span> <a className="color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a>
: )
<a className="color-grey-B3" onClick={()=>this.aboutTopic(`${item.id}`)}>拒绝</a> }
) </span>
} }
</span> {
} isStudent &&
{ <span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-red":"fr"}>{item.result}</span>
isStudent && }
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-red":"fr"}>{item.result}</span> {
} isAdmin &&
{ <span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
isAdmin && }
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span> {
} isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
{ }
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
} </li>
)
</li> })
) }
}) {
} tableData.users_list && tableData.users_list.length == 0 && <NoneData></NoneData>
{ }
tableData.users_list && tableData.users_list.length == 0 && <NoneData></NoneData> </div>
} </div>
</div> </div>
</div> )
</div> }
) }
}
}
export default GraduateTopicDetailTable; export default GraduateTopicDetailTable;

@ -1,5 +1,6 @@
import React, {Component} from "React"; import React, {Component} from "React";
import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd"; import {Form, Select, Input, Button, Checkbox, DatePicker,Spin,Icon} from "antd";
import ApplyForAddOrgModal from '../../user/modal/ApplyForAddOrgModal';
import axios from 'axios'; import axios from 'axios';
import "../css/Courses.css"; import "../css/Courses.css";
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
@ -7,6 +8,7 @@ import moment from 'moment';
import Modals from '../../modals/Modals'; import Modals from '../../modals/Modals';
const { Option } = Select; const { Option } = Select;
@ -134,7 +136,6 @@ class CoursesNew extends Component {
let coursesId = this.props.match.params.coursesId; let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state let {is_public,datatime} = this.state
// console.log(is_public) // console.log(is_public)
if (coursesId != undefined) { if (coursesId != undefined) {
// 编辑 // 编辑
@ -180,7 +181,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,
@ -234,7 +235,7 @@ class CoursesNew extends Component {
name: values.classroom, name: values.classroom,
class_period: values.period, class_period: values.period,
credit: parseFloat(values.credit), credit: parseFloat(values.credit),
end_date: datatime, end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0, is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup, course_module_types: values.checkboxgroup,
authentication: this.state.Realnamecertification, authentication: this.state.Realnamecertification,
@ -285,12 +286,13 @@ class CoursesNew extends Component {
// console.log(e.target.checked); // console.log(e.target.checked);
} }
Searchvalue=(value)=>{ Searchvalue=(value)=>{
let url="/courses/search_course_list.json"; let url="/courses/search_course_list.json";
axios.post(url,{ axios.post(url,{
search:value search:value
}).then((result)=>{ }).then((result)=>{
// console.log(result.data) // console.log(result.data)
if (result.data.message===undefined) { if (result.data.status===0) {
this.setState({ this.setState({
searchlist: result.data.course_lists, searchlist: result.data.course_lists,
// course:value, // course:value,
@ -305,14 +307,19 @@ class CoursesNew extends Component {
}) })
} }
handleSearch=(value)=>{ handleSearch=(value)=>{
this.props.form.setFieldsValue({
classroom:value, if(value!=""){
course:value this.props.form.setFieldsValue({
}); classroom:value,
this.Searchvalue(value) course:value
});
this.Searchvalue(value)
}
}; };
handleChange=(value)=>{ handleChange=(value)=>{
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
course:value, course:value,
classroom:value classroom:value
@ -321,13 +328,24 @@ class CoursesNew extends Component {
handleSearchschool=(value)=>{ handleSearchschool=(value)=>{
this.props.form.setFieldsValue({ if(value!="") {
school:value, this.props.form.setFieldsValue({
fetching:true, school: value,
}); fetching: true,
this.Searchvalue(value) });
this.getschool(value)
}
}; };
handleChangeschools=(value)=>{
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
}
handleChangeschool=(value)=>{ handleChangeschool=(value)=>{
this.setState({ this.setState({
@ -339,35 +357,56 @@ class CoursesNew extends Component {
}; };
getschool=(value)=>{ getschool=(value)=>{
let url="/schools/school_list.json"; let url="/schools/school_list.json";
axios.get(url,{ axios.get(url,{
params: { params: {
search: value search: value
} }
}).then((result)=>{ }).then((result)=>{
if (result.data.message===undefined) { if (result.data.status===0) {
this.setState({ this.setState({
searchlistscholl: result.data.school_names, searchlistscholl: result.data.school_names,
scholl: value school: value
}) })
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
scholl: value school: value
}) })
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
}
render() { render() {
let {datatime} = this.state; let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form; 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 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) // console.log(this.props.current_user.user_school)
// form合并了
// console.log(optionschool)
return ( return (
<React.Fragment> <React.Fragment>
<div> <div>
<style>
{
`
.color-green-light {
color: #45E660!important;
}
`
}
</style>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...propsWithoutForm}></ApplyForAddOrgModal>
{/*提示*/} {/*提示*/}
<Modals <Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
@ -412,31 +451,9 @@ class CoursesNew extends Component {
} }
`} `}
</style> </style>
<div className="stud-class-set bor-bottom-greyE padding10200"> {/*<div className="stud-class-set bor-bottom-greyE padding10200">*/}
<Form.Item label="课堂所属单位">
{getFieldDecorator('school', { {/*</div>*/}
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 className="stud-class-set bor-bottom-greyE padding10200 ">
<div className={"TabsWarpcourse"}> <div className={"TabsWarpcourse"}>
@ -456,7 +473,6 @@ class CoursesNew extends Component {
> >
{options} {options}
</Select> </Select>
)} )}
<span className={"newcoursestitle fl"}> <span className={"newcoursestitle fl"}>
{/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/} {/*错误示例数据结构2017本部数据结构2017秋季数据结构2017电子商务1班*/}
@ -606,7 +622,7 @@ class CoursesNew extends Component {
</Form.Item> </Form.Item>
</span> </span>
</div> </div>
<div className="stud-class-set padding10200 coursenavbox"> <div className="stud-class-set padding10200 coursenavbox bor-bottom-greyE">
<Form.Item <Form.Item
label="公开设置" label="公开设置"
hasFeedback hasFeedback
@ -620,9 +636,45 @@ class CoursesNew extends Component {
<span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span> <span className={"coursesselect"}>选中后本课堂对所有用户可见否则仅本课堂成员可见</span>
</Form.Item> </Form.Item>
</div> </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"}> <div className={"FAFAFA"}>
<Form.Item wrapperCol={{span: 12, offset: 5}}> <Form.Item >
<div className="clearfix mt80 mb30"> <div className="clearfix mt40 mb30">
<Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20"> <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">
提交 提交
</Button> </Button>

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

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

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

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

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

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

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

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

@ -136,7 +136,7 @@ body>.-task-title {
margin-right: 20px; margin-right: 20px;
} }
.HeaderSearch .ant-input-search .ant-input{ .HeaderSearch .ant-input-search .ant-input{
height:30px; /*height:30px;*/
background: #373e3f !important; background: #373e3f !important;
border: 1px solid #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> <span className="mr30 color-orange pt10">*</span>
<div className="flex1 mr20"> <div className="flex1 mr20">
<TPMMDEditor ref={this.props.contentMdRef} placeholder="请输入选择题的过关任务内容" mdID={'courseContentMD'} refreshTimeout={1500} <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>
<div> <div>
<span <span

@ -71,7 +71,23 @@ class InterestpageComponent extends Component {
}if(response.data.repertoires[i].id===9){ }if(response.data.repertoires[i].id===9){
qdkfys=rgzn; 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); gouxuans4.push(datas);
this.setState({ this.setState({
gouxuans4:gouxuans4, gouxuans4:gouxuans4,
@ -166,7 +182,7 @@ class InterestpageComponent extends Component {
//兴趣页面点击 //兴趣页面点击
Interestcompletionpage(){ Interestcompletionpage(){
if(this.state.gouxuans.length === 0){ if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业"); this.openNotification("请选择职业");
return return
} }
@ -176,8 +192,10 @@ class InterestpageComponent extends Component {
ints.push(this.state.gouxuans4[i].id); ints.push(this.state.gouxuans4[i].id);
} }
} }
console.log("195195");
console.log(ints);
if(ints.length<1){ if(ints.length<1){
this.openNotification("内容是最少得选一个"); this.openNotification("请至少选择一个您感兴趣的内容");
return return
} }
var url = "/users/interest.json"; var url = "/users/interest.json";
@ -188,11 +206,11 @@ class InterestpageComponent extends Component {
if (response !== undefined) { if (response !== undefined) {
// this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
// window.location.href = "/" // window.location.href = "/"
if(response.data.message!==undefined){ if(response.data.status===0){
return; this.setMyEduCoderModals()
} }
this.setMyEduCoderModals()
} }

@ -71,7 +71,23 @@ class InterestpageMax extends Component {
}if(response.data.repertoires[i].id===9){ }if(response.data.repertoires[i].id===9){
qdkfys=rgzn; 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); gouxuans4.push(datas);
this.setState({ this.setState({
gouxuans4:gouxuans4, gouxuans4:gouxuans4,
@ -167,7 +183,7 @@ class InterestpageMax extends Component {
//兴趣页面点击 //兴趣页面点击
Interestcompletionpage(){ Interestcompletionpage(){
if(this.state.gouxuans.length === 0){ if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业"); this.openNotification("请选择职业");
return return
} }
@ -177,8 +193,10 @@ class InterestpageMax extends Component {
ints.push(this.state.gouxuans4[i].id); ints.push(this.state.gouxuans4[i].id);
} }
} }
console.log("200200");
console.log(ints);
if(ints.length<1){ if(ints.length<1){
this.openNotification("内容是最少得选一个"); this.openNotification("请至少选择一个您感兴趣的内容");
return return
} }
var url = "/users/interest.json"; var url = "/users/interest.json";
@ -189,12 +207,9 @@ class InterestpageMax extends Component {
if (response !== undefined) { if (response !== undefined) {
// this.Jumptotheinterestpage(); // this.Jumptotheinterestpage();
// window.location.href = "/" // window.location.href = "/"
if(response.data.status===0){
if(response.data.message!==undefined){ this.setMyEduCoderModals()
return;
} }
this.setMyEduCoderModals()
} }

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

@ -71,6 +71,7 @@
margin-top: 10px; margin-top: 10px;
} }
.ysldivhome22{ .ysldivhome22{
width: 800px;
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
align-content:stretch; 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; #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} left: 0px;padding: 40px 30px;box-sizing: border-box}
.log_nav{border-bottom:1px solid #eaeaea;} .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_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{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;} .log-botton:hover{color: #FFFFff!important;}

Loading…
Cancel
Save