dev_cs_new
杨树林 6 years ago
parent 45103884d4
commit d5ebe26cb8

@ -145,18 +145,18 @@ class ListPageIndex extends Component{
<div className="newMain clearfix">
{/*头部banner*/}
<CoursesBanner {...this.props}></CoursesBanner>
{yslGuideone!==undefined?
(
yslGuideone===true?
<Guide
setwindowlocal={(b)=>this.setwindowlocal(b)}
>
</Guide>
:""
)
:""
}
{/*下面是指引哦*/}
{/*{yslGuideone!==undefined?*/}
{/*(*/}
{/* yslGuideone===true?*/}
{/* <Guide*/}
{/* setwindowlocal={(b)=>this.setwindowlocal(b)}*/}
{/* >*/}
{/* </Guide>*/}
{/* :""*/}
{/* )*/}
{/* :""*/}
{/*}*/}
<div className="educontent clearfix" style={{flex: "1 0 auto"}}>
<div className="stud-class-set">

@ -41,7 +41,8 @@ class CoursesNew extends Component {
searchlist: [],
searchlistscholl:[],
listvalue: undefined,
fetching:false
fetching:false,
boolxinjian:false,
}
}
@ -80,6 +81,9 @@ class CoursesNew extends Component {
}).catch((error) => {
console.log(error);
})
this.setState({
boolxinjian:false,
});
}else{
let url = "/courses/new.json"
axios.get(url).then((result) => {
@ -96,18 +100,25 @@ class CoursesNew extends Component {
});
this.handleSearchschool(user_school);
this.setState({
boolxinjian:true,
});
}
}
componentDidUpdate(prevProps){
// if(prevProps.current_user!=this.props.current_user){
// if(this.props.current_user.user_identity==="学生"){
// window.location.href ="/403"
// }
// }
}
componentDidUpdate(prevProps) {
if(prevProps.current_user !== this.props.current_user){
let user_school=this.props.current_user&&this.props.current_user.user_school;
this.props.form.setFieldsValue({
school:user_school,
});
this.setState({
school:user_school,
});
this.handleSearchschool(user_school);
}
}
onChangeTimepublishs = (date, dateString) => {
if(dateString===""){
this.setState({
@ -207,18 +218,20 @@ class CoursesNew extends Component {
// this.goback()
window.location.href=first_category_url;
var yslGuideone = window.localStorage.getItem('yslGuideone');
try {
if(yslGuideone=== null){
window.localStorage.setItem('yslGuideone', "true");
return
}
if(yslGuideone=== undefined){
window.localStorage.setItem('yslGuideone', "true");
return
}
}catch (e) {
if(this.state.boolxinjian===true) {
var yslGuideone = window.localStorage.getItem('yslGuideone');
try {
if (yslGuideone === null) {
window.localStorage.setItem('yslGuideone', "true");
return
}
if (yslGuideone === undefined) {
window.localStorage.setItem('yslGuideone', "true");
return
}
} catch (e) {
}
}
}
@ -265,19 +278,23 @@ class CoursesNew extends Component {
if (response.status === 200) {
// this.goback
window.location.href=response.data.first_category_url;
var yslGuideone = window.localStorage.getItem('yslGuideone');
try {
if(yslGuideone=== null){
window.localStorage.setItem('yslGuideone', "true");
return
}
if(yslGuideone=== undefined){
window.localStorage.setItem('yslGuideone', "true");
return
}
}catch (e) {
if(this.state.boolxinjian===true){
var yslGuideone = window.localStorage.getItem('yslGuideone');
try {
if(yslGuideone=== null){
window.localStorage.setItem('yslGuideone', "true");
return
}
if(yslGuideone=== undefined){
window.localStorage.setItem('yslGuideone', "true");
return
}
}catch (e) {
}
}
}
}
}).catch((error) => {
console.log(error)

@ -6,7 +6,9 @@ import guihome2 from "../../../images/guideimg/guihome2.jpg";
import guihome3 from "../../../images/guideimg/guihome3.jpg";
import guihome4 from "../../../images/guideimg/guihome4.jpg";
import guihome5 from "../../../images/guideimg/guihome5.jpg";
import guihome6 from "../../../images/guideimg/guihome6.jpg";
import guihome6 from "../../../images/guideimg/guihome6.jpg";
// import guihome6 from "../../../images/guideimg/guihome6.png";
// import guihome7 from "../../../images/guideimg/guihome7.png";
class Guide extends Component {
@ -123,6 +125,7 @@ class Guide extends Component {
page===6?
<div className="guide-content">
<img className={mywidth===1?"ysldiv61024":mywidth===2?"ysldiv61280":mywidth===3?"ysldiv61440":mywidth===4?"ysldiv61680":mywidth===5?"ysldiv61900":mywidth===6?"ysldiv61366":mywidth===7?"ysldiv61600":"ysldiv61900"} src={guihome6} onClick={(i)=>this.thissetPage(7)}/>
{/*<img className={mywidth===1?"ysldiv71024":mywidth===2?"ysldiv71280":mywidth===3?"ysldiv71440":mywidth===4?"ysldiv71680":mywidth===5?"ysldiv71900":mywidth===6?"ysldiv71366":mywidth===7?"ysldiv71600":"ysldiv71900"} src={guihome7} onClick={(i)=>this.thissetPage(7)}/>*/}
</div>
:
""

@ -470,4 +470,49 @@
margin-left: 27%;
margin-right: 0;
height: 40%;
}
.ysldiv71900{
margin-top: 16%;
margin-left: 34%;
margin-right: 19%
}
.ysldiv71680{
margin-top: 18%;
margin-left: 31%;
margin-right: 14%;
}
.ysldiv71600{
margin-top: 19%;
margin-left: 30%;
margin-right: 12%;
}
.ysldiv71440{
margin-top: 21%;
margin-left: 28%;
margin-right: 8%;
}
.ysldiv71280{
margin-top: 24%;
margin-left: 25%;
margin-right: 3%;
height: 53%;
}
.ysldiv71366{
margin-top: 22%;
margin-left: 26%;
margin-right: 6%;
height: 53%;
}
.ysldiv71024{
margin-top: 31%;
margin-left: 27%;
margin-right: 0;
height: 40%;
}
Loading…
Cancel
Save