dev_forum
杨树林 5 years ago
parent a69d0402b8
commit e3d2a4ae98

@ -331,7 +331,7 @@ class App extends Component {
{/* <Route path="/myshixuns/:shixunId/stages/:stageId" component={Index}/> */}
{/* 兴趣页面*/}
<Route path="/interest" component={Interestpage}/>
{/*<Route path="/interest" component={Interestpage}/>*/}
<Route path="/comment" component={CommentComponent}/>
<Route path="/testMaterial" component={TestMaterialDesignComponent}/>
<Route path="/test" component={TestIndex}/>

@ -95,6 +95,12 @@ class PollNew extends Component {
// 初始化数据
componentDidMount = () => {
// console.log("componentDidMount 50")
if( this.props.isStudent() === true){
this.props.history.push("/403")
return
}
if (this.props.match.params.news !== undefined) {
if (this.props.match.params.news === "new") {
this.state.Newedit === true;
@ -780,19 +786,21 @@ class PollNew extends Component {
}
}
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification(`选项不能少于3个!`);
if (object.question.question_type === 1) {
if (maxtie < 2) {
this.props.showNotification(`选项不能少于2个!`);
return
}
} else if (object.question.question_type === 2) {
if (maxtie < 3) {
this.props.showNotification(`选项不能少于3个!`);
return
}
}
}
if (object.question.question_type === 2) {
if (object.question.max_choices > 0) {
@ -1260,17 +1268,19 @@ class PollNew extends Component {
}
}
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification('选项不能少于3个!');
if (maxtie < 2) {
this.props.showNotification('选项不能少于2个!');
return
}
} else if (object.question.question_type === 2) {
if (maxtie < 3) {
this.props.showNotification('选项不能少于3个!');
return
}
}
}
if (object.question.question_type === 2) {
if (object.question.max_choices > 0) {
@ -2496,7 +2506,7 @@ class PollNew extends Component {
(<RadioGroup defaultChecked={false} disabled>
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className={"h20 mt20 mb20 "} style={{"clear": "both"}}>
<div className="h20 pt20" style={{"clear": "both"}}>
<Radio value={i} className={"fl"} style={{"text-align": "left"}}></Radio>
{/*<pre className={"break_word flex1 fl"}*/}
{/* style={{"text-align": "left"}}>{items.answer_text}</pre>*/}
@ -2511,7 +2521,7 @@ class PollNew extends Component {
(<CheckboxGroup defaultChecked={false} disabled>
{item.question.answers === undefined ? "" : item.question.answers.map((items, i) => {
return (
<div className="mt10 mt20 mb20 " style={{"clear": "both"}}>
<div className="mt10 pt20 " style={{"clear": "both"}}>
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>

@ -32,6 +32,7 @@ class ShixunWorkModal extends Component{
newgroup_list.push(item)
})
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
console.log()
newgroup_list.push(response.data.ungroup_list)
}
this.setState({

@ -25,6 +25,7 @@ import '../courses/css/Courses.css';
import beijintulogontwo from '../../../src/images/login/beijintulogontwo.png';
import educodernet from '../../../src/images/login/educodernet.png';
import LoginRegisterComponent from '../user/LoginRegisterComponent';
import InterestpageComponent from '../user/Interestpage'
import FindPasswordComponent from '../user/FindPasswordComponent';
import passopen from "../../images/login/passopen.png";
//educoder登入页面
@ -59,26 +60,26 @@ class EducoderLogin extends Component {
super(props);
if( props.match.url === "/changepassword" ){
this.state = {
showbool: false,
showbool: 3,
logini:3,
}
}else {
if(props.match.url === "/login"){
this.state = {
showbool: true,
showbool: 1,
loginstatus:true,
logini:1,
}
}else if(props.match.url === "/register"){
this.state = {
showbool: true,
showbool: 1,
loginstatus:false,
logini:2,
}
}else{
this.state = {
showbool: true,
showbool: 1,
logini:1,
}
@ -100,16 +101,18 @@ class EducoderLogin extends Component {
})
}
Setshowbool = () => {
if (this.state.showbool === true) {
Setshowbool = (e) => {
if (e===1) {
this.setState({
showbool: false
showbool: 1
})
} else {
} else if(e===2) {
this.setState({
showbool: 2
})
}else if(e===3){
this.setState({
showbool: true
showbool: 3
})
}
}
@ -135,27 +138,38 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%"
}}>
<div style={{"margin-top": "50px"}}>
<div style={{"margin-top": "20px"}}>
<img src={educodernet}/>
</div>
</div>
{
showbool === true ?
showbool === 1 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<LoginRegisterComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool} ></LoginRegisterComponent>
Setshowbool={(e)=>this.Setshowbool(e)} ></LoginRegisterComponent>
</div>
</div>
:showbool === 2 ?
<div style={{
"display": "flex",
"justify-content": "center",
"align-items": "center",
"width": "100%",
}}>
<InterestpageComponent {...this.props} {...this.state}>
</InterestpageComponent>
</div>
:
<div style={{
"display": "flex",
@ -163,15 +177,14 @@ class EducoderLogin extends Component {
"align-items": "center",
"width": "100%",
}}>
<div style={{"margin-top": "40px","height":"530px"}}>
<div style={{"margin-top": "40px","height":"580px"}}>
<FindPasswordComponent {...this.props} {...this.state}
Setshowbool={this.Setshowbool}></FindPasswordComponent>
Setshowbool={(e)=>this.Setshowbool(e)}></FindPasswordComponent>
</div>
</div>
}
<div style={{"height":"180px",
<div style={{"height":"125px",
"display": "flex",
"justify-content": "center",
"align-items": "center",
@ -179,6 +192,7 @@ class EducoderLogin extends Component {
}}>
<div className="font-14 color-grey-9 " style={{marginTop:"15px"}}><span className="font-18">©</span>&nbsp;2019&nbsp;EduCoder<span className="ml15 mr15">ICP17009477</span><a href="https://team.trustie.net" style={{"color":"#888"}} target="_blank">Trustie</a>&nbsp;&nbsp;&nbsp;&amp;&nbsp;&nbsp;&nbsp;IntelliDE inside.</div>
</div>
<div style={{"height":"55px"}}></div>
</div>
</div>
)

@ -756,7 +756,7 @@ submittojoinclass=(value)=>{
<li><a href={this.props.Headertop===undefined?"":this.props.Headertop.account_manager_url}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
<li><Link to={`/interest`}>兴趣页</Link></li>
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}
<li className="bor-top-greyE">
{/*<a href={this.props.Headertop===undefined?"":this.props.Headertop.logout_url}>退出</a>*/}

@ -44,7 +44,7 @@ class LoginRegisterComponent extends Component {
});
};
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
this.props.Setshowbool(1);
}

@ -1,51 +1,110 @@
import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl, DragValidator} from 'educoder';
import {Tabs, Input, Checkbox, Button, notification} from 'antd';
import {Button} from 'antd';
import axios from 'axios';
import './common.css'
import mytc from './img/mytc.png';
import skzbdx from './img/skzbdx.png';
import zyrs1 from './img/zyrs1.png';
import gouxuan from './img/gouxuan.png';
import meigouxuan from './img/meigouxuan.png';
import qdkf from './img/qdkf.png';
import hdkf from './img/hdkf.png';
import ydkf from './img/ydkf.png';
import sjk from './img/sjk.png';
import ysj from './img/ysj.png';
import yunwei from './img/yunwei.png';
import rgzn from './img/rgzn.png';
import qita from './img/qita.png';
//父组件 EducoderLogin.js
class InterestpageComponent extends Component {
constructor(props) {
super(props)
this.state = {
login: "",
password: "",
passwords: "",
seconds: 60,
codes: "",
getverificationcodes: true,
Phonenumberisnotco: undefined,
Phonenumberisnotcobool: false,
s: 'text',
classpass: "text",
readonlyInput: true,
gouxuans: 0,
gouxuans2:0,
gouxuans3:[{id:1,name:"前端开发",bool:false,url:qdkf},{id:2,name:"后端开发",bool:false,url:hdkf},{id:3,name:"移动开发",bool:false,url:ydkf},{id:4,name:"数据库",bool:false,url:sjk},{id:5,name:"云计算和大数据",bool:false,url:ysj},{id:6,name:"运维与测试",bool:false,url:yunwei},{id:7,name:"人工智能",bool:false,url:rgzn},{id:8,name:"其他",bool:false,url:qita}],
}
}
Clickteacher=(e)=>{
console.log(e);
if(e === 1){
this.setState({
gouxuans:1,
})
}else if(e === 2){
this.setState({
gouxuans:2,
})
}else if(e === 3){
this.setState({
gouxuans:3,
})
}
}
Clickteacher2=(e)=>{
console.log(e);
let {gouxuans3} =this.state;
for (var i=0;i<gouxuans3.length;i++){
if(gouxuans3[i].id === e){
console.log("51");
console.log(e);
if(gouxuans3[i].bool === true){
gouxuans3[i].bool=false;
}else{
gouxuans3[i].bool=true;
}
}
}
console.log(gouxuans3);
this.setState({
gouxuans3:gouxuans3,
})
}
render() {
const {
gouxuans,
gouxuans3
} = this.state
// height: 346px;
return (
<div className="login_register_content" style={{height: "824px"}}>
<div className="ysllogin_register_contents" style={{width:"800px",height: "620px"}}>
<div className="login_section">
<div className="ysldivhome">
<div>1</div>
<div>2</div>
<div>3</div>
<div className="ysllogin_section">
<div className="mt15"><span className="yslspans1">请选择你的职业</span></div>
<div className="ysldivhome1" >
<div className="ysldivhomediv" style={{marginLeft:"30px"}} >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(1)}>{gouxuans ===1? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}老师</div>
<div className="ysldivhomedivimg" ><img src={skzbdx} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" style={{ marginLeft:"101px",marginRight:"101px"}}>
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(2)}>{gouxuans===2? <img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}学生</div>
<div className="ysldivhomedivimg"><img src={mytc} className="ysldivhomedivimg"/></div>
</div>
<div className="ysldivhomediv" >
<div className="ysldivhomedivtxt" onClick={()=>this.Clickteacher(3)}>{gouxuans===3?<img src={gouxuan} className="gouxuanimg"/>:<img className="gouxuanimg" src={meigouxuan}/>}专业人士</div>
<div className="ysldivhomedivimg"><img src={zyrs1} className="ysldivhomedivimg"/></div>
</div>
</div>
<div className="mt5"><span className="yslspans2">选择你可能感兴趣的内容</span></div>
<div ><span className="yslspans3">基于你关注的内容推荐</span></div>
<div className="ysldivhome2">
{gouxuans3&&gouxuans3.map((item,key)=>{
return(
<div className={item.id<5?"ysldivhomediv1":"ysldivhomediv2"} onClick={()=>this.Clickteacher2(item.id)}>
{item.bool===true?<img src={gouxuan} className="yslgouxuanimg"/>:<div className="yslgouxuanimg2"></div>}
<img className="div1img" src={item.url}/>
<span className="textall">{item.name}</span>
</div>
)
})}
</div>
<Button className="login_btn" size={"large"} type="primary" style={{height: "46px"}}>完成</Button>
<Button className="yslbutton" size={"large"} type="primary" style={{width:"255px",height: "36px",background: "#4CACFF"}}>完成</Button>
</div>

@ -138,7 +138,7 @@ class LoginRegisterComponent extends Component {
;
StudyMakeMoney = () => { // 调用父组件方法
this.props.Setshowbool();
this.props.Setshowbool(3);
// this.props.Setlogins(3);
this.setState({
login: "",
@ -344,7 +344,8 @@ class LoginRegisterComponent extends Component {
passwords: "",
Agreetotheterms: "",
})
this.props.history.push(result.data.redirect_uri)
// this.props.history.push(result.data.redirect_uri)
this.props.Setshowbool(2);
} catch (e) {

@ -47,6 +47,119 @@
.dragValidator {
margin-bottom: 16px;
}
.ysldivhome{
.ysldivhome1{
display: flex;
flex-direction: row;
margin-left: 100px;
margin-right: 129px;
margin-top: 10px;
}
.ysldivhome2{
display: flex;
flex-flow: row wrap;
align-content:stretch;
margin-top: 10px;
}
.ysldivhomediv{
width: 101px;
height: 147px;
}
.ysldivhomediv1{
width: 110px;
height: 110px;
border-radius:50%;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
background: #fff;
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 15px;
}
.ysldivhomediv2{
width: 110px;
height: 110px;
border-radius:50%;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
background: #fff;
display: flex;
flex-direction:column;
margin-left: 73px;
margin-top: 20px;
}
.ysldivhomedivtxt{
width:101px;
height:27px;
margin-bottom: 10px;
font-size: 14px;
text-align: center;
}
.ysldivhomedivimg{
width: 101px;
height: 101px;
}
.ysllogin_register_contents{
display: flex;
margin-top: 30px;
justify-content: center;
box-shadow:3px 10px 21px 0px rgba(76,76,76,0.15);
border-radius:6px;
background: #fff;
}
.ysllogin_section {
width:800px;
height: 620px;
display: flex;
align-items: center;
flex-direction: column;
}
.yslspans1{
text-align: center;
font-size: 16px;
color: #111C24;
}
.yslspans2{
text-align: center;
font-size: 15px;
color: #05101A;
}
.yslspans3{
text-align: center;
font-size: 13px;
color: #656565;
}
.yslbutton{
width:255px;
height: 36px;
margin-top:30px;
margin-bottom: 19px;
}
.mt22{
margin-top: 22px;
}
.gouxuanimg{
margin-right: 10px;
margin-bottom: 2px;
}
.textall{
text-align: center;
font-size: 13px;
color: #4B4B4B;
}
.div1img{
display: flex;
justify-content:center;
width: 60px;
margin-left: 27px;
}
.yslgouxuanimg{
width: 20px;
height: 20px;
margin-left: 75px;
}
.yslgouxuanimg2{
height: 20px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Loading…
Cancel
Save