Browse Source

除了首页之外,全部修改完成

FANGLH 6 years ago
parent
commit
777bcc9531
36 changed files with 113 additions and 59 deletions
  1. 5 2
      frontend/wechat-web/src/components/PhonesItem.jsx
  2. 2 2
      frontend/wechat-web/src/index.css
  3. 2 1
      frontend/wechat-web/src/modules/hiPages/access-notice/AccessNotice.css
  4. 3 1
      frontend/wechat-web/src/modules/hiPages/approvel-detail/ApprovelDetail.css
  5. 74 42
      frontend/wechat-web/src/modules/home/HomePage.jsx
  6. 2 1
      frontend/wechat-web/src/modules/homework/AssignmentDetailPage.css
  7. 1 1
      frontend/wechat-web/src/modules/phonesBook/PhonesSelect.jsx
  8. 23 8
      frontend/wechat-web/src/style/css/home-page.css
  9. 1 1
      frontend/wechat-web/src/style/css/phones.css
  10. BIN
      frontend/wechat-web/src/style/imgs/BG1.png
  11. BIN
      frontend/wechat-web/src/style/imgs/BG2.png
  12. BIN
      frontend/wechat-web/src/style/imgs/BG4.png
  13. BIN
      frontend/wechat-web/src/style/imgs/ic_business_trip_apply.png
  14. BIN
      frontend/wechat-web/src/style/imgs/ic_campus_card.png
  15. BIN
      frontend/wechat-web/src/style/imgs/ic_class_album.png
  16. BIN
      frontend/wechat-web/src/style/imgs/ic_entry_exit.png
  17. BIN
      frontend/wechat-web/src/style/imgs/ic_homework_release.png
  18. BIN
      frontend/wechat-web/src/style/imgs/ic_leave_apply.png
  19. BIN
      frontend/wechat-web/src/style/imgs/ic_mail_list.png
  20. BIN
      frontend/wechat-web/src/style/imgs/ic_meeting_manage.png
  21. BIN
      frontend/wechat-web/src/style/imgs/ic_my_approval.png
  22. BIN
      frontend/wechat-web/src/style/imgs/ic_notice_announce.png
  23. BIN
      frontend/wechat-web/src/style/imgs/ic_payment_notice.png
  24. BIN
      frontend/wechat-web/src/style/imgs/ic_principal_mailbox.png
  25. BIN
      frontend/wechat-web/src/style/imgs/ic_score_notice.png
  26. BIN
      frontend/wechat-web/src/style/imgs/ic_score_query.png
  27. BIN
      frontend/wechat-web/src/style/imgs/ic_student_leave.png
  28. BIN
      frontend/wechat-web/src/style/imgs/ic_supply_apply.png
  29. BIN
      frontend/wechat-web/src/style/imgs/ic_timetable_query.png
  30. BIN
      frontend/wechat-web/src/style/imgs/ic_vote_helper.png
  31. BIN
      frontend/wechat-web/src/style/imgs/ic_wonder_moment.png
  32. BIN
      frontend/wechat-web/src/style/imgs/icon_home_change.png
  33. BIN
      frontend/wechat-web/src/style/imgs/leave_img.png
  34. BIN
      frontend/wechat-web/src/style/imgs/phone_icon.png
  35. BIN
      frontend/wechat-web/src/style/imgs/res_img.png
  36. BIN
      frontend/wechat-web/src/style/imgs/trip_img.png

+ 5 - 2
frontend/wechat-web/src/components/PhonesItem.jsx

@@ -9,6 +9,7 @@ import {Icon, Avatar} from 'antd'
 import 'css/phones.css'
 import {isObjEmpty} from "../utils/common";
 import {Modal} from 'antd-mobile'
+import phone_img from '../style/imgs/phone_icon.png';
 
 const {alert} = Modal
 
@@ -43,11 +44,13 @@ export default class PhonesItem extends Component {
                             phonesBean.phone.length <= 1 ?
                                 <a href={'tel:' + phonesBean.phone[0]} style={{display: 'flex', alignItems: 'center'}}>
                                     <div className='phones-item-phone'>{phonesBean.phone[0]}</div>
-                                    <Icon type="phone" theme="filled"/>
+                                    <span style={{widths:10,background:'#FFFFFF',color:'#FFFFFF'}}>22</span>
+                                    <img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/>
                                 </a> :
                                 <div style={{display: 'flex', alignItems: 'center'}} onClick={this.onPhoneSelect}>
                                     <div className='phones-item-phone'>{phonesBean.phone[0]}</div>
-                                    <Icon type="phone" theme="filled"/>
+                                    <span style={{widths:10,background:'#FFFFFF',color:'#FFFFFF'}}>22</span>
+                                    <img style={{height:14,height:14,marginLeft:10}} src={phone_img} alt=""/>
                                 </div>)}
                     </div>
 

+ 2 - 2
frontend/wechat-web/src/index.css

@@ -301,8 +301,8 @@ span.ant-select-selection.ant-select-selection--multiple {
     height: 100%;
     background: white;
     font-family: PingFangSC-Regular;
-    font-size: 14px;
-    color: #ACACAC;
+    font-size: 15px;
+    color:#8C8C8C;
     display: flex;
     align-items: center;
     padding-left: 16px;

+ 2 - 1
frontend/wechat-web/src/modules/hiPages/access-notice/AccessNotice.css

@@ -15,7 +15,8 @@
     border-radius: 10px;
 }
 .an_contain{
-    font-family: PingFangSC-Regular;letter-spacing: 2.5px; background: #6A879F;height: 100vh;opacity: 0.6;
+    font-family: PingFangSC-Regular;letter-spacing: 2.5px; background-image: url("../../../style/imgs/BG1.png");
+    background-size: 100% 100%;height: 100vh;
 }
 .item_in_out{
     width: 36px;height: 36px;border-radius: 50%;font-size: 12px;color: #FFF;text-align: center;

+ 3 - 1
frontend/wechat-web/src/modules/hiPages/approvel-detail/ApprovelDetail.css

@@ -1,6 +1,8 @@
 .comhline_sty {background-color:#F2F2F2;width:100%;height:10px}
 .comhline_sty1{background-color:#F2F2F2;width:100%;height:1px;}
-.headerDiv{display: flex;flex-direction: row;height: 75px;width: 100%;  background: #CAE8DA;opacity: 0.7;}
+.headerDiv{display: flex;flex-direction: row;height: 75px;width: 100%;
+    background-image: url("../../../style/imgs/BG4.png");
+    background-size: 100% 100%;opacity: 0.7;}
 .headerImg{height: 45px;width: 45px;border-radius: 25px;margin: 10px 20px;  }
 .timeList_sty{height: auto;display: flex;flex-direction: row;}
 .out_in{height: 45px;width: 45px;padding-top: 0px;border: none;}

+ 74 - 42
frontend/wechat-web/src/modules/home/HomePage.jsx

@@ -23,6 +23,7 @@ import icon_home_change from "../../style/imgs/icon_home_change.png";
 
 const operation = Modal.operation;
 
+
 class HomePage extends Component {
 
     constructor() {
@@ -121,13 +122,14 @@ class HomePage extends Component {
         return (
             <div className='home-page-root'>
                 <div className='home-top-layout-root'>
-                    {this.userInfoLayout()}
                     <div className='home-student-layout-root'>
                         {studentList}
                     </div>
-                    <div className='home-top-menu-root'>
-                        {this.getTopMenus()}
-                    </div>
+                    {this.userInfoLayout()}
+                    <div className="white_san_jiao"></div>
+                </div>
+                <div className='home-top-menu-root'>
+                    {this.getTopMenus()}
                 </div>
                 {/*功能菜单*/}
                 {userInfo.userRole == 1 ? this.getParentMenu() : this.getTeacherMenu()}
@@ -265,25 +267,25 @@ class HomePage extends Component {
         operation([
             {
                 text: '家长', onPress: () => {
-                    if (this.props.userInfo.userRole === 2) {
-                        Toast.loading('身份切换中...', 0)
-                        setTimeout(() => {
-                            Toast.success('切换成功!', 1)
-                            switchCurrentUser(1)()
-                        }, 400)
-                    }
+                if (this.props.userInfo.userRole === 2) {
+                    Toast.loading('身份切换中...', 0)
+                    setTimeout(() => {
+                        Toast.success('切换成功!', 1)
+                        switchCurrentUser(1)()
+                    }, 400)
                 }
+            }
             },
             {
                 text: '教师', onPress: () => {
-                    if (this.props.userInfo.userRole === 1) {
-                        Toast.loading('身份切换中...', 0)
-                        setTimeout(() => {
-                            Toast.success('切换成功!', 1)
-                            switchCurrentUser(2)()
-                        }, 400)
-                    }
+                if (this.props.userInfo.userRole === 1) {
+                    Toast.loading('身份切换中...', 0)
+                    setTimeout(() => {
+                        Toast.success('切换成功!', 1)
+                        switchCurrentUser(2)()
+                    }, 400)
                 }
+            }
             },
         ])
     }
@@ -302,24 +304,31 @@ class HomePage extends Component {
                 userName = userInfo.teacher.teacherName
             }
         }
+
         return (
             <div>
-                <div className='home-top-school-text'>{schoolName}</div>
-                <div className='home-top-msg-root'>
-                    {isObjEmpty(userInfo.userAvatar) ?
-                        <Avatar size={50} icon='user'/> :
-                        <img
-                            src={userInfo.userAvatar}
-                            width={50} height={50} className="img-circle"
-                            style={{border: '3px solid #ffffff'}}/>
-                    }
-                    <span
-                        className='home-top-msg-text'>尊敬的{userName + (userInfo.userRole === 1 ? '家长' : '老师')}</span>
-                    {(userInfo.teacher && userInfo.parent) ?
-                        <img style={{marginLeft: "5px"}} src={icon_home_change} width={16}
-                             height={16} onClick={this.onIdentitySwitch}/> : ''}
-
+                <div className='home-top-school-text'> {(userInfo.teacher && userInfo.parent) ?
+                    <img style={{marginLeft: "5px"}} src={icon_home_change} width={16}
+                         height={16} onClick={this.onIdentitySwitch}/> : ''}
                 </div>
+                {
+                    userInfo.userRole === 1 ?
+                        <div className='home-student-layout-root' style={{display:'flex',flexDirection:'column'}}>
+                            <div  className='home-top-msg-text'>{userName +' | ' + schoolName}</div>
+                        </div>
+                        :
+                        <div className='home-top-msg-root' style={{paddingBottom:10}}>
+                            {isObjEmpty(userInfo.userAvatar) ?
+                                <Avatar size={42} icon='user'/> :
+                                <img
+                                    src={userInfo.userAvatar}
+                                    width={42} height={42} className="img-circle"
+                                    style={{border: '3px solid #ffffff'}}/>
+                            }
+                            <span
+                                className='home-top-msg-text'>{userName +' | ' + schoolName}</span>
+                        </div>
+                }
             </div>
         )
     }
@@ -401,6 +410,26 @@ class HomePage extends Component {
     }
 
     onStuSwitch = (stuIndex) => {
+        console.log("onStuSwitch",stuIndex)
+
+       /* if(stuIndex == 0){
+            return
+        }else {
+            const studentList =  this.props.userInfo.parent.students
+            var centerStu = studentList[stuIndex]
+            switchUser({
+                parent:{
+                    ...this.props.userInfo.parent,
+                    students:studentList,
+                    student:centerStu
+                },
+                user:{
+                    ...this.props.userInfo.parent,
+                    students:studentList,
+                    student:centerStu
+                }
+            })()
+        }*/
         if (this.state.studentIndex !== stuIndex) {
             Toast.loading('学生切换中...', 0)
             setTimeout(() => {
@@ -478,7 +507,7 @@ class MenuGroup extends Component {
     render() {
         return (
             <div className='home-group-item-layout'>
-                <img className='home-group-item-icon' src={this.props.groupIcon}/>
+                {/*<img className='home-group-item-icon' src={this.props.groupIcon}/>*/}
                 <span className='home-group-item-text'>{this.props.groupText}</span>
             </div>
         )
@@ -513,15 +542,18 @@ class StuItem extends Component {
         return (
             <div onClick={this.onStuSwitch} className='home-top-stu-layout'>
                 {this.props.stuObj.stuPhoto ?
-                    <img className={this.props.isSelect ? 'border-radius-50-blue' : 'border-radius-50'}
+                    <img className={this.props.isSelect ? 'student_select_img' : 'student_noselect_img'}
                          src={_baseURL + this.props.stuObj.stuPhoto}
-                         width={25} height={25}/> :
-                    <Avatar className={this.props.isSelect ? 'border-radius-50-blue' : 'border-radius-50'}
-                            size={23} icon='user'/>}
-
-                <span
-                    className={this.props.isSelect ? "margin_left_5 color_blue text_bold"
-                        : 'margin_left_5'}>{this.props.stuObj.stuName}</span>
+                    /> :
+                    this.props.isSelect ?
+                        <Avatar className={this.props.isSelect ? 'border-radius-50-blue' : 'border-radius-50'}
+                                size={42} icon='user'/> :
+                        <Avatar className={this.props.isSelect ? 'border-radius-50-blue' : 'border-radius-50'}
+                                size={30} icon='user'/>
+                }
+                {/*<span*/}
+                    {/*className={this.props.isSelect ? "margin_left_5 color_blue text_bold"*/}
+                        {/*: 'margin_left_5'}>{this.props.stuObj.stuName}</span>*/}
             </div>
         );
     }

+ 2 - 1
frontend/wechat-web/src/modules/homework/AssignmentDetailPage.css

@@ -12,8 +12,9 @@
 }
 
 .homework-detail-top-layout {
-    background: #E7EDF6;
     padding: 12px 18px;
+    background-image: url("../../style/imgs/BG4.png");
+    background-size: 100% 100%;
 }
 
 .homework-detail-top-name {

+ 1 - 1
frontend/wechat-web/src/modules/phonesBook/PhonesSelect.jsx

@@ -114,7 +114,7 @@ class PhonesSelect extends Component {
             <div className='phone-select-root'>
                 <div className='gray-line'></div>
                 <div className='identity-select'>
-                    <div className={selectIndex == 0 ?
+                    <div style={{fontSize:15}} className={selectIndex == 0 ?
                         'identity-item-select' : 'identity-item-normal'}
                          onClick={this.onTeacherClick}>老师
                     </div>

+ 23 - 8
frontend/wechat-web/src/style/css/home-page.css

@@ -18,9 +18,10 @@
 .home-group-item-text {
     font-family: PingFangSC-Regular;
     font-size: 15px;
-    color: #888888;
+    color: #000000;
     letter-spacing: 2px;
     padding-left: 6px;
+    font-weight: bold;
 }
 
 .home-func-item-root {
@@ -48,10 +49,18 @@
     letter-spacing: 1.6px;
     padding-top: 6px;
 }
-
+.white_san_jiao{
+    width:0;
+    height:0;
+    border-width:0 10px 10px;
+    border-style:solid;
+    border-color:transparent transparent #ffffff;/*透明 透明  灰*/
+    margin: 5px 35px;
+}
 .home-top-layout-root {
     position: relative;
-    background-image: linear-gradient(-180deg, #91CBE6 0%, #FFFFFF 100%, #1686FB 100%);
+    background-image: url("../../style/imgs/BG2.png");
+    background-size: 100% 100%;
 }
 
 .home-top-msg-root {
@@ -64,8 +73,8 @@
 
 .home-top-msg-text {
     font-family: PingFangSC-Regular;
-    font-size: 15px;
-    color: #000000;
+    font-size: 14px;
+    color: #ffffff;
     letter-spacing: 2px;
     padding-left: 6px;
 }
@@ -92,8 +101,8 @@
 
 .home-top-menu-text {
     font-family: PingFangSC-Regular;
-    font-size: 14px;
-    color: #333333;
+    font-size: 13px;
+    color: #666666;
     letter-spacing: 1.87px;
     padding-left: 4px;
 }
@@ -106,7 +115,7 @@
 }
 
 .home-top-school-text {
-    background: rgba(256, 256, 256, 0.4);
+
     border-radius: 2px;
     font-family: PingFangSC-Regular;
     font-size: 12px;
@@ -164,4 +173,10 @@
     background-size: cover;
     overflow: hidden;
 }
+.student_select_img{
+    width: 42px;height: 42px;border:1px #ffffff solid;border-radius: 30px;
+}
 
+.student_noselect_img{
+    width: 30px;height: 30px;border:1px #ffffff solid;border-radius: 30px;
+}

+ 1 - 1
frontend/wechat-web/src/style/css/phones.css

@@ -63,7 +63,7 @@
 .phones-item-phone {
     width: 100px;
     font-family: PingFangSC-Regular;
-    font-size: 14px;
+    font-size: 15px;
     color: #666666;
     letter-spacing: 1.38px;
     text-align: right;

BIN
frontend/wechat-web/src/style/imgs/BG1.png


BIN
frontend/wechat-web/src/style/imgs/BG2.png


BIN
frontend/wechat-web/src/style/imgs/BG4.png


BIN
frontend/wechat-web/src/style/imgs/ic_business_trip_apply.png


BIN
frontend/wechat-web/src/style/imgs/ic_campus_card.png


BIN
frontend/wechat-web/src/style/imgs/ic_class_album.png


BIN
frontend/wechat-web/src/style/imgs/ic_entry_exit.png


BIN
frontend/wechat-web/src/style/imgs/ic_homework_release.png


BIN
frontend/wechat-web/src/style/imgs/ic_leave_apply.png


BIN
frontend/wechat-web/src/style/imgs/ic_mail_list.png


BIN
frontend/wechat-web/src/style/imgs/ic_meeting_manage.png


BIN
frontend/wechat-web/src/style/imgs/ic_my_approval.png


BIN
frontend/wechat-web/src/style/imgs/ic_notice_announce.png


BIN
frontend/wechat-web/src/style/imgs/ic_payment_notice.png


BIN
frontend/wechat-web/src/style/imgs/ic_principal_mailbox.png


BIN
frontend/wechat-web/src/style/imgs/ic_score_notice.png


BIN
frontend/wechat-web/src/style/imgs/ic_score_query.png


BIN
frontend/wechat-web/src/style/imgs/ic_student_leave.png


BIN
frontend/wechat-web/src/style/imgs/ic_supply_apply.png


BIN
frontend/wechat-web/src/style/imgs/ic_timetable_query.png


BIN
frontend/wechat-web/src/style/imgs/ic_vote_helper.png


BIN
frontend/wechat-web/src/style/imgs/ic_wonder_moment.png


BIN
frontend/wechat-web/src/style/imgs/icon_home_change.png


BIN
frontend/wechat-web/src/style/imgs/leave_img.png


BIN
frontend/wechat-web/src/style/imgs/phone_icon.png


BIN
frontend/wechat-web/src/style/imgs/res_img.png


BIN
frontend/wechat-web/src/style/imgs/trip_img.png