正在显示
10 个修改的文件
包含
803 行增加
和
438 行删除
@@ -800,12 +800,12 @@ body{ | @@ -800,12 +800,12 @@ body{ | ||
800 | border:none; | 800 | border:none; |
801 | outline: none; | 801 | outline: none; |
802 | padding-left:10px; | 802 | padding-left:10px; |
803 | - width: 165px; | 803 | + width: 160px; |
804 | } | 804 | } |
805 | .liveInfoRightInputBtn{ | 805 | .liveInfoRightInputBtn{ |
806 | width:18px; | 806 | width:18px; |
807 | height:18px; | 807 | height:18px; |
808 | - | 808 | + margin: 5px 0 5px 5px; |
809 | cursor: pointer; | 809 | cursor: pointer; |
810 | } | 810 | } |
811 | .liveInfoCenter{ | 811 | .liveInfoCenter{ |
@@ -899,6 +899,7 @@ body{ | @@ -899,6 +899,7 @@ body{ | ||
899 | } | 899 | } |
900 | .classHandlePort1{ | 900 | .classHandlePort1{ |
901 | margin: 0 12px; | 901 | margin: 0 12px; |
902 | + cursor: default; | ||
902 | } | 903 | } |
903 | .classHandlerPageMsg{ | 904 | .classHandlerPageMsg{ |
904 | font-size: 12px; | 905 | font-size: 12px; |
@@ -1803,7 +1804,7 @@ body{ | @@ -1803,7 +1804,7 @@ body{ | ||
1803 | .courseMinuteList{ | 1804 | .courseMinuteList{ |
1804 | float: left; | 1805 | float: left; |
1805 | margin-top:8px; | 1806 | margin-top:8px; |
1806 | - height:400px; | 1807 | + height:auto; |
1807 | } | 1808 | } |
1808 | .courseMinuteListTimeTit{ | 1809 | .courseMinuteListTimeTit{ |
1809 | height:60px; | 1810 | height:60px; |
@@ -581,36 +581,100 @@ | @@ -581,36 +581,100 @@ | ||
581 | </div> | 581 | </div> |
582 | <div class="classManagementRightContent" id="courseContent3"> | 582 | <div class="classManagementRightContent" id="courseContent3"> |
583 | </div> | 583 | </div> |
584 | - <div class="classHandlerPageBox" id="classHandlerPageBox3"> | ||
585 | - <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
586 | - <tbody> | ||
587 | - <tr> | ||
588 | - <td height="60" colspan="11" class="tr_bottom" style=""> | ||
589 | - <span class="classHandlerPageMsg" id="classHandlerPageMsg3" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
590 | - <ul class="classHandlerPageInfoBox"> | ||
591 | - <li class="classHandlerPageInfo"> | ||
592 | - <span class="classHandlerHomePage" id="classHandlerHomePage3">首页</span> | ||
593 | - </li> | ||
594 | - <li class="classHandlerPageInfo"> | ||
595 | - <span class="classHandlerUpPage" id="classHandlerUpPage3">上一页</span> | ||
596 | - </li> | ||
597 | - <li class="classHandlerPageInfo"> | ||
598 | - <span class="classHandlerDownPage" id="classHandlerDownPage3">下一页</span> | ||
599 | - </li> | ||
600 | - <li class="classHandlerPageInfo"> | ||
601 | - <span class="classHandlerEndPage" id="classHandlerEndPage3">尾页</span> | ||
602 | - </li> | ||
603 | - <li class="classHandlerPageInfo"> | ||
604 | - <input id="classHandlerPageInfoInput3" class="classHandlerPageInfoInput" type="text"> | ||
605 | - </li> | ||
606 | - <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
607 | - <span id="classHandlerSpecificPage3">GO</span> | ||
608 | - </li> | ||
609 | - </ul> | ||
610 | - </td> | ||
611 | - </tr> | ||
612 | - </tbody> | ||
613 | - </table> | 584 | + <div id="classHandlerPageBox3"> |
585 | + <div class="classHandlerPageBox" id="classHandlerPageBox3_0"> | ||
586 | + <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
587 | + <tbody> | ||
588 | + <tr> | ||
589 | + <td height="60" colspan="11" class="tr_bottom" style=""> | ||
590 | + <span class="classHandlerPageMsg" id="classHandlerPageMsg3_0" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
591 | + <ul class="classHandlerPageInfoBox"> | ||
592 | + <li class="classHandlerPageInfo"> | ||
593 | + <span class="classHandlerHomePage" id="classHandlerHomePage3_0">首页</span> | ||
594 | + </li> | ||
595 | + <li class="classHandlerPageInfo"> | ||
596 | + <span class="classHandlerUpPage" id="classHandlerUpPage3_0">上一页</span> | ||
597 | + </li> | ||
598 | + <li class="classHandlerPageInfo"> | ||
599 | + <span class="classHandlerDownPage" id="classHandlerDownPage3_0">下一页</span> | ||
600 | + </li> | ||
601 | + <li class="classHandlerPageInfo"> | ||
602 | + <span class="classHandlerEndPage" id="classHandlerEndPage3_0">尾页</span> | ||
603 | + </li> | ||
604 | + <li class="classHandlerPageInfo"> | ||
605 | + <input id="classHandlerPageInfoInput3_0" class="classHandlerPageInfoInput" type="text"> | ||
606 | + </li> | ||
607 | + <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
608 | + <span id="classHandlerSpecificPage3_0">GO</span> | ||
609 | + </li> | ||
610 | + </ul> | ||
611 | + </td> | ||
612 | + </tr> | ||
613 | + </tbody> | ||
614 | + </table> | ||
615 | + </div> | ||
616 | + <div class="classHandlerPageBox" id="classHandlerPageBox3_1"> | ||
617 | + <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
618 | + <tbody> | ||
619 | + <tr> | ||
620 | + <td height="60" colspan="11" class="tr_bottom" style=""> | ||
621 | + <span class="classHandlerPageMsg" id="classHandlerPageMsg3_1" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
622 | + <ul class="classHandlerPageInfoBox"> | ||
623 | + <li class="classHandlerPageInfo"> | ||
624 | + <span class="classHandlerHomePage" id="classHandlerHomePage3_1">首页</span> | ||
625 | + </li> | ||
626 | + <li class="classHandlerPageInfo"> | ||
627 | + <span class="classHandlerUpPage" id="classHandlerUpPage3_1">上一页</span> | ||
628 | + </li> | ||
629 | + <li class="classHandlerPageInfo"> | ||
630 | + <span class="classHandlerDownPage" id="classHandlerDownPage3_1">下一页</span> | ||
631 | + </li> | ||
632 | + <li class="classHandlerPageInfo"> | ||
633 | + <span class="classHandlerEndPage" id="classHandlerEndPage3_1">尾页</span> | ||
634 | + </li> | ||
635 | + <li class="classHandlerPageInfo"> | ||
636 | + <input id="classHandlerPageInfoInput3_1" class="classHandlerPageInfoInput" type="text"> | ||
637 | + </li> | ||
638 | + <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
639 | + <span id="classHandlerSpecificPage3_1">GO</span> | ||
640 | + </li> | ||
641 | + </ul> | ||
642 | + </td> | ||
643 | + </tr> | ||
644 | + </tbody> | ||
645 | + </table> | ||
646 | + </div> | ||
647 | + <div class="classHandlerPageBox" id="classHandlerPageBox3_2"> | ||
648 | + <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
649 | + <tbody> | ||
650 | + <tr> | ||
651 | + <td height="60" colspan="11" class="tr_bottom" style=""> | ||
652 | + <span class="classHandlerPageMsg" id="classHandlerPageMsg3_2" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
653 | + <ul class="classHandlerPageInfoBox"> | ||
654 | + <li class="classHandlerPageInfo"> | ||
655 | + <span class="classHandlerHomePage" id="classHandlerHomePage3_2">首页</span> | ||
656 | + </li> | ||
657 | + <li class="classHandlerPageInfo"> | ||
658 | + <span class="classHandlerUpPage" id="classHandlerUpPage3_2">上一页</span> | ||
659 | + </li> | ||
660 | + <li class="classHandlerPageInfo"> | ||
661 | + <span class="classHandlerDownPage" id="classHandlerDownPage3_2">下一页</span> | ||
662 | + </li> | ||
663 | + <li class="classHandlerPageInfo"> | ||
664 | + <span class="classHandlerEndPage" id="classHandlerEndPage3_2">尾页</span> | ||
665 | + </li> | ||
666 | + <li class="classHandlerPageInfo"> | ||
667 | + <input id="classHandlerPageInfoInput3_2" class="classHandlerPageInfoInput" type="text"> | ||
668 | + </li> | ||
669 | + <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
670 | + <span id="classHandlerSpecificPage3_2">GO</span> | ||
671 | + </li> | ||
672 | + </ul> | ||
673 | + </td> | ||
674 | + </tr> | ||
675 | + </tbody> | ||
676 | + </table> | ||
677 | + </div> | ||
614 | </div> | 678 | </div> |
615 | </div> | 679 | </div> |
616 | <div class="classManagementRight" id="classManagementRight4"> | 680 | <div class="classManagementRight" id="classManagementRight4"> |
@@ -626,36 +690,69 @@ | @@ -626,36 +690,69 @@ | ||
626 | </div> | 690 | </div> |
627 | <div class="classManagementRightContent classManagementRightContent0" id="courseContent4"> | 691 | <div class="classManagementRightContent classManagementRightContent0" id="courseContent4"> |
628 | </div> | 692 | </div> |
629 | - <div class="classHandlerPageBox" id="classHandlerPageBox4"> | ||
630 | - <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
631 | - <tbody> | ||
632 | - <tr> | ||
633 | - <td height="60" colspan="11" class="tr_bottom" style=""> | ||
634 | - <span class="classHandlerPageMsg" id="classHandlerPageMsg4" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
635 | - <ul class="classHandlerPageInfoBox"> | ||
636 | - <li class="classHandlerPageInfo"> | ||
637 | - <span class="classHandlerHomePage" id="classHandlerHomePage4">首页</span> | ||
638 | - </li> | ||
639 | - <li class="classHandlerPageInfo"> | ||
640 | - <span class="classHandlerUpPage" id="classHandlerUpPage4">上一页</span> | ||
641 | - </li> | ||
642 | - <li class="classHandlerPageInfo"> | ||
643 | - <span class="classHandlerDownPage" id="classHandlerDownPage4">下一页</span> | ||
644 | - </li> | ||
645 | - <li class="classHandlerPageInfo"> | ||
646 | - <span class="classHandlerEndPage" id="classHandlerEndPage4">尾页</span> | ||
647 | - </li> | ||
648 | - <li class="classHandlerPageInfo"> | ||
649 | - <input id="classHandlerPageInfoInput4" class="classHandlerPageInfoInput" type="text"> | ||
650 | - </li> | ||
651 | - <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
652 | - <span id="classHandlerSpecificPage4">GO</span> | ||
653 | - </li> | ||
654 | - </ul> | ||
655 | - </td> | ||
656 | - </tr> | ||
657 | - </tbody> | ||
658 | - </table> | 693 | + <div id="classHandlerPageBox4"> |
694 | + <div class="classHandlerPageBox" id="classHandlerPageBox4_0"> | ||
695 | + <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
696 | + <tbody> | ||
697 | + <tr> | ||
698 | + <td height="60" colspan="11" class="tr_bottom" style=""> | ||
699 | + <span class="classHandlerPageMsg" id="classHandlerPageMsg4_0" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
700 | + <ul class="classHandlerPageInfoBox"> | ||
701 | + <li class="classHandlerPageInfo"> | ||
702 | + <span class="classHandlerHomePage" id="classHandlerHomePage4_0">首页</span> | ||
703 | + </li> | ||
704 | + <li class="classHandlerPageInfo"> | ||
705 | + <span class="classHandlerUpPage" id="classHandlerUpPage4_0">上一页</span> | ||
706 | + </li> | ||
707 | + <li class="classHandlerPageInfo"> | ||
708 | + <span class="classHandlerDownPage" id="classHandlerDownPage4_0">下一页</span> | ||
709 | + </li> | ||
710 | + <li class="classHandlerPageInfo"> | ||
711 | + <span class="classHandlerEndPage" id="classHandlerEndPage4_0">尾页</span> | ||
712 | + </li> | ||
713 | + <li class="classHandlerPageInfo"> | ||
714 | + <input id="classHandlerPageInfoInput4_0" class="classHandlerPageInfoInput" type="text"> | ||
715 | + </li> | ||
716 | + <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
717 | + <span id="classHandlerSpecificPage4_0">GO</span> | ||
718 | + </li> | ||
719 | + </ul> | ||
720 | + </td> | ||
721 | + </tr> | ||
722 | + </tbody> | ||
723 | + </table> | ||
724 | + </div> | ||
725 | + <div class="classHandlerPageBox" id="classHandlerPageBox4_1"> | ||
726 | + <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> | ||
727 | + <tbody> | ||
728 | + <tr> | ||
729 | + <td height="60" colspan="11" class="tr_bottom" style=""> | ||
730 | + <span class="classHandlerPageMsg" id="classHandlerPageMsg4_1" style="line-height: 38px; padding-left: 20px; float: left">第1页/共2页,有16个记录</span> | ||
731 | + <ul class="classHandlerPageInfoBox"> | ||
732 | + <li class="classHandlerPageInfo"> | ||
733 | + <span class="classHandlerHomePage" id="classHandlerHomePage4_1">首页</span> | ||
734 | + </li> | ||
735 | + <li class="classHandlerPageInfo"> | ||
736 | + <span class="classHandlerUpPage" id="classHandlerUpPage4_1">上一页</span> | ||
737 | + </li> | ||
738 | + <li class="classHandlerPageInfo"> | ||
739 | + <span class="classHandlerDownPage" id="classHandlerDownPage4_1">下一页</span> | ||
740 | + </li> | ||
741 | + <li class="classHandlerPageInfo"> | ||
742 | + <span class="classHandlerEndPage" id="classHandlerEndPage4_1">尾页</span> | ||
743 | + </li> | ||
744 | + <li class="classHandlerPageInfo"> | ||
745 | + <input id="classHandlerPageInfoInput4_1" class="classHandlerPageInfoInput" type="text"> | ||
746 | + </li> | ||
747 | + <li class="classHandlerPageInfo classHandlerPageInfoCheck"> | ||
748 | + <span id="classHandlerSpecificPage4_1">GO</span> | ||
749 | + </li> | ||
750 | + </ul> | ||
751 | + </td> | ||
752 | + </tr> | ||
753 | + </tbody> | ||
754 | + </table> | ||
755 | + </div> | ||
659 | </div> | 756 | </div> |
660 | </div> | 757 | </div> |
661 | <div class="classManagementRight" id="classManagementRight5"> | 758 | <div class="classManagementRight" id="classManagementRight5"> |
@@ -1953,8 +2050,8 @@ | @@ -1953,8 +2050,8 @@ | ||
1953 | </div> | 2050 | </div> |
1954 | <div class=""> | 2051 | <div class=""> |
1955 | <select class="createUserRole" name="createUserRole" id="createUserRole"> | 2052 | <select class="createUserRole" name="createUserRole" id="createUserRole"> |
1956 | - <option value="0">老师</option> | ||
1957 | - <option value="1">监课</option> | 2053 | + <option value="1">老师</option> |
2054 | + <option value="2">监课</option> | ||
1958 | </select> | 2055 | </select> |
1959 | </div> | 2056 | </div> |
1960 | <div class="removeHandlerBtn"> | 2057 | <div class="removeHandlerBtn"> |
@@ -36,11 +36,11 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor= | @@ -36,11 +36,11 @@ const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor= | ||
36 | <td width="8%" class="tr_main">{_age}</td> | 36 | <td width="8%" class="tr_main">{_age}</td> |
37 | <td width="8%" class="tr_main">{_course}</td> | 37 | <td width="8%" class="tr_main">{_course}</td> |
38 | <td width="10%" class="tr_main tr_mainRight" align="center" > | 38 | <td width="10%" class="tr_main tr_mainRight" align="center" > |
39 | - <a class="classHandlePort" href="###"> </a> | ||
40 | - <a id="{_removeInd}" class="classHandlePort" href="###">删除</a> | ||
41 | - <a class="classHandlePort" href="###"> </a> | ||
42 | - <a id="{_stay}" class="classHandlePort" data="{_aboutMsg}" href="###">待回访</a> | ||
43 | - <a class="classHandlePort" href="###"> </a> | 39 | + <a class="classHandlePort" href="javascript:void(0)"> </a> |
40 | + <a id="{_removeInd}" class="classHandlePort" href="javascript:void(0)">删除</a> | ||
41 | + <a class="classHandlePort" href="javascript:void(0)"> </a> | ||
42 | + <a id="{_stay}" class="classHandlePort" data="{_aboutMsg}" href="javascript:void(0)">待回访</a> | ||
43 | + <a class="classHandlePort" href="javascript:void(0)"> </a> | ||
44 | </td> | 44 | </td> |
45 | </tr> | 45 | </tr> |
46 | `; | 46 | `; |
@@ -49,13 +49,13 @@ const adminListEnd = `</tbody></table>`; | @@ -49,13 +49,13 @@ const adminListEnd = `</tbody></table>`; | ||
49 | const adminListTit1 = `<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" id="t_box" class="t_box"> | 49 | const adminListTit1 = `<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" id="t_box" class="t_box"> |
50 | <tbody> | 50 | <tbody> |
51 | <tr align="center" height="44" class="tr_center" bgcolor="#fff" bordercolor="#e6e6e6"> | 51 | <tr align="center" height="44" class="tr_center" bgcolor="#fff" bordercolor="#e6e6e6"> |
52 | - <th width="6%" class="tr_center"> | 52 | + <th width="7%" class="tr_center"> |
53 | 姓名 | 53 | 姓名 |
54 | </th> | 54 | </th> |
55 | <th width="7%" class="tr_center"> | 55 | <th width="7%" class="tr_center"> |
56 | 电话 | 56 | 电话 |
57 | </th> | 57 | </th> |
58 | - <th width="8%" class="tr_center"> | 58 | + <th width="6%" class="tr_center"> |
59 | 年龄 | 59 | 年龄 |
60 | </th> | 60 | </th> |
61 | <th width="7%" class="tr_center"> | 61 | <th width="7%" class="tr_center"> |
@@ -69,22 +69,20 @@ const adminListTit1 = `<table width="100%" align="center" cellpadding="0" cellsp | @@ -69,22 +69,20 @@ const adminListTit1 = `<table width="100%" align="center" cellpadding="0" cellsp | ||
69 | //管理首页 | 69 | //管理首页 |
70 | const adminList1 = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6"> | 70 | const adminList1 = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6"> |
71 | <td width="7%" class="tr_main tr_mainLeft">{_userName}</td> | 71 | <td width="7%" class="tr_main tr_mainLeft">{_userName}</td> |
72 | - <td width="8%" class="tr_main">{_phone}</td> | ||
73 | - <td width="8%" class="tr_main">{_age}</td> | ||
74 | - <td width="8%" class="tr_main">{_course}</td> | ||
75 | - <td width="10%" class="tr_main tr_mainRight" align="center" > | ||
76 | - <a class="classHandlePort1" href="###"> </a> | ||
77 | - <a id="{_removeInd}" class="classHandlePort" href="###">删除</a> | ||
78 | - <a class="classHandlePort1" href="###"> </a> | 72 | + <td width="7%" class="tr_main">{_phone}</td> |
73 | + <td width="6%" class="tr_main">{_age}</td> | ||
74 | + <td width="7%" class="tr_main">{_course}</td> | ||
75 | + <td width="9%" class="tr_main tr_mainRight" align="center" > | ||
76 | + <a class="classHandlePort1" href="javascript:void(0)"> </a> | ||
77 | + <a id="{_removeInd}" class="classHandlePort" href="javascript:void(0)">删除</a> | ||
78 | + <a class="classHandlePort1" href="javascript:void(0)"> </a> | ||
79 | </td> | 79 | </td> |
80 | </tr> | 80 | </tr> |
81 | `; | 81 | `; |
82 | class AboutClassApe extends Ape { | 82 | class AboutClassApe extends Ape { |
83 | constructor() { | 83 | constructor() { |
84 | super(); | 84 | super(); |
85 | - this.classDateList = {};//创建课堂信息 | ||
86 | - this.isLocalStorage(); | ||
87 | - this.pageNo = 0; | 85 | + this.pageNo = 1; |
88 | this.presentInd = 1; | 86 | this.presentInd = 1; |
89 | this.addEvent(); | 87 | this.addEvent(); |
90 | this.init(); | 88 | this.init(); |
@@ -93,114 +91,233 @@ class AboutClassApe extends Ape { | @@ -93,114 +91,233 @@ class AboutClassApe extends Ape { | ||
93 | init() { | 91 | init() { |
94 | $('#aboutClassList4 li').on('click',this._userClassListHandler.bind(this));//用户列表 | 92 | $('#aboutClassList4 li').on('click',this._userClassListHandler.bind(this));//用户列表 |
95 | 93 | ||
96 | - $('#classHandlerHomePage4').on('click',this._homePageHandler.bind(this));//首页 | ||
97 | - $('#classHandlerUpPage4').on('click',this._upPageHandler.bind(this));//上页 | ||
98 | - $('#classHandlerDownPage4').on('click',this._downPageHandler.bind(this));//下页 | ||
99 | - $('#classHandlerEndPage4').on('click',this._endPageHandler.bind(this));//尾页 | ||
100 | - $('#classHandlerSpecificPage4').on('click',this._assignPageHandler.bind(this));//指定页 | 94 | + $('#classHandlerHomePage4_0').on('click',this._homePageHandler.bind(this));//首页 |
95 | + $('#classHandlerUpPage4_0').on('click',this._upPageHandler.bind(this));//上页 | ||
96 | + $('#classHandlerDownPage4_0').on('click',this._downPageHandler.bind(this));//下页 | ||
97 | + $('#classHandlerEndPage4_0').on('click',this._endPageHandler.bind(this));//尾页 | ||
98 | + $('#classHandlerSpecificPage4_0').on('click',this._assignPageHandler.bind(this));//指定页 | ||
99 | + | ||
100 | + $('#classHandlerHomePage4_1').on('click',this._homePageHandler.bind(this));//首页 | ||
101 | + $('#classHandlerUpPage4_1').on('click',this._upPageHandler.bind(this));//上页 | ||
102 | + $('#classHandlerDownPage4_1').on('click',this._downPageHandler.bind(this));//下页 | ||
103 | + $('#classHandlerEndPage4_1').on('click',this._endPageHandler.bind(this));//尾页 | ||
104 | + $('#classHandlerSpecificPage4_1').on('click',this._assignPageHandler.bind(this));//指定页 | ||
101 | } | 105 | } |
102 | 106 | ||
103 | addEvent() { | 107 | addEvent() { |
104 | 108 | ||
105 | } | 109 | } |
106 | - isLocalStorage(){ | ||
107 | - | ||
108 | - } | ||
109 | //首页 | 110 | //首页 |
110 | _homePageHandler(){ | 111 | _homePageHandler(){ |
111 | this.presentInd = 1; | 112 | this.presentInd = 1; |
112 | - this.userAdminHandler(this.presentInd); | 113 | + let ind = $('#classHandlerPageBox4').attr('data'); |
114 | + switch (parseInt(ind)){ | ||
115 | + case 0: | ||
116 | + this._manageCourse(this.presentInd); | ||
117 | + break; | ||
118 | + case 1: | ||
119 | + this._manageTeacher(this.presentInd); | ||
120 | + break; | ||
121 | + default: | ||
122 | + return; | ||
123 | + } | ||
113 | } | 124 | } |
114 | //上页 | 125 | //上页 |
115 | _upPageHandler(){ | 126 | _upPageHandler(){ |
116 | - if(this.presentInd >1){ | 127 | + if(this.presentInd > 1){ |
117 | this.presentInd--; | 128 | this.presentInd--; |
118 | - this.userAdminHandler(this.presentInd); | 129 | + let ind = $('#classHandlerPageBox4').attr('data'); |
130 | + switch (parseInt(ind)){ | ||
131 | + case 0: | ||
132 | + this._manageCourse(this.presentInd); | ||
133 | + break; | ||
134 | + case 1: | ||
135 | + this._manageTeacher(this.presentInd); | ||
136 | + break; | ||
137 | + default: | ||
138 | + return; | ||
139 | + } | ||
119 | } | 140 | } |
120 | } | 141 | } |
121 | //下页 | 142 | //下页 |
122 | _downPageHandler(){ | 143 | _downPageHandler(){ |
123 | if(this.presentInd < this.pageNo){ | 144 | if(this.presentInd < this.pageNo){ |
124 | this.presentInd++; | 145 | this.presentInd++; |
125 | - this.userAdminHandler(this.presentInd); | 146 | + let ind = $('#classHandlerPageBox4').attr('data'); |
147 | + switch (parseInt(ind)){ | ||
148 | + case 0: | ||
149 | + this._manageCourse(this.presentInd); | ||
150 | + break; | ||
151 | + case 1: | ||
152 | + this._manageTeacher(this.presentInd); | ||
153 | + break; | ||
154 | + default: | ||
155 | + return; | ||
156 | + } | ||
126 | } | 157 | } |
127 | } | 158 | } |
128 | //尾页 | 159 | //尾页 |
129 | _endPageHandler(){ | 160 | _endPageHandler(){ |
130 | this.presentInd = this.pageNo; | 161 | this.presentInd = this.pageNo; |
131 | - this.userAdminHandler(this.presentInd); | 162 | + let ind = $('#classHandlerPageBox4').attr('data'); |
163 | + switch (parseInt(ind)){ | ||
164 | + case 0: | ||
165 | + this._manageCourse(this.presentInd); | ||
166 | + break; | ||
167 | + case 1: | ||
168 | + this._manageTeacher(this.presentInd); | ||
169 | + break; | ||
170 | + default: | ||
171 | + return; | ||
172 | + } | ||
132 | } | 173 | } |
133 | //指定页 | 174 | //指定页 |
134 | _assignPageHandler(){ | 175 | _assignPageHandler(){ |
135 | - let inputVal = $('#classHandlerPageInfoInput4').val(); | ||
136 | - if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){ | ||
137 | - this.userAdminHandler(parseInt(inputVal)); | 176 | + let val; |
177 | + let ind = $('#classHandlerPageBox4').attr('data'); | ||
178 | + let card = $('#aboutClassList4 .liveInfoLeftLiCheck').index(); | ||
179 | + let inputVal = $('#classHandlerPageInfoInput4_'+card).val(); | ||
180 | + if(parseInt(inputVal) > this.pageNo ){ | ||
181 | + val = this.pageNo; | ||
182 | + }else if(parseInt(inputVal) < 1){ | ||
183 | + val = 1; | ||
184 | + }else{ | ||
185 | + val = parseInt(inputVal) | ||
186 | + } | ||
187 | + switch (parseInt(ind)){ | ||
188 | + case 0: | ||
189 | + this._manageCourse(val); | ||
190 | + break; | ||
191 | + case 1: | ||
192 | + this._manageTeacher(val); | ||
193 | + break; | ||
194 | + default: | ||
195 | + return; | ||
138 | } | 196 | } |
197 | + $('#classHandlerPageInfoInput4_'+card).val('') | ||
139 | } | 198 | } |
140 | // 约课界面 | 199 | // 约课界面 |
141 | - userAdminHandler(ind){ | ||
142 | - let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/queryStudentMeeting/markettest'; | ||
143 | - let that = this; | 200 | + aboutClass(){ |
201 | + let ind = $('#aboutClassList4 .liveInfoLeftLiCheck').attr('data'); | ||
202 | + let card = $('#aboutClassList4 .liveInfoLeftLiCheck').index(); | ||
203 | + $('#classHandlerPageBox4').attr('data',ind) | ||
204 | + let status = parseInt(ind); | ||
205 | + $('#classHandlerPageBox4_'+card).show().siblings().hide(); | ||
206 | + this.presentInd = 1; | ||
207 | + switch (status){ | ||
208 | + case 0: | ||
209 | + //课程 列表 | ||
210 | + this._manageCourse(1); | ||
211 | + break; | ||
212 | + case 1: | ||
213 | + //老师 列表 | ||
214 | + this._manageTeacher(1); | ||
215 | + break; | ||
144 | 216 | ||
145 | - $.ajax({ | ||
146 | - type: "POST", | ||
147 | - url: _url, | ||
148 | - timeout:5000, | ||
149 | - data:{siteId:ClassDataProxy.siteId,userType:ClassDataProxy.USER_TYPE_8}, | ||
150 | - headers: {siteId:ClassDataProxy.siteId, | ||
151 | - pageno:7, | ||
152 | - 'page':ind, | ||
153 | - 'token':ClassDataProxy.token}, | ||
154 | - success:function(_data){ | ||
155 | - //获取课堂数据 | ||
156 | - if(_data && _data.code == 200){ | ||
157 | - let ind = $('#aboutClassList4').find('.liveInfoLeftLiCheck').attr('data'); | ||
158 | - if(ind == 0 ){ | ||
159 | - //显示课程界面 | ||
160 | - that._gainUserClassData(_data.returnData.data); | ||
161 | - }else{ | ||
162 | - //显示老师界面 | ||
163 | - // that._gainUserClassData1(_data.returnData.data); | ||
164 | - } | ||
165 | - } | ||
166 | - }, | ||
167 | - error:function(error){ | ||
168 | - //alert('直播数据获取失败') | ||
169 | - that._gainUserClassDataErr(); | ||
170 | - loger.log(error,'约课数据获取失败') | 217 | + default: |
218 | + return; | ||
219 | + } | ||
220 | + } | ||
221 | + //课程 列表 | ||
222 | + _manageCourse(ind){ | ||
223 | + let that = this; | ||
224 | + this.publicAjax(8,ind,function(_data){ | ||
225 | + if(_data){ | ||
226 | + that._coursePage(_data.returnData.data); | ||
227 | + that._userCourse(_data.returnData.data); | ||
228 | + } | ||
229 | + }) | ||
230 | + } | ||
231 | + //老师 列表 | ||
232 | + _manageTeacher(ind){ | ||
233 | + let that = this; | ||
234 | + this.publicAjax(8,ind,function(_data){ | ||
235 | + if(_data){ | ||
236 | + that._teacherPage(_data.returnData.data); | ||
237 | + that._teacherCourse(_data.returnData.data); | ||
171 | } | 238 | } |
172 | }) | 239 | }) |
173 | } | 240 | } |
174 | - _gainUserClassData(_data){ | ||
175 | - let _dataList = _data.users; | 241 | + _userCourse(_data){ |
176 | let courseContent = $('#courseContent4'); | 242 | let courseContent = $('#courseContent4'); |
177 | courseContent.empty(); | 243 | courseContent.empty(); |
178 | - let count = _data.count; | ||
179 | - let page = _data.page; | ||
180 | - let pageno = _data.pageno; | ||
181 | - let pagenum = Math.ceil(count / pageno); | ||
182 | - this.pageNo = pagenum; | ||
183 | - loger.log('预约显示页码',_data) | ||
184 | - $('#classHandlerPageMsg4').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
185 | - courseContent.append(adminListTit); | ||
186 | - if(_dataList){ | ||
187 | - if(count <= 7){ | ||
188 | - $('#classHandlerPageBox4').hide(); | 244 | + if(_data){ |
245 | + courseContent.append(adminListTit); | ||
246 | + let _dataList = _data.studentMeeting; | ||
247 | + for(let i =0;i<_dataList.length;i++){ | ||
248 | + let item = _dataList[i]; | ||
249 | + if(item){ | ||
250 | + let _adminList = this._format(adminList,{ | ||
251 | + _userName : item.user_name, | ||
252 | + _phone : item.user_mobile, | ||
253 | + _age : '女', | ||
254 | + _totalNmu : '2', | ||
255 | + _course : item.meeting_name, | ||
256 | + _removeInd : 'classDoc'+i, | ||
257 | + _stay : 'classMedia'+i, | ||
258 | + _aboutMsg : item.id | ||
259 | + }) | ||
260 | + courseContent.append(_adminList); | ||
261 | + } | ||
262 | + courseContent.append(adminListEnd); | ||
263 | + } | ||
264 | + }else{ | ||
265 | + this._gainUserClassDataErr(); | ||
266 | + } | ||
267 | + } | ||
268 | + _teacherCourse(_data){ | ||
269 | + let courseContent = $('#courseContent4'); | ||
270 | + courseContent.empty(); | ||
271 | + if(_data){ | ||
272 | + let _dataList = _data.studentMeeting; | ||
273 | + courseContent.append(adminListTit1); | ||
274 | + for(let i =0;i<_dataList.length;i++){ | ||
275 | + let item = _dataList[i]; | ||
276 | + if(item){ | ||
277 | + let _adminList = this._format(adminList1,{ | ||
278 | + _userName : item.user_name, | ||
279 | + _phone : item.user_mobile, | ||
280 | + _age : '女', | ||
281 | + _totalNmu : '2', | ||
282 | + _course : item.teacherName, | ||
283 | + _removeInd : 'classDoc'+i, | ||
284 | + _stay : 'classMedia'+i, | ||
285 | + _aboutMsg : item.id | ||
286 | + }) | ||
287 | + courseContent.append(_adminList); | ||
288 | + } | ||
289 | + courseContent.append(adminListEnd); | ||
290 | + } | ||
291 | + }else{ | ||
292 | + this._gainUserClassDataErr(); | ||
293 | + } | ||
294 | + } | ||
295 | + _coursePage(_data){ | ||
296 | + if(_data){ | ||
297 | + let count = _data.count; | ||
298 | + let page = _data.page; | ||
299 | + let pageno = _data.pageno; | ||
300 | + let pagenum = Math.ceil(count / pageno); | ||
301 | + this.pageNo = pagenum; | ||
302 | + $('#classHandlerPageMsg4_0').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
303 | + if(count <=4){ | ||
304 | + $('#classHandlerPageBox4_0').hide(); | ||
189 | } | 305 | } |
190 | - for(let i = 0;i<_dataList.length;i++){ | ||
191 | - let _adminList = this._format(adminList,{ | ||
192 | - _userName : _dataList[i].loginName, | ||
193 | - _phone : _dataList[i].userMobile, | ||
194 | - _age : '女', | ||
195 | - _totalNmu : '2', | ||
196 | - _course : '《少儿英语》', | ||
197 | - _removeInd : 'classDoc'+i, | ||
198 | - _stay : 'classMedia'+i, | ||
199 | - _aboutMsg : _dataList[i].id | ||
200 | - }) | ||
201 | - courseContent.append(_adminList); | 306 | + |
307 | + } | ||
308 | + } | ||
309 | + _teacherPage(_data){ | ||
310 | + if(_data){ | ||
311 | + let count = _data.count; | ||
312 | + let page = _data.page; | ||
313 | + let pageno = _data.pageno; | ||
314 | + let pagenum = Math.ceil(count / pageno); | ||
315 | + let _dataList = _data.meetingInfo; | ||
316 | + this.pageNo = pagenum; | ||
317 | + $('#classHandlerPageMsg4_1').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
318 | + if(count <=4){ | ||
319 | + $('#classHandlerPageBox4_1').hide(); | ||
202 | } | 320 | } |
203 | - courseContent.append(adminListEnd); | ||
204 | } | 321 | } |
205 | } | 322 | } |
206 | _gainUserClassDataErr(){ | 323 | _gainUserClassDataErr(){ |
@@ -215,43 +332,46 @@ class AboutClassApe extends Ape { | @@ -215,43 +332,46 @@ class AboutClassApe extends Ape { | ||
215 | courseContent.append(_adminList); | 332 | courseContent.append(_adminList); |
216 | courseContent.append(adminListEnd); | 333 | courseContent.append(adminListEnd); |
217 | } | 334 | } |
218 | - /*_gainUserClassData1(_data){ | ||
219 | - let _dataList = _data.users; | ||
220 | - let courseContent = $('#courseContent4'); | ||
221 | - courseContent.empty(); | ||
222 | - let count = _data.count; | ||
223 | - let page = _data.page; | ||
224 | - let pageno = _data.pageno; | ||
225 | - this.pageNo = pageno; | ||
226 | - | ||
227 | - $('#classHandlerPageMsg4').html('第'+page+'页/共'+pageno+'页,有'+count+'个记录'); | ||
228 | - courseContent.append(adminListTit1); | ||
229 | - if(_dataList){ | ||
230 | - if(count <= 7){ | ||
231 | - $('#classHandlerPageBox4').hide(); | ||
232 | - } | ||
233 | - for(let i = 0;i<_dataList.length;i++){ | ||
234 | - let _adminList = this._format(adminList1,{ | ||
235 | - _userName : _dataList[i].loginName, | ||
236 | - _phone : _dataList[i].userMobile, | ||
237 | - _age : '女', | ||
238 | - _totalNmu : '2', | ||
239 | - _course : _dataList[i].userName, | ||
240 | - _removeInd : 'classDoc'+i, | ||
241 | - _stay : 'classMedia'+i, | ||
242 | - _aboutMsg : _dataList[i].id | ||
243 | - }) | ||
244 | - courseContent.append(_adminList); | ||
245 | - } | ||
246 | - courseContent.append(adminListEnd); | 335 | + publicAjax(num,ind,callback){ |
336 | + if(ClassDataProxy.id == ''){ | ||
337 | + return; | ||
247 | } | 338 | } |
248 | - }*/ | 339 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/studentMeeting/getStudentMeetingBySite/'+ClassDataProxy.siteId; |
340 | + let that = this; | ||
341 | + $.ajax({ | ||
342 | + type: "GET", | ||
343 | + url: _url, | ||
344 | + timeout:5000, | ||
345 | + headers: {siteId:ClassDataProxy.siteId,pageno:num,page:ind,id:ClassDataProxy.id, | ||
346 | + 'token':ClassDataProxy.token}, | ||
347 | + success:function(_data){ | ||
348 | + // loger.log('预约信息斯柯达开始',_data) | ||
349 | + //获取我的课程数据 | ||
350 | + if(_data && _data.code == 200){ | ||
351 | + if(callback){ | ||
352 | + callback(_data); | ||
353 | + } | ||
354 | + }else{ | ||
355 | + if(callback){ | ||
356 | + callback(null); | ||
357 | + } | ||
358 | + } | ||
359 | + }, | ||
360 | + error:function(error){ | ||
361 | + //alert('直播数据获取失败') | ||
362 | + if(callback){ | ||
363 | + callback(null); | ||
364 | + } | ||
365 | + loger.log(error,'直播数据获取失败') | ||
366 | + } | ||
367 | + }) | ||
368 | + } | ||
249 | _switchover(evt){ | 369 | _switchover(evt){ |
250 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); | 370 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); |
251 | } | 371 | } |
252 | _userClassListHandler(evt){ | 372 | _userClassListHandler(evt){ |
253 | this._switchover(evt); | 373 | this._switchover(evt); |
254 | - this.userAdminHandler(1); | 374 | + this.aboutClass(); |
255 | } | 375 | } |
256 | //工具类 | 376 | //工具类 |
257 | _format(str, obj) { | 377 | _format(str, obj) { |
@@ -56,7 +56,6 @@ class CreateUserApe extends Ape { | @@ -56,7 +56,6 @@ class CreateUserApe extends Ape { | ||
56 | } | 56 | } |
57 | 57 | ||
58 | init() { | 58 | init() { |
59 | - | ||
60 | $('#userClassList3 li').on('click',this._userClassListHandler.bind(this));//用户列表 | 59 | $('#userClassList3 li').on('click',this._userClassListHandler.bind(this));//用户列表 |
61 | 60 | ||
62 | //用户管理 | 61 | //用户管理 |
@@ -66,11 +65,23 @@ class CreateUserApe extends Ape { | @@ -66,11 +65,23 @@ class CreateUserApe extends Ape { | ||
66 | $('#createUserA').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 | 65 | $('#createUserA').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 |
67 | $('#createUserCancel').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 | 66 | $('#createUserCancel').on('click',this._closeUserClassHandler.bind(this));//关闭创建课堂 |
68 | 67 | ||
69 | - $('#classHandlerHomePage3').on('click',this._homePageHandler.bind(this));//首页 | ||
70 | - $('#classHandlerUpPage3').on('click',this._upPageHandler.bind(this));//上页 | ||
71 | - $('#classHandlerDownPage3').on('click',this._downPageHandler.bind(this));//下页 | ||
72 | - $('#classHandlerEndPage3').on('click',this._endPageHandler.bind(this));//尾页 | ||
73 | - $('#classHandlerSpecificPage3').on('click',this._assignPageHandler.bind(this));//指定页 | 68 | + $('#classHandlerHomePage3_0').on('click',this._homePageHandler.bind(this));//首页 |
69 | + $('#classHandlerUpPage3_0').on('click',this._upPageHandler.bind(this));//上页 | ||
70 | + $('#classHandlerDownPage3_0').on('click',this._downPageHandler.bind(this));//下页 | ||
71 | + $('#classHandlerEndPage3_0').on('click',this._endPageHandler.bind(this));//尾页 | ||
72 | + $('#classHandlerSpecificPage3_0').on('click',this._assignPageHandler.bind(this));//指定页 | ||
73 | + | ||
74 | + $('#classHandlerHomePage3_1').on('click',this._homePageHandler.bind(this));//首页 | ||
75 | + $('#classHandlerUpPage3_1').on('click',this._upPageHandler.bind(this));//上页 | ||
76 | + $('#classHandlerDownPage3_1').on('click',this._downPageHandler.bind(this));//下页 | ||
77 | + $('#classHandlerEndPage3_1').on('click',this._endPageHandler.bind(this));//尾页 | ||
78 | + $('#classHandlerSpecificPage3_1').on('click',this._assignPageHandler.bind(this));//指定页 | ||
79 | + | ||
80 | + $('#classHandlerHomePage3_2').on('click',this._homePageHandler.bind(this));//首页 | ||
81 | + $('#classHandlerUpPage3_2').on('click',this._upPageHandler.bind(this));//上页 | ||
82 | + $('#classHandlerDownPage3_2').on('click',this._downPageHandler.bind(this));//下页 | ||
83 | + $('#classHandlerEndPage3_2').on('click',this._endPageHandler.bind(this));//尾页 | ||
84 | + $('#classHandlerSpecificPage3_2').on('click',this._assignPageHandler.bind(this));//指定页 | ||
74 | 85 | ||
75 | $('#courseContent3').on('click','.deleteClass',this._deleteClass.bind(this));//删除课堂 | 86 | $('#courseContent3').on('click','.deleteClass',this._deleteClass.bind(this));//删除课堂 |
76 | 87 | ||
@@ -85,42 +96,286 @@ class CreateUserApe extends Ape { | @@ -85,42 +96,286 @@ class CreateUserApe extends Ape { | ||
85 | } | 96 | } |
86 | _userClassListHandler(evt){ | 97 | _userClassListHandler(evt){ |
87 | this._switchover(evt); | 98 | this._switchover(evt); |
88 | - this.userAdminHandler(1); | 99 | + this.manageUserList(); |
89 | } | 100 | } |
90 | //首页 | 101 | //首页 |
91 | _homePageHandler(){ | 102 | _homePageHandler(){ |
92 | this.presentInd = 1; | 103 | this.presentInd = 1; |
93 | - this.userAdminHandler(this.presentInd); | 104 | + let ind = $('#classHandlerPageBox3').attr('data'); |
105 | + switch (parseInt(ind)){ | ||
106 | + case 1: | ||
107 | + this._manageTeacher(this.presentInd); | ||
108 | + break; | ||
109 | + case 8: | ||
110 | + this._manageStudent(this.presentInd); | ||
111 | + break; | ||
112 | + case 2: | ||
113 | + this._manageSupervise(this.presentInd); | ||
114 | + break; | ||
115 | + default: | ||
116 | + return; | ||
117 | + } | ||
94 | } | 118 | } |
95 | //上页 | 119 | //上页 |
96 | _upPageHandler(){ | 120 | _upPageHandler(){ |
97 | - if(this.presentInd >1){ | 121 | + if(this.presentInd > 1){ |
98 | this.presentInd--; | 122 | this.presentInd--; |
99 | - this.userAdminHandler(this.presentInd); | 123 | + let ind = $('#classHandlerPageBox3').attr('data'); |
124 | + switch (parseInt(ind)){ | ||
125 | + case 1: | ||
126 | + this._manageTeacher(this.presentInd); | ||
127 | + break; | ||
128 | + case 8: | ||
129 | + this._manageStudent(this.presentInd); | ||
130 | + break; | ||
131 | + case 2: | ||
132 | + this._manageSupervise(this.presentInd); | ||
133 | + break; | ||
134 | + default: | ||
135 | + return; | ||
136 | + } | ||
100 | } | 137 | } |
101 | } | 138 | } |
102 | //下页 | 139 | //下页 |
103 | _downPageHandler(){ | 140 | _downPageHandler(){ |
104 | if(this.presentInd < this.pageNo){ | 141 | if(this.presentInd < this.pageNo){ |
105 | this.presentInd++; | 142 | this.presentInd++; |
106 | - this.userAdminHandler(this.presentInd); | 143 | + let ind = $('#classHandlerPageBox3').attr('data'); |
144 | + switch (parseInt(ind)){ | ||
145 | + case 1: | ||
146 | + this._manageTeacher(this.presentInd); | ||
147 | + break; | ||
148 | + case 8: | ||
149 | + this._manageStudent(this.presentInd); | ||
150 | + break; | ||
151 | + case 2: | ||
152 | + this._manageSupervise(this.presentInd); | ||
153 | + break; | ||
154 | + default: | ||
155 | + return; | ||
156 | + } | ||
107 | } | 157 | } |
108 | } | 158 | } |
109 | //尾页 | 159 | //尾页 |
110 | _endPageHandler(){ | 160 | _endPageHandler(){ |
111 | this.presentInd = this.pageNo; | 161 | this.presentInd = this.pageNo; |
112 | - this.userAdminHandler(this.presentInd); | 162 | + let ind = $('#classHandlerPageBox3').attr('data'); |
163 | + switch (parseInt(ind)){ | ||
164 | + case 1: | ||
165 | + this._manageTeacher(this.presentInd); | ||
166 | + break; | ||
167 | + case 8: | ||
168 | + this._manageStudent(this.presentInd); | ||
169 | + break; | ||
170 | + case 2: | ||
171 | + this._manageSupervise(this.presentInd); | ||
172 | + break; | ||
173 | + default: | ||
174 | + return; | ||
175 | + } | ||
113 | } | 176 | } |
114 | //指定页 | 177 | //指定页 |
115 | _assignPageHandler(){ | 178 | _assignPageHandler(){ |
116 | - let inputVal = $('#classHandlerPageInfoInput3').val(); | ||
117 | - if(parseInt(inputVal) <= this.pageNo || parseInt(inputVal) >= 1 ){ | ||
118 | - this.userAdminHandler(parseInt(inputVal)); | 179 | + let val; |
180 | + let ind = $('#classHandlerPageBox3').attr('data'); | ||
181 | + let card = $('#userClassList3 .liveInfoLeftLiCheck').index(); | ||
182 | + let inputVal = $('#classHandlerPageInfoInput3_'+card).val(); | ||
183 | + if(parseInt(inputVal) > this.pageNo ){ | ||
184 | + val = this.pageNo; | ||
185 | + }else if(parseInt(inputVal) < 1){ | ||
186 | + val = 1; | ||
187 | + }else{ | ||
188 | + val = parseInt(inputVal) | ||
189 | + } | ||
190 | + switch (parseInt(ind)){ | ||
191 | + case 1: | ||
192 | + this._manageTeacher(val); | ||
193 | + break; | ||
194 | + case 8: | ||
195 | + this._manageStudent(val); | ||
196 | + break; | ||
197 | + case 2: | ||
198 | + this._manageSupervise(val); | ||
199 | + break; | ||
200 | + default: | ||
201 | + return; | ||
202 | + } | ||
203 | + | ||
204 | + $('#classHandlerPageInfoInput3_'+card).val('') | ||
205 | + } | ||
206 | + //公用ajax请求 | ||
207 | + publicAjax(data,num,ind,callback){ | ||
208 | + let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/getUser'; | ||
209 | + let that = this; | ||
210 | + $.ajax({ | ||
211 | + type: "POST", | ||
212 | + url: _url, | ||
213 | + timeout:5000, | ||
214 | + data : data, | ||
215 | + headers: {siteId:ClassDataProxy.siteId,pageno:num, page:ind, | ||
216 | + 'token':ClassDataProxy.token}, | ||
217 | + success:function(_data){ | ||
218 | + if(_data && _data.code == 200){ | ||
219 | + if(callback){ | ||
220 | + callback(_data); | ||
221 | + } | ||
222 | + }else{ | ||
223 | + if(callback){ | ||
224 | + callback(null); | ||
225 | + } | ||
226 | + } | ||
227 | + }, | ||
228 | + error:function(error){ | ||
229 | + if(callback){ | ||
230 | + callback(null); | ||
231 | + } | ||
232 | + loger.log(error,'管理员用户获取失败') | ||
233 | + } | ||
234 | + }) | ||
235 | + } | ||
236 | + //用户管理 列表 | ||
237 | + manageUserList(){ | ||
238 | + let ind = $('#userClassList3 .liveInfoLeftLiCheck').attr('data'); | ||
239 | + let card = $('#userClassList3 .liveInfoLeftLiCheck').index(); | ||
240 | + $('#classHandlerPageBox3').attr('data',ind) | ||
241 | + let status = parseInt(ind); | ||
242 | + $('#classHandlerPageBox3_'+card).show().siblings().hide(); | ||
243 | + this.presentInd = 1; | ||
244 | + switch (status){ | ||
245 | + case 1: | ||
246 | + //老师 列表 | ||
247 | + this._manageTeacher(1); | ||
248 | + break; | ||
249 | + case 8: | ||
250 | + //学生 列表 | ||
251 | + this._manageStudent(1); | ||
252 | + break; | ||
253 | + case 2: | ||
254 | + //兼课 列表 | ||
255 | + this._manageSupervise(1); | ||
256 | + break; | ||
257 | + default: | ||
258 | + return; | ||
119 | } | 259 | } |
120 | } | 260 | } |
261 | + //老师 列表 | ||
262 | + _manageTeacher(ind){ | ||
263 | + let data = {siteId:ClassDataProxy.siteId,userType:1}; | ||
264 | + let that = this; | ||
265 | + this.publicAjax(data,7,ind,function(_data){ | ||
266 | + if(_data){ | ||
267 | + that._teacherPage(_data.returnData.data); | ||
268 | + that._userCourse(_data.returnData.data); | ||
269 | + } | ||
270 | + }) | ||
271 | + } | ||
272 | + //学生 列表 | ||
273 | + _manageStudent(ind){ | ||
274 | + let data = {siteId:ClassDataProxy.siteId,userType:8}; | ||
275 | + let that = this; | ||
276 | + this.publicAjax(data,7,ind,function(_data){ | ||
277 | + if(_data){ | ||
278 | + that._studentPage(_data.returnData.data); | ||
279 | + that._userCourse(_data.returnData.data); | ||
280 | + } | ||
281 | + }) | ||
282 | + } | ||
283 | + //兼课 列表 | ||
284 | + _manageSupervise(ind){ | ||
285 | + let data = {siteId:ClassDataProxy.siteId,userType:2}; | ||
286 | + let that = this; | ||
287 | + this.publicAjax(data,7,ind,function(_data){ | ||
288 | + if(_data){ | ||
289 | + that._supervisePage(_data.returnData.data); | ||
290 | + that._userCourse(_data.returnData.data); | ||
291 | + } | ||
292 | + }) | ||
293 | + } | ||
294 | + _userCourse(_data){ | ||
295 | + let _dataList = _data.users; | ||
296 | + let courseContent = $('#courseContent3'); | ||
297 | + courseContent.empty(); | ||
298 | + courseContent.append(adminListTit); | ||
299 | + if(_dataList.length > 0){ | ||
300 | + for(let i = 0;i<_dataList.length;i++){ | ||
301 | + let _adminList = this._format(adminList,{ | ||
302 | + _loginName : _dataList[i].loginName, | ||
303 | + _userName : _dataList[i].userName, | ||
304 | + _course : '暂无', | ||
305 | + _totalNmu : '2', | ||
306 | + _latest : '1', | ||
307 | + _removeInd : 'classDoc'+i, | ||
308 | + _joinInd : 'classMedia'+i, | ||
309 | + _aboutMsg : _dataList[i].id | ||
310 | + }) | ||
311 | + courseContent.append(_adminList); | ||
312 | + } | ||
313 | + courseContent.append(adminListEnd); | ||
314 | + }else{ | ||
315 | + this._gainUserClassDataErr(); | ||
316 | + } | ||
317 | + } | ||
318 | + _gainUserClassDataErr(){ | ||
319 | + let courseContent = $('#courseContent3'); | ||
320 | + courseContent.empty(); | ||
321 | + courseContent.append(adminListTit); | ||
322 | + let _adminList = '<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6">' + | ||
323 | + '<td class="tr_main tr_mainNone">' + | ||
324 | + '该课堂暂无课程数据~'+ | ||
325 | + '</td>>'+ | ||
326 | + '</tr>' | ||
327 | + courseContent.append(_adminList); | ||
328 | + courseContent.append(adminListEnd); | ||
329 | + } | ||
330 | + _teacherPage(_data){ | ||
331 | + if(_data){ | ||
332 | + let count = _data.count; | ||
333 | + let page = _data.page; | ||
334 | + let pageno = _data.pageno; | ||
335 | + let pagenum = Math.ceil(count / pageno); | ||
336 | + let _dataList = _data.meetingInfo; | ||
337 | + this.pageNo = pagenum; | ||
338 | + console.log('sssssssss',count) | ||
339 | + $('#classHandlerPageMsg3_0').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
340 | + if(count <=7){ | ||
341 | + $('#classHandlerPageBox3_0').hide(); | ||
342 | + } | ||
343 | + | ||
344 | + } | ||
345 | + } | ||
346 | + _studentPage(_data){ | ||
347 | + if(_data){ | ||
348 | + let count = _data.count; | ||
349 | + let page = _data.page; | ||
350 | + let pageno = _data.pageno; | ||
351 | + let pagenum = Math.ceil(count / pageno); | ||
352 | + let _dataList = _data.meetingInfo; | ||
353 | + this.pageNo = pagenum; | ||
354 | + console.log('sssssssss',count) | ||
355 | + $('#classHandlerPageMsg3_1').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
356 | + if(count <=7){ | ||
357 | + $('#classHandlerPageBox3_1').hide(); | ||
358 | + } | ||
359 | + } | ||
360 | + } | ||
361 | + _supervisePage(_data){ | ||
362 | + if(_data){ | ||
363 | + let count = _data.count; | ||
364 | + let page = _data.page; | ||
365 | + let pageno = _data.pageno; | ||
366 | + let pagenum = Math.ceil(count / pageno); | ||
367 | + let _dataList = _data.meetingInfo; | ||
368 | + this.pageNo = pagenum; | ||
369 | + console.log('sssssssss',count) | ||
370 | + $('#classHandlerPageMsg3_2').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
371 | + if(count <=7){ | ||
372 | + $('#classHandlerPageBox3_2').hide(); | ||
373 | + } | ||
374 | + } | ||
375 | + } | ||
376 | + | ||
121 | //用户管理 创建用户界面 | 377 | //用户管理 创建用户界面 |
122 | userAdminHandler(ind){ | 378 | userAdminHandler(ind){ |
123 | - | ||
124 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/getUser'; | 379 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/getUser'; |
125 | let that = this; | 380 | let that = this; |
126 | let data = $('#userClassList3').find('.liveInfoLeftLiCheck').attr('data'); | 381 | let data = $('#userClassList3').find('.liveInfoLeftLiCheck').attr('data'); |
@@ -230,6 +485,8 @@ class CreateUserApe extends Ape { | @@ -230,6 +485,8 @@ class CreateUserApe extends Ape { | ||
230 | let identity = document.getElementById("createUserIdentity");//身份证号 | 485 | let identity = document.getElementById("createUserIdentity");//身份证号 |
231 | let mail = document.getElementById("createUserMail");//邮箱 | 486 | let mail = document.getElementById("createUserMail");//邮箱 |
232 | 487 | ||
488 | + let createUserRole = $('#createUserRole').val(); | ||
489 | + | ||
233 | let createUserNote = $('#createUserNote').val();//备注信息 | 490 | let createUserNote = $('#createUserNote').val();//备注信息 |
234 | let createUserAbortTime = $('#createUserAbortTime').html();//有效期 | 491 | let createUserAbortTime = $('#createUserAbortTime').html();//有效期 |
235 | 492 | ||
@@ -240,7 +497,7 @@ class CreateUserApe extends Ape { | @@ -240,7 +497,7 @@ class CreateUserApe extends Ape { | ||
240 | "companyName":null, //公司名字 | 497 | "companyName":null, //公司名字 |
241 | "userName":createUserRealName.value, //用户名 | 498 | "userName":createUserRealName.value, //用户名 |
242 | "userRole":3, // 用户角色 0超级管理员,1管理员,2监课,3老师,4学生 | 499 | "userRole":3, // 用户角色 0超级管理员,1管理员,2监课,3老师,4学生 |
243 | - "userType": 1, | 500 | + "userType": parseInt(createUserRole), |
244 | "userEmail":mail.value, // 用户邮箱 | 501 | "userEmail":mail.value, // 用户邮箱 |
245 | "userMobile":parseInt(phone.value), // 用户手机号 | 502 | "userMobile":parseInt(phone.value), // 用户手机号 |
246 | "content":createUserNote, // 用户简介 | 503 | "content":createUserNote, // 用户简介 |
@@ -264,7 +521,7 @@ class CreateUserApe extends Ape { | @@ -264,7 +521,7 @@ class CreateUserApe extends Ape { | ||
264 | ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框 | 521 | ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框 |
265 | ErrorApe.showWarnError('注册成功'); | 522 | ErrorApe.showWarnError('注册成功'); |
266 | $('#createUserBox').hide(); | 523 | $('#createUserBox').hide(); |
267 | - that.userAdminHandler(1); | 524 | + that._manageTeacher(1); |
268 | }else{ | 525 | }else{ |
269 | ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框 | 526 | ClassDataProxy.getMarginTopHandler($('#warnHintBox'));//修改信息输入框 |
270 | ErrorApe.showWarnError(_data.returnData.data.msg); | 527 | ErrorApe.showWarnError(_data.returnData.data.msg); |
@@ -264,7 +264,8 @@ class LoginOrRegister extends Ape { | @@ -264,7 +264,8 @@ class LoginOrRegister extends Ape { | ||
264 | "userMobile":parseInt(phone.value), // 用户手机号 | 264 | "userMobile":parseInt(phone.value), // 用户手机号 |
265 | "content":"2017-09-01", // 用户简介 | 265 | "content":"2017-09-01", // 用户简介 |
266 | "groupId":1, //用户组id | 266 | "groupId":1, //用户组id |
267 | - "IDcard":123123 | 267 | + "IDcard":123123, |
268 | + "siteId":ClassDataProxy.siteId | ||
268 | } | 269 | } |
269 | let that = this; | 270 | let that = this; |
270 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/addUser'; | 271 | let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/users/addUser'; |
@@ -19,36 +19,36 @@ const adminListTit = `<table width="100%" align="center" cellpadding="0" cellspa | @@ -19,36 +19,36 @@ const adminListTit = `<table width="100%" align="center" cellpadding="0" cellspa | ||
19 | <th width="8%" class="tr_center"> | 19 | <th width="8%" class="tr_center"> |
20 | 课堂号 | 20 | 课堂号 |
21 | </th> | 21 | </th> |
22 | - <th width="7%" class="tr_center"> | 22 | + <th width="8%" class="tr_center"> |
23 | 老师 | 23 | 老师 |
24 | </th> | 24 | </th> |
25 | - <th width="6%" class="tr_center"> | 25 | + <th width="7%" class="tr_center"> |
26 | 课堂状态 | 26 | 课堂状态 |
27 | </th> | 27 | </th> |
28 | <th width="20%" class="tr_center"> | 28 | <th width="20%" class="tr_center"> |
29 | 课堂时间 | 29 | 课堂时间 |
30 | </th> | 30 | </th> |
31 | - <th width="6%" class="tr_center"> | 31 | + <th width="5%" class="tr_center"> |
32 | 在线人数 | 32 | 在线人数 |
33 | </th> | 33 | </th> |
34 | - <th width="23%" class="tr_center"> | 34 | + <th width="19%" class="tr_center"> |
35 | 操作 | 35 | 操作 |
36 | </th> | 36 | </th> |
37 | </tr> | 37 | </tr> |
38 | `; | 38 | `; |
39 | //管理首页 | 39 | //管理首页 |
40 | const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6"> | 40 | const adminList = `<tr align="center" bgcolor="#FFFFFF" height="44" bordercolor="#e6e6e6"> |
41 | - <td width="7%" class="tr_main tr_mainLeft">{_meetingName}</td> | 41 | + <td width="8%" class="tr_main tr_mainLeft">{_meetingName}</td> |
42 | <td width="7%" class="tr_main">{_esenglish}</td> | 42 | <td width="7%" class="tr_main">{_esenglish}</td> |
43 | - <td width="7%" class="tr_main">{_userName}</td> | 43 | + <td width="8%" class="tr_main">{_userName}</td> |
44 | <td width="6%" class="tr_main">{_stateInfo}</td> | 44 | <td width="6%" class="tr_main">{_stateInfo}</td> |
45 | <td width="18%" class="tr_main">{_time}</td> | 45 | <td width="18%" class="tr_main">{_time}</td> |
46 | - <td width="6%" class="tr_main">{_onlineLen}</td> | ||
47 | - <td width="21%" class="tr_main tr_mainRight" align="center" data="{_esenglish}"> | ||
48 | - <a id="{_DocInd}" class="classHandlePort" href="###">课件</a> | ||
49 | - <a id="{_updateInd}" class="classHandlePort" href="###">修改</a> | ||
50 | - <a data="{_removeInd}" class="classHandlePort deleteClass" href="#">删除</a> | ||
51 | - <a data="{_joinInd}" class="classHandlePort joinClass" href="#">加入课堂</a> | 46 | + <td width="5%" class="tr_main">{_onlineLen}</td> |
47 | + <td width="19%" class="tr_main tr_mainRight" align="center" data="{_esenglish}"> | ||
48 | + <a id="{_DocInd}" class="classHandlePort" href="javascript:void(0);">课件</a> | ||
49 | + <a id="{_updateInd}" class="classHandlePort" href="javascript:void(0);">修改</a> | ||
50 | + <a data="{_removeInd}" class="classHandlePort deleteClass" href="javascript:void(0);">删除</a> | ||
51 | + <a data="{_joinInd}" class="classHandlePort joinClass" href="javascript:void(0);">加入课堂</a> | ||
52 | <a data="{_removeInd}" class="classHandlePort updatacover" value="{_value}" href="javascript:void(0);">上传封面</a> | 52 | <a data="{_removeInd}" class="classHandlePort updatacover" value="{_value}" href="javascript:void(0);">上传封面</a> |
53 | <a data="{_removeInd}" class="classHandlePort generalize" value="{_value}" href="javascript:void(0);">推广</a> | 53 | <a data="{_removeInd}" class="classHandlePort generalize" value="{_value}" href="javascript:void(0);">推广</a> |
54 | 54 | ||
@@ -99,6 +99,8 @@ class ManagementHomePageApe extends Ape { | @@ -99,6 +99,8 @@ class ManagementHomePageApe extends Ape { | ||
99 | $('#updataPhotoInput').on('change',this._updataPhotoBtnHandler.bind(this));//上传课堂封面 | 99 | $('#updataPhotoInput').on('change',this._updataPhotoBtnHandler.bind(this));//上传课堂封面 |
100 | $('#updataPhotoBtn').on('click',this._submitBtnHandler.bind(this));//上传课堂封面 上传按钮 | 100 | $('#updataPhotoBtn').on('click',this._submitBtnHandler.bind(this));//上传课堂封面 上传按钮 |
101 | 101 | ||
102 | + $('#liveInfoRightInputBtn0').on('click',this.searchClass.bind(this));//搜索 | ||
103 | + | ||
102 | } | 104 | } |
103 | 105 | ||
104 | addEvent() { | 106 | addEvent() { |
@@ -273,8 +275,8 @@ class ManagementHomePageApe extends Ape { | @@ -273,8 +275,8 @@ class ManagementHomePageApe extends Ape { | ||
273 | this._adminInfo(data,8,ind,function(_data){ | 275 | this._adminInfo(data,8,ind,function(_data){ |
274 | //首页直播信息渲染 | 276 | //首页直播信息渲染 |
275 | if(_data){ | 277 | if(_data){ |
276 | - that._adminLiveCourse(_data.returnData.data); | ||
277 | that._adminLivePage(_data.returnData.data); | 278 | that._adminLivePage(_data.returnData.data); |
279 | + that._adminLiveCourse(_data.returnData.data); | ||
278 | } | 280 | } |
279 | }) | 281 | }) |
280 | } | 282 | } |
@@ -330,8 +332,8 @@ class ManagementHomePageApe extends Ape { | @@ -330,8 +332,8 @@ class ManagementHomePageApe extends Ape { | ||
330 | this._adminInfo(data,8,ind,function(_data){ | 332 | this._adminInfo(data,8,ind,function(_data){ |
331 | //首页直播信息渲染 | 333 | //首页直播信息渲染 |
332 | if(_data){ | 334 | if(_data){ |
333 | - that._adminLiveCourse(_data.returnData.data); | ||
334 | that._adminNotPage(_data.returnData.data); | 335 | that._adminNotPage(_data.returnData.data); |
336 | + that._adminLiveCourse(_data.returnData.data); | ||
335 | } | 337 | } |
336 | }) | 338 | }) |
337 | } | 339 | } |
@@ -356,8 +358,8 @@ class ManagementHomePageApe extends Ape { | @@ -356,8 +358,8 @@ class ManagementHomePageApe extends Ape { | ||
356 | this._adminInfo(data,8,ind,function(_data){ | 358 | this._adminInfo(data,8,ind,function(_data){ |
357 | //首页直播信息渲染 | 359 | //首页直播信息渲染 |
358 | if(_data){ | 360 | if(_data){ |
359 | - that._adminLiveCourse(_data.returnData.data); | ||
360 | that._adminOverPage(_data.returnData.data); | 361 | that._adminOverPage(_data.returnData.data); |
362 | + that._adminLiveCourse(_data.returnData.data); | ||
361 | } | 363 | } |
362 | }) | 364 | }) |
363 | } | 365 | } |
@@ -375,68 +377,6 @@ class ManagementHomePageApe extends Ape { | @@ -375,68 +377,6 @@ class ManagementHomePageApe extends Ape { | ||
375 | } | 377 | } |
376 | } | 378 | } |
377 | } | 379 | } |
378 | - //点击翻页 | ||
379 | - detailPage(ind){ | ||
380 | - let _url = ClassDataProxy.locationProtocol + ClassDataProxy.locationProt + '/meeting/getMeeting'; | ||
381 | - let that = this; | ||
382 | - let status = $('#liveInfoList0').find('.liveInfoLeftLiCheck').attr('data'); | ||
383 | - $.ajax({ | ||
384 | - type: "POST", | ||
385 | - url: _url, | ||
386 | - data:{siteId:ClassDataProxy.siteId,meetingStatus:status}, | ||
387 | - headers: { | ||
388 | - siteId:ClassDataProxy.siteId, | ||
389 | - page:ind, | ||
390 | - pageno:2, | ||
391 | - 'token':ClassDataProxy.token | ||
392 | - }, | ||
393 | - success:function(_data){ | ||
394 | - if(_data && _data.code == 200){ | ||
395 | - that._gainClassData(_data.returnData.data); | ||
396 | - } | ||
397 | - }, | ||
398 | - error:function(error){ | ||
399 | - that._gainUserClassDataErr(); | ||
400 | - console.log(error,'管理员首页') | ||
401 | - } | ||
402 | - }) | ||
403 | - | ||
404 | - } | ||
405 | - _gainClassData(_data){ | ||
406 | - let courseContent = $('#courseContent0'); | ||
407 | - courseContent.empty(); | ||
408 | - let count = _data.count; | ||
409 | - let page = _data.page; | ||
410 | - let pageno = _data.pageno; | ||
411 | - let pagenum = Math.ceil(count / pageno); | ||
412 | - let _dataList = _data.meetingInfo; | ||
413 | - this.pageNo = pagenum; | ||
414 | - $('#classHandlerPageMsg0_0').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
415 | - courseContent.append(adminListTit); | ||
416 | - if(_dataList){ | ||
417 | - // | ||
418 | - for(let i = 0;i<_dataList.length;i++){ | ||
419 | - let _adminList = this._format(adminList,{ | ||
420 | - _meetingName : _dataList[i].meetingName, | ||
421 | - _esenglish : _dataList[i].meetingNumber, | ||
422 | - _userName : _dataList[i].create_user, | ||
423 | - _stateInfo : '准备', | ||
424 | - _time: _dataList[i].beginTime+' - '+_dataList[i].endTime, | ||
425 | - _onlineLen : '0', | ||
426 | - _DocInd : 'classDoc'+i, | ||
427 | - _mediaInd : 'classMedia'+i, | ||
428 | - _musicInd : 'classMusic'+i, | ||
429 | - _updateInd : 'classUpdate'+i, | ||
430 | - _updatacover : 'updatacover'+i, | ||
431 | - _removeInd : _dataList[i].id, | ||
432 | - _value : _dataList[i].meetingPhoto ? _dataList[i].meetingPhoto : '', | ||
433 | - _joinInd : _dataList[i].meetingNumber | ||
434 | - }) | ||
435 | - courseContent.append(_adminList); | ||
436 | - } | ||
437 | - courseContent.append(adminListEnd); | ||
438 | - } | ||
439 | - } | ||
440 | _gainUserClassDataErr(){ | 380 | _gainUserClassDataErr(){ |
441 | let courseContent = $('#courseContent0'); | 381 | let courseContent = $('#courseContent0'); |
442 | courseContent.empty(); | 382 | courseContent.empty(); |
@@ -569,6 +509,9 @@ class ManagementHomePageApe extends Ape { | @@ -569,6 +509,9 @@ class ManagementHomePageApe extends Ape { | ||
569 | } | 509 | } |
570 | }) | 510 | }) |
571 | } | 511 | } |
512 | + searchClass(){ | ||
513 | + loger.log('搜索') | ||
514 | + } | ||
572 | _switchover(evt){ | 515 | _switchover(evt){ |
573 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); | 516 | $(evt.currentTarget).addClass('liveInfoLeftLiCheck').siblings().removeClass('liveInfoLeftLiCheck'); |
574 | } | 517 | } |
@@ -330,7 +330,6 @@ class MyCenterApe extends Ape { | @@ -330,7 +330,6 @@ class MyCenterApe extends Ape { | ||
330 | studentListSwitch(){ | 330 | studentListSwitch(){ |
331 | //首页课程 | 331 | //首页课程 |
332 | let ind = $('#studentInfoList .liveInfoLeftLiCheck').attr('data'); | 332 | let ind = $('#studentInfoList .liveInfoLeftLiCheck').attr('data'); |
333 | - // this._studentStudyModule(); | ||
334 | switch (parseInt(ind)){ | 333 | switch (parseInt(ind)){ |
335 | case 0: | 334 | case 0: |
336 | //待学习 | 335 | //待学习 |
@@ -347,7 +346,6 @@ class MyCenterApe extends Ape { | @@ -347,7 +346,6 @@ class MyCenterApe extends Ape { | ||
347 | default: | 346 | default: |
348 | return; | 347 | return; |
349 | } | 348 | } |
350 | - | ||
351 | } | 349 | } |
352 | //学生端首页默认数据 | 350 | //学生端首页默认数据 |
353 | detailPageStudent(){ | 351 | detailPageStudent(){ |
@@ -384,10 +382,7 @@ class MyCenterApe extends Ape { | @@ -384,10 +382,7 @@ class MyCenterApe extends Ape { | ||
384 | isLocalStorage(){ | 382 | isLocalStorage(){ |
385 | this.detailpage(); | 383 | this.detailpage(); |
386 | 384 | ||
387 | - loger.log('登录老师首页',ClassDataProxy.userType , ClassDataProxy.USER_TYPE_1) | ||
388 | - | ||
389 | $('#lanclassBox').hide(); | 385 | $('#lanclassBox').hide(); |
390 | - loger.log('显示头像数据',ClassDataProxy.userPhoto) | ||
391 | if(ClassDataProxy.userPhoto == null || ClassDataProxy.userPhoto == ''){ | 386 | if(ClassDataProxy.userPhoto == null || ClassDataProxy.userPhoto == ''){ |
392 | $('#myCenterImg').attr('src',ClassDataProxy.userPhoto)//个人信息首页 | 387 | $('#myCenterImg').attr('src',ClassDataProxy.userPhoto)//个人信息首页 |
393 | $('#personagePortrait').attr('src',ClassDataProxy.userPhoto)//个人信息 | 388 | $('#personagePortrait').attr('src',ClassDataProxy.userPhoto)//个人信息 |
@@ -432,7 +427,6 @@ class MyCenterApe extends Ape { | @@ -432,7 +427,6 @@ class MyCenterApe extends Ape { | ||
432 | } | 427 | } |
433 | } | 428 | } |
434 | 429 | ||
435 | - | ||
436 | /*-------------------老师-------------------*/ | 430 | /*-------------------老师-------------------*/ |
437 | teacherListSwitch(){ | 431 | teacherListSwitch(){ |
438 | let ind = $('#teacherInfoList .liveInfoLeftLiCheck').attr('data'); | 432 | let ind = $('#teacherInfoList .liveInfoLeftLiCheck').attr('data'); |
@@ -472,29 +466,35 @@ class MyCenterApe extends Ape { | @@ -472,29 +466,35 @@ class MyCenterApe extends Ape { | ||
472 | } | 466 | } |
473 | //老师端首页课程数据渲染 | 467 | //老师端首页课程数据渲染 |
474 | _teacherCourseCourse(_data){ | 468 | _teacherCourseCourse(_data){ |
475 | - let myCurriculumInfo = $('#myCurriculumInfo'); | ||
476 | - myCurriculumInfo.empty(); | ||
477 | - loger.log('skdfjslfsdfsssssssssss',_data) | ||
478 | - let that = this; | ||
479 | - if(_data) { | ||
480 | - for (let i = 0; i < _data.length; i++) { | ||
481 | - let item = _data[i]; | ||
482 | - let timer = ClassDataProxy.getTimeCountDown(item.meetingBeginTime,item.meetingEndTime) | ||
483 | - | ||
484 | - loger.log('skdfjslfsdfsssssssssss',timer) | ||
485 | - if (item) { | ||
486 | - let curInfo = this._format(curriculumList, { | ||
487 | - _infoTit: item.meetingName, | ||
488 | - _meetingNumber: item.meetingNumber, | ||
489 | - _countDown: that.loadMeeting(item), | ||
490 | - // _isShow: (timer != '已结束') ? 'block' : 'none' | ||
491 | - }) | ||
492 | - myCurriculumInfo.append(curInfo); | ||
493 | - } else { | ||
494 | - console.error('_gainClassData没数据') | 469 | + if(_data){ |
470 | + let myCurriculumInfo = $('#myCurriculumInfo'); | ||
471 | + let that = this; | ||
472 | + setInterval(function () { | ||
473 | + myCurriculumInfo.empty(); | ||
474 | + for (let i = 0; i < _data.length; i++) { | ||
475 | + let item = _data[i]; | ||
476 | + if (item) { | ||
477 | + let lastTimer = 0; | ||
478 | + let timer = ClassDataProxy.getTimeCountDown(item.meetingBeginTime, item.meetingEndTime) | ||
479 | + if(timer.indexOf('|') !=-1){ | ||
480 | + timer = timer.substr(0,timer.length-1); | ||
481 | + lastTimer = 1; | ||
482 | + }else if(timer.indexOf('.') !=-1){ | ||
483 | + timer = timer.substr(0,timer.length-1); | ||
484 | + lastTimer = 0; | ||
485 | + } | ||
486 | + let curInfo = that._format(curriculumList, { | ||
487 | + _infoTit: item.meetingName, | ||
488 | + _meetingNumber: item.meetingNumber, | ||
489 | + _countDown: timer, | ||
490 | + _isShow: (lastTimer == 1) ? 'none' : 'block' | ||
491 | + }) | ||
492 | + myCurriculumInfo.append(curInfo); | ||
493 | + } else { | ||
494 | + console.error('_gainClassData没数据') | ||
495 | + } | ||
495 | } | 496 | } |
496 | - | ||
497 | - } | 497 | + },1000) |
498 | } | 498 | } |
499 | } | 499 | } |
500 | //老师端首页直播数据 | 500 | //老师端首页直播数据 |
@@ -504,8 +504,8 @@ class MyCenterApe extends Ape { | @@ -504,8 +504,8 @@ class MyCenterApe extends Ape { | ||
504 | this._teacherCurriculumInfo(data,4,ind,function(_data){ | 504 | this._teacherCurriculumInfo(data,4,ind,function(_data){ |
505 | //首页直播信息渲染 | 505 | //首页直播信息渲染 |
506 | if(_data){ | 506 | if(_data){ |
507 | - that._teacherLiveCourse(_data.returnData.data); | ||
508 | that._teacherLivePage(_data.returnData.data); | 507 | that._teacherLivePage(_data.returnData.data); |
508 | + that._teacherLiveCourse(_data.returnData.data); | ||
509 | } | 509 | } |
510 | }) | 510 | }) |
511 | } | 511 | } |
@@ -515,8 +515,8 @@ class MyCenterApe extends Ape { | @@ -515,8 +515,8 @@ class MyCenterApe extends Ape { | ||
515 | this._teacherCurriculumInfo(data,4,ind,function(_data){ | 515 | this._teacherCurriculumInfo(data,4,ind,function(_data){ |
516 | //首页直播信息渲染 | 516 | //首页直播信息渲染 |
517 | if(_data){ | 517 | if(_data){ |
518 | - that._teacherLiveCourse(_data.returnData.data); | ||
519 | that._teacherNotPage(_data.returnData.data); | 518 | that._teacherNotPage(_data.returnData.data); |
519 | + that._teacherLiveCourse(_data.returnData.data); | ||
520 | } | 520 | } |
521 | }) | 521 | }) |
522 | } | 522 | } |
@@ -526,8 +526,8 @@ class MyCenterApe extends Ape { | @@ -526,8 +526,8 @@ class MyCenterApe extends Ape { | ||
526 | this._teacherCurriculumInfo(data,4,ind,function(_data){ | 526 | this._teacherCurriculumInfo(data,4,ind,function(_data){ |
527 | //首页直播信息渲染 | 527 | //首页直播信息渲染 |
528 | if(_data){ | 528 | if(_data){ |
529 | - that._teacherLiveCourse(_data.returnData.data); | ||
530 | that._teacherOverPage(_data.returnData.data); | 529 | that._teacherOverPage(_data.returnData.data); |
530 | + that._teacherLiveCourse(_data.returnData.data); | ||
531 | } | 531 | } |
532 | }) | 532 | }) |
533 | } | 533 | } |
@@ -616,42 +616,37 @@ class MyCenterApe extends Ape { | @@ -616,42 +616,37 @@ class MyCenterApe extends Ape { | ||
616 | } | 616 | } |
617 | studentCourseList(_data){ | 617 | studentCourseList(_data){ |
618 | if(_data){ | 618 | if(_data){ |
619 | - // loger.log('学生端首页课程信息',_data) | ||
620 | let myCurriculumInfo = $('#myCurriculumInfo'); | 619 | let myCurriculumInfo = $('#myCurriculumInfo'); |
621 | - myCurriculumInfo.empty(); | ||
622 | let that = this; | 620 | let that = this; |
623 | - if(_data) { | 621 | + setInterval(function () { |
622 | + myCurriculumInfo.empty(); | ||
624 | for (let i = 0; i < _data.length; i++) { | 623 | for (let i = 0; i < _data.length; i++) { |
625 | - let that = this; | ||
626 | - // setInterval(function () { | ||
627 | - let item = _data[i]; | ||
628 | - let timer = ClassDataProxy.getTimeCountDown(item.meetingBeginTime,item.meetingEndTime) | ||
629 | - /* if(timer.indexOf(':')!=-1){ | ||
630 | - myCurriculumInfo.empty(); | ||
631 | - }*/ | ||
632 | - let isShow = 0; | ||
633 | - if(timer.split(':')[1] || timer.split(':')[1] > 10){ | ||
634 | - isShow = 1; | 624 | + let item = _data[i]; |
625 | + if (item) { | ||
626 | + let lastTimer = 0; | ||
627 | + let timer = ClassDataProxy.getTimeCountDown(item.meetingBeginTime, item.meetingEndTime) | ||
628 | + if(timer.indexOf('|') !=-1){ | ||
629 | + timer = timer.substr(0,timer.length-1); | ||
630 | + lastTimer = 1; | ||
631 | + }else if(timer.indexOf('.') !=-1){ | ||
632 | + timer = timer.substr(0,timer.length-1); | ||
633 | + lastTimer = 0; | ||
635 | } | 634 | } |
636 | - loger.log('newTimenewTimenewTimenewTime',isShow) | ||
637 | - if (item) { | ||
638 | - let curInfo = that._format(curriculumList, { | ||
639 | - _infoTit: item.meeting_name, | ||
640 | - _meetingNumber: item.meetingNumber, | ||
641 | - //_countDown:timer , | ||
642 | - _countDown:"准备", | ||
643 | - // _isShow: (isShow == 1) ? 'none' : 'block' | ||
644 | - }) | 635 | + let curInfo = that._format(curriculumList, { |
636 | + _infoTit: item.meeting_name, | ||
637 | + _meetingNumber: item.meetingNumber, | ||
638 | + _countDown: timer, | ||
639 | + _isShow: (lastTimer == 1) ? 'none' : 'block' | ||
640 | + }) | ||
645 | myCurriculumInfo.append(curInfo); | 641 | myCurriculumInfo.append(curInfo); |
646 | - } else { | ||
647 | - console.error('_gainClassData没数据') | ||
648 | - } | ||
649 | - // },1000) | 642 | + } else { |
643 | + console.error('_gainClassData没数据') | ||
644 | + } | ||
650 | } | 645 | } |
651 | - } | 646 | + },1000) |
652 | } | 647 | } |
653 | } | 648 | } |
654 | - //学生端首页学习数据 | 649 | + //学生端首页 待学习数据 |
655 | _studentStudyModule(){ | 650 | _studentStudyModule(){ |
656 | let studentMyCenterContentList = $('#studentMyCenterContentList'); | 651 | let studentMyCenterContentList = $('#studentMyCenterContentList'); |
657 | let that = this; | 652 | let that = this; |
@@ -790,54 +785,6 @@ class MyCenterApe extends Ape { | @@ -790,54 +785,6 @@ class MyCenterApe extends Ape { | ||
790 | 785 | ||
791 | } | 786 | } |
792 | 787 | ||
793 | -/* //老师端课程数据 | ||
794 | - _teacherCourseRender(_data){ | ||
795 | - let courseMinuteList = $('#courseMinuteList'); | ||
796 | - courseMinuteList.empty(); | ||
797 | - let count = _data.count; | ||
798 | - let page = _data.page; | ||
799 | - let pageno = _data.pageno; | ||
800 | - let pagenum = Math.ceil(count / pageno); | ||
801 | - let _dataList = _data.meetingInfo; | ||
802 | - this.pageNo1 = pagenum; | ||
803 | - $('#courseMinutePageMsg').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | ||
804 | - | ||
805 | - if(count <= 12){ | ||
806 | - $('#courseMinutePageBox').hide(); | ||
807 | - } | ||
808 | - //存储数据按日期分类 | ||
809 | - this.dataList={}; | ||
810 | - for(let i = 0;i<_dataList.length;i++){ | ||
811 | - let item=_dataList[i]; | ||
812 | - if(item){ | ||
813 | - let temp = item.beginTime.split(' ')[0] | ||
814 | - if(!this.dataList[temp]) { | ||
815 | - this.dataList[temp] = []; | ||
816 | - } | ||
817 | - this.dataList[temp].push(item) | ||
818 | - } | ||
819 | - } | ||
820 | - for(let key in this.dataList){ | ||
821 | - let j = (key%4)==3; | ||
822 | - let arrList = this.dataList[key]; | ||
823 | - if(arrList){ | ||
824 | - for(let n = 0;n<arrList.length;n++){ | ||
825 | - | ||
826 | - let _classifyList = this._format(classifyList,{ | ||
827 | - _classifyListR : j?'classifyListR':'', | ||
828 | - _isShowTitle : n == 0 ?'block':'none', | ||
829 | - _meetingNumber : arrList[n].meetingNumber, | ||
830 | - _msgImg : '../images/u373.png', | ||
831 | - _meetingName : arrList[n].meetingName, | ||
832 | - _create_user : arrList[n].create_user, | ||
833 | - _liveTimer : key | ||
834 | - }) | ||
835 | - courseMinuteList.append(_classifyList) | ||
836 | - } | ||
837 | - } | ||
838 | - } | ||
839 | - }*/ | ||
840 | - | ||
841 | //学生端 我的课程 切换 | 788 | //学生端 我的课程 切换 |
842 | _myCenterBoxHandler(){ | 789 | _myCenterBoxHandler(){ |
843 | if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_2){ | 790 | if(ClassDataProxy.userType == ClassDataProxy.USER_TYPE_2){ |
@@ -279,8 +279,8 @@ class MyCoursesApe extends Ape { | @@ -279,8 +279,8 @@ class MyCoursesApe extends Ape { | ||
279 | this._teacherCurriculumInfo(data,8,ind,function(_data){ | 279 | this._teacherCurriculumInfo(data,8,ind,function(_data){ |
280 | //首页直播信息渲染 | 280 | //首页直播信息渲染 |
281 | if(_data){ | 281 | if(_data){ |
282 | - that._teacherCourse(_data.returnData.data); | ||
283 | that._teacherLivePage(_data.returnData.data); | 282 | that._teacherLivePage(_data.returnData.data); |
283 | + that._teacherCourse(_data.returnData.data); | ||
284 | } | 284 | } |
285 | }) | 285 | }) |
286 | } | 286 | } |
@@ -291,8 +291,8 @@ class MyCoursesApe extends Ape { | @@ -291,8 +291,8 @@ class MyCoursesApe extends Ape { | ||
291 | this._teacherCurriculumInfo(data,8,ind,function(_data){ | 291 | this._teacherCurriculumInfo(data,8,ind,function(_data){ |
292 | //首页直播信息渲染 | 292 | //首页直播信息渲染 |
293 | if(_data){ | 293 | if(_data){ |
294 | - that._teacherCourse(_data.returnData.data); | ||
295 | that._teacherNotPage(_data.returnData.data); | 294 | that._teacherNotPage(_data.returnData.data); |
295 | + that._teacherCourse(_data.returnData.data); | ||
296 | } | 296 | } |
297 | }) | 297 | }) |
298 | } | 298 | } |
@@ -300,11 +300,11 @@ class MyCoursesApe extends Ape { | @@ -300,11 +300,11 @@ class MyCoursesApe extends Ape { | ||
300 | _teacherEndLiveModule(ind){ | 300 | _teacherEndLiveModule(ind){ |
301 | let data = {siteId:ClassDataProxy.siteId,create_user : ClassDataProxy.loginName,meetingStatus:4}; | 301 | let data = {siteId:ClassDataProxy.siteId,create_user : ClassDataProxy.loginName,meetingStatus:4}; |
302 | let that = this; | 302 | let that = this; |
303 | - this._teacherCurriculumInfo(data,4,ind,function(_data){ | 303 | + this._teacherCurriculumInfo(data,8,ind,function(_data){ |
304 | //首页直播信息渲染 | 304 | //首页直播信息渲染 |
305 | if(_data){ | 305 | if(_data){ |
306 | - that._teacherCourse(_data.returnData.data); | ||
307 | that._teacherOverPage(_data.returnData.data); | 306 | that._teacherOverPage(_data.returnData.data); |
307 | + that._teacherCourse(_data.returnData.data); | ||
308 | } | 308 | } |
309 | }) | 309 | }) |
310 | } | 310 | } |
@@ -343,7 +343,7 @@ class MyCoursesApe extends Ape { | @@ -343,7 +343,7 @@ class MyCoursesApe extends Ape { | ||
343 | let _dataList = _data.meetingInfo; | 343 | let _dataList = _data.meetingInfo; |
344 | this.pageNoT = pagenum; | 344 | this.pageNoT = pagenum; |
345 | $('#courseMinutePageMsg0').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | 345 | $('#courseMinutePageMsg0').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); |
346 | - if(count <=4){ | 346 | + if(count <=8){ |
347 | $('#courseMinutePageBox0').hide(); | 347 | $('#courseMinutePageBox0').hide(); |
348 | } | 348 | } |
349 | } | 349 | } |
@@ -357,7 +357,7 @@ class MyCoursesApe extends Ape { | @@ -357,7 +357,7 @@ class MyCoursesApe extends Ape { | ||
357 | let _dataList = _data.meetingInfo; | 357 | let _dataList = _data.meetingInfo; |
358 | this.pageNoT = pagenum; | 358 | this.pageNoT = pagenum; |
359 | $('#courseMinutePageMsg1').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | 359 | $('#courseMinutePageMsg1').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); |
360 | - if(count <=4){ | 360 | + if(count <=8){ |
361 | $('#courseMinutePageBox1').hide(); | 361 | $('#courseMinutePageBox1').hide(); |
362 | } | 362 | } |
363 | } | 363 | } |
@@ -371,7 +371,7 @@ class MyCoursesApe extends Ape { | @@ -371,7 +371,7 @@ class MyCoursesApe extends Ape { | ||
371 | let _dataList = _data.meetingInfo; | 371 | let _dataList = _data.meetingInfo; |
372 | this.pageNoT = pagenum; | 372 | this.pageNoT = pagenum; |
373 | $('#courseMinutePageMsg2').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); | 373 | $('#courseMinutePageMsg2').html('第'+page+'页/共'+pagenum+'页,有'+count+'个记录'); |
374 | - if(count <=4){ | 374 | + if(count <=8){ |
375 | $('#courseMinutePageBox2').hide(); | 375 | $('#courseMinutePageBox2').hide(); |
376 | } | 376 | } |
377 | } | 377 | } |
@@ -380,6 +380,9 @@ class MyCoursesApe extends Ape { | @@ -380,6 +380,9 @@ class MyCoursesApe extends Ape { | ||
380 | //学生端 我的课程 切换 | 380 | //学生端 我的课程 切换 |
381 | studentCourses(){ | 381 | studentCourses(){ |
382 | let ind = $('#courseInfoList .liveInfoLeftLiCheck').attr('data'); | 382 | let ind = $('#courseInfoList .liveInfoLeftLiCheck').attr('data'); |
383 | + $('#courseMinutePageBox0').hide(); | ||
384 | + $('#courseMinutePageBox1').hide(); | ||
385 | + $('#courseMinutePageBox2').hide(); | ||
383 | switch (parseInt(ind)){ | 386 | switch (parseInt(ind)){ |
384 | case 0: | 387 | case 0: |
385 | //待学习 | 388 | //待学习 |
@@ -51,7 +51,7 @@ let _managementHomePageApe; | @@ -51,7 +51,7 @@ let _managementHomePageApe; | ||
51 | let _createClassApe; | 51 | let _createClassApe; |
52 | let _createUserApe; | 52 | let _createUserApe; |
53 | let _createGradeApe; | 53 | let _createGradeApe; |
54 | -let _aboutClassApe; | 54 | +let _aboutClassApe;//约课管理 |
55 | let _listDetailsApe; | 55 | let _listDetailsApe; |
56 | let _administratorApe; | 56 | let _administratorApe; |
57 | let _playRecordApe; | 57 | let _playRecordApe; |
@@ -70,7 +70,7 @@ let _headSwitchTitleApe; | @@ -70,7 +70,7 @@ let _headSwitchTitleApe; | ||
70 | 70 | ||
71 | class Main { | 71 | class Main { |
72 | constructor() { | 72 | constructor() { |
73 | - this.clientVersion="v1.8.10.20171011"; | 73 | + this.clientVersion="v1.9.0.20171012"; |
74 | loger.warn("clientVersion:"+this.clientVersion); | 74 | loger.warn("clientVersion:"+this.clientVersion); |
75 | 75 | ||
76 | let locationProtocol= location.protocol; | 76 | let locationProtocol= location.protocol; |
@@ -298,11 +298,11 @@ class Main { | @@ -298,11 +298,11 @@ class Main { | ||
298 | break; | 298 | break; |
299 | case 3: | 299 | case 3: |
300 | //用户管理 | 300 | //用户管理 |
301 | - _createUserApe.userAdminHandler(1); | 301 | + _createUserApe.manageUserList(); |
302 | break; | 302 | break; |
303 | case 4: | 303 | case 4: |
304 | //约课管理 | 304 | //约课管理 |
305 | - _aboutClassApe.userAdminHandler(1); | 305 | + _aboutClassApe.aboutClass(); |
306 | break; | 306 | break; |
307 | case 5: | 307 | case 5: |
308 | //录制管理 | 308 | //录制管理 |
@@ -351,6 +351,7 @@ class Main { | @@ -351,6 +351,7 @@ class Main { | ||
351 | //预约成功重新渲染数据 | 351 | //预约成功重新渲染数据 |
352 | orderFinish(){ | 352 | orderFinish(){ |
353 | _homeApe.homeAllDate(); | 353 | _homeApe.homeAllDate(); |
354 | + _myCenterApe._studentCourseModule(); | ||
354 | } | 355 | } |
355 | //判断登录用户的状态 | 356 | //判断登录用户的状态 |
356 | _localStorageState(){ | 357 | _localStorageState(){ |
@@ -191,37 +191,28 @@ class ClassDataProxy { | @@ -191,37 +191,28 @@ class ClassDataProxy { | ||
191 | //计算时间戳倒计时 | 191 | //计算时间戳倒计时 |
192 | static getTimeCountDown(start,end){ | 192 | static getTimeCountDown(start,end){ |
193 | 193 | ||
194 | -/* | ||
195 | - var date1 = new Date('2013/04/02 18:00') | ||
196 | - var date2 = new Date('2013/04/02 19:22:21') | ||
197 | - | ||
198 | - var s1 = date1.getTime(),s2 = date2.getTime(); | ||
199 | - var total = (s2 - s1)/1000; | ||
200 | - | ||
201 | - | ||
202 | - var day = parseInt(total / (24*60*60));//计算整数天数 | ||
203 | - var afterDay = total - day*24*60*60;//取得算出天数后剩余的秒数 | ||
204 | - var hour = parseInt(afterDay/(60*60));//计算整数小时数 | ||
205 | - var afterHour = total - day*24*60*60 - hour*60*60;//取得算出小时数后剩余的秒数 | ||
206 | - var min = parseInt(afterHour/60);//计算整数分 | ||
207 | - var afterMin = total - day*24*60*60 - hour*60*60 - min*60;//取得算出分后剩余的秒数*/ | ||
208 | - | ||
209 | - //当前时间 | ||
210 | - let newDate = Date.parse(new Date()); | ||
211 | - //开始时间 | ||
212 | - let newTime = Date.parse(new Date(start)) | ||
213 | - //结束时间 | ||
214 | - let endTime = Date.parse(new Date(end)) | ||
215 | - | ||
216 | - let t = newDate - endTime; | ||
217 | - let y = newDate - newTime; | ||
218 | - | ||
219 | - let newY = Math.abs(y) | ||
220 | - | ||
221 | - let hour=Math.floor(newY/1000/60/60%24); | ||
222 | - let min=Math.floor(newY/1000/60%60); | ||
223 | - let sec=Math.floor(newY/1000%60); | ||
224 | - | 194 | + let now = new Date(), //现在的时间 |
195 | + last = new Date(start), //开始上课时间 | ||
196 | + | ||
197 | + eend = new Date(end), | ||
198 | + now_second = now.getTime(), //计算现在的毫秒数为多少(记住是从1970,1,1开始算起的) | ||
199 | + last_second = last.getTime(), //同上 | ||
200 | + reserve_second = last.getTime() + 600000, | ||
201 | + end_second = eend.getTime(), | ||
202 | + gaptime = parseInt((last_second - now_second)/1000), //计算的是结束时间到现在时间的差(单位为秒) | ||
203 | + reserveTime = parseInt((reserve_second - now_second)/1000),//提前十分钟 | ||
204 | + endTime = parseInt((end_second - now_second)/1000), | ||
205 | + //这里是计算还剩多少天数(一天24小时,一小时60分钟,一分钟60秒,一秒钟1000毫秒) | ||
206 | + date = parseInt(gaptime/(24*60*60)), | ||
207 | + hour = parseInt((gaptime/3600)%24), //这里是计算还剩多少小时 | ||
208 | + min = parseInt((gaptime/60)%60), //这里是计算还剩多少分钟 | ||
209 | + sec = parseInt(gaptime%60); //这里是计算还剩多少秒数 | ||
210 | + | ||
211 | + if( date == 0){ | ||
212 | + date = '' | ||
213 | + }else{ | ||
214 | + date = "0" + date + ":"; | ||
215 | + } | ||
225 | if (hour < 10) { | 216 | if (hour < 10) { |
226 | hour = "0" + hour; | 217 | hour = "0" + hour; |
227 | } | 218 | } |
@@ -231,18 +222,22 @@ class ClassDataProxy { | @@ -231,18 +222,22 @@ class ClassDataProxy { | ||
231 | if (sec < 10) { | 222 | if (sec < 10) { |
232 | sec = "0" + sec; | 223 | sec = "0" + sec; |
233 | } | 224 | } |
234 | - console.log('ssssssssssssss',t) | ||
235 | - if(t < 0){ | ||
236 | - if( y < 0){ | ||
237 | - return hour + ":" + min + ":" + sec; | 225 | + |
226 | + let result; | ||
227 | + if(gaptime > 0){ | ||
228 | + if(reserveTime<0){ | ||
229 | + result = date + hour + ":" + min + ":" + sec + '.'; | ||
238 | }else{ | 230 | }else{ |
239 | - return '马上加入'; | 231 | + result = date + hour + ":" + min + ":" + sec+ '|'; |
240 | } | 232 | } |
241 | }else{ | 233 | }else{ |
242 | - return '已结束'; | 234 | + if(gaptime != 0){ |
235 | + result = '马上加入'; | ||
236 | + }else{ | ||
237 | + result = '已结束'; | ||
238 | + } | ||
243 | } | 239 | } |
244 | - | ||
245 | - | 240 | + return result; |
246 | } | 241 | } |
247 | //判断是否是今天 | 242 | //判断是否是今天 |
248 | static getTimeDay(start){ | 243 | static getTimeDay(start){ |
@@ -255,7 +250,7 @@ class ClassDataProxy { | @@ -255,7 +250,7 @@ class ClassDataProxy { | ||
255 | let d_month = oldDate.getMonth()+1; | 250 | let d_month = oldDate.getMonth()+1; |
256 | let d_day = oldDate.getDate(); | 251 | let d_day = oldDate.getDate(); |
257 | 252 | ||
258 | - if(month == d_month && day == d_day){ | 253 | + if(month <= d_month && day <= d_day){ |
259 | return true; | 254 | return true; |
260 | } else { | 255 | } else { |
261 | return false; | 256 | return false; |
-
请 注册 或 登录 后发表评论