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
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)
# 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

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

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

@ -232,17 +232,15 @@ class ApplicationController < ActionController::Base
User.current = User.find 12
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
# User.current = User.find 81403
end
# Sets the logged in user

@ -2,7 +2,7 @@
#
# 文件上传
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]
include ApplicationHelper
@ -10,6 +10,8 @@ class AttachmentsController < ApplicationController
def show
# 1. 优先跳到cdn
# 2. 如果没有cdnsend_file
candown = attachment_candown @file
tip_exception("您没有权限下载该附件") if !candown
if @file.cloud_url.present?
update_downloads(@file)
redirect_to @file.cloud_url and return
@ -157,4 +159,33 @@ class AttachmentsController < ApplicationController
end
edu_setting('public_cdn_host') + "/" + path
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

@ -29,10 +29,10 @@ class CoursesController < ApplicationController
:transfer_to_course_group, :delete_from_course,
: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,
: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,
: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 :find_board, only: :board_list
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
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
extension.update_column(:identity, identity)
# 兴趣
current_user.user_interests.delete_all
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)
end
end

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

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

@ -13,7 +13,7 @@ class Users::BindPhoneService < ApplicationService
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?
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;
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;}

@ -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">

@ -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)=>{
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)=>{
if(value!="") {
this.props.form.setFieldsValue({
school: value,
fetching: true,
});
this.Searchvalue(value)
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
})
window.location.reload();
}
}
try {
this.props.Modifyloginvalue();
}catch (e) {
window.location.reload();
}
}
// 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,20 +139,19 @@ 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.status === 403) {
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:'你没有权限访问,请联系对应课程管理人员开通',
// })
}
}).catch((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;

@ -191,7 +191,7 @@ export default class TPMevaluation extends Component {
if(response.data.test_sets.length===0){
let newlist=[
{hidden:0,input:"",output:"",score:50},
{hidden:1,input:"",output:"",score:50}
{hidden:0,input:"",output:"",score:50}
]
newevaluationlist=newlist
}else{

@ -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
}
@ -176,8 +192,10 @@ class InterestpageComponent extends Component {
ints.push(this.state.gouxuans4[i].id);
}
}
console.log("195195");
console.log(ints);
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -188,13 +206,13 @@ 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()
}
}
}).catch((error) => {
console.log(error);

@ -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,
@ -167,7 +183,7 @@ class InterestpageMax extends Component {
//兴趣页面点击
Interestcompletionpage(){
if(this.state.gouxuans.length === 0){
this.openNotification("请选择您的职业");
this.openNotification("请选择职业");
return
}
@ -177,8 +193,10 @@ class InterestpageMax extends Component {
ints.push(this.state.gouxuans4[i].id);
}
}
console.log("200200");
console.log(ints);
if(ints.length<1){
this.openNotification("内容是最少得选一个");
this.openNotification("请至少选择一个您感兴趣的内容");
return
}
var url = "/users/interest.json";
@ -189,13 +207,10 @@ 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()
}
}
}).catch((error) => {

@ -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