From aa66bd1f812562aa09df826ff0abf07f10fca6b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Thu, 8 Aug 2019 14:28:36 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=87=E5=BC=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/ListPageIndex.js | 22 +++----
.../modules/courses/shixunHomework/Guide.js | 38 +++++++----
.../modules/courses/shixunHomework/guide.css | 65 ++++++++++++++++++-
3 files changed, 100 insertions(+), 25 deletions(-)
diff --git a/public/react/src/modules/courses/ListPageIndex.js b/public/react/src/modules/courses/ListPageIndex.js
index 9f12f6434..f2dd74fd9 100644
--- a/public/react/src/modules/courses/ListPageIndex.js
+++ b/public/react/src/modules/courses/ListPageIndex.js
@@ -104,17 +104,17 @@ class ListPageIndex extends Component{
{/*头部banner*/}
- {/*{yslGuideone===null||yslGuideone===undefined||yslGuideone===false?*/}
- {/* (*/}
- {/* this.props.isAdmin()===true?*/}
- {/* this.setwindowlocal(b)}*/}
- {/* >*/}
- {/* */}
- {/* :""*/}
- {/* )*/}
- {/* :""*/}
- {/*}*/}
+ {yslGuideone===null||yslGuideone===undefined||yslGuideone===false?
+ (
+ this.props.isAdmin()===true?
+ this.setwindowlocal(b)}
+ >
+
+ :""
+ )
+ :""
+ }
diff --git a/public/react/src/modules/courses/shixunHomework/Guide.js b/public/react/src/modules/courses/shixunHomework/Guide.js
index a4ca9b373..d501b2ab5 100644
--- a/public/react/src/modules/courses/shixunHomework/Guide.js
+++ b/public/react/src/modules/courses/shixunHomework/Guide.js
@@ -21,21 +21,32 @@ class Guide extends Component {
}
componentDidMount() {
+ // 1366x768
+ // var mywidthone=7;
- var mywidthone=0;
+ var mywidthone=0;
if(window.screen.width===1024){
mywidthone=1;
}
- if(window.screen.width===1280){
+ else if(window.screen.width===1280){
mywidthone=2;
}
- if(window.screen.width===1440){
+ else if(window.screen.width===1440){
mywidthone=3;
}
- if(window.screen.width===1680){
+ else if(window.screen.width===1680){
mywidthone=4;
}
- if(window.screen.width===1920){
+ else if(window.screen.width===1920){
+ mywidthone=5;
+ }
+ else if(window.screen.width===1366){
+ mywidthone=6;
+ }
+ else if(window.screen.width===1600){
+ mywidthone=7;
+ }
+ else{
mywidthone=5;
}
this.setState({
@@ -54,8 +65,9 @@ class Guide extends Component {
render() {
let {page,mywidth}=this.state;
// console.log("屏幕宽度");
- // console.log(window.screen.width);
- // console.log(mywidth);
+ console.log(window.screen.width);
+ console.log(mywidth);
+
return (