controllers.min.js 17.8 KB
!function(e){e.baseCtrl=function(){},e.baseCtrl.prototype.getContext=function(){}}(gxb.controllers),function(e){e.registerNamespace("gxb.controllers.portal"),e.registerNamespace("gxb.controllers.mooc"),e.registerNamespace("gxb.controllers.mobile"),e.registerNamespace("gxb.controllers.anniversary"),e.registerNamespace("gxb.controllers.teacher"),e.registerNamespace("gxb.controllers.kegongchang"),e.registerNamespace("gxb.controllers.mooc.activities"),e.registerNamespace("gxb.controllers.platform")}(gxb.components),function(e,o){e.anniversary.Ann2016Ctrl=function(e){var o;e.$scope.pre=function(){var e=parseInt($(".teacher_box_ul").css("left")),t=$(".teacher_box_ul li").length-5;o=e==-221*t?-221*t:e-221,$(".teacher_box_ul").css("left",o+"px")},e.$scope.next=function(){var e=parseInt($(".teacher_box_ul").css("left"));o=0==e?0:e+221,$(".teacher_box_ul").css("left",o+"px")}},e.inheritFromCtrl(e.anniversary.Ann2016Ctrl),e.registerDependency("gxb.controllers.anniversary.Ann2016Ctrl",[]),e.registerView("gxb.controllers.anniversary.Ann2016Ctrl","business/anniversary/2016")}(gxb.controllers,gxb.utils),function(e,o){e.platform.cloudCtrl=function(e){},e.inheritFromCtrl(e.platform.cloudCtrl),e.registerDependency("gxb.controllers.platform.cloudCtrl",[]),e.registerView("gxb.controllers.platform.cloudCtrl","business/cloud/index")}(gxb.controllers,gxb.utils),function(e,o){e.portal.homeCtrl=function(e){e.$scope.tabs=0,e.$scope.curPage=1,e.$scope.pageSize=20,e.$scope.newHot="new",e.$scope.searchText="",e.$scope.mklist={},e.$scope.yxslist={},e.$scope.wklist={},e.$scope.mklistdetail={},e.$homeSrv.getCategorys().then(function(o){if(e.$scope.categorys=o.data||[],e.$scope.categorys.length>0)for(var t=0;t<e.$scope.categorys.length;t++)e.$scope.categorys[t].categoryId==o.mkcategoryId&&(e.$scope.mklist=e.$scope.categorys[t],e.$scope.getmklist(e.$scope.categorys[t].childList[0].categoryId));e.$scope.$apply()}),e.$scope.goAnniversary=function(){window.location.href=gxb.utils.urlUtils.resolveUrl("/#/2016")},e.$scope.goHuik=function(){window.open("http://www.huikedu.com/")},e.$homeSrv.getRelatedCourse(1,5,"jingcaishiting").then(function(o){e.$scope.wklist=o.dataList||[],e.$scope.$apply()});e.$scope.getmklist=function(o){e.$homeSrv.getCategorysList(e.$scope.curPage,e.$scope.pageSize,e.$scope.searchText,e.$scope.newHot,o).then(function(o){e.$scope.mklistdetail=o.dataList||[],e.$scope.$apply()})},e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})},e.$scope.goBanner1Deatil=function(){window.location.href=o.urlUtils.resolveUrl("/#/mooc/activities/showdata")},e.$scope.linkToTeaching=function(){window.location.href=o.urlUtils.resolveUrl("/#/mooc/activities/teaching")},e.$scope.linkToSmartclass=function(){window.location.href=o.urlUtils.resolveUrl("/#/mooc/activities/smartclass")},e.$scope.linkToFenbi=function(){window.location.href=o.urlUtils.resolveUrl("/#/mooc/activities/findchalk")};var t=0,s=setInterval(function(){4==t&&(t=0),0==t&&(e.$scope.show12=!0,e.$scope.show34=!1,e.$scope.show56=!1,e.$scope.show78=!1),1==t&&(e.$scope.show12=!1,e.$scope.show34=!0,e.$scope.show56=!1,e.$scope.show78=!1),2==t&&(e.$scope.show12=!1,e.$scope.show34=!1,e.$scope.show56=!0,e.$scope.show78=!1),3==t&&(e.$scope.show12=!1,e.$scope.show34=!1,e.$scope.show56=!1,e.$scope.show78=!0),t++,e.$scope.$apply()},3e3);e.$scope.stopSlider=function(){clearInterval(s)};var i=0;setInterval(function(){5==i&&(i=0),0==i&&(e.$scope.Topshow3=!1,e.$scope.Topshow4=!1,e.$scope.Topshow5=!1,e.$scope.Topshow6=!1,e.$scope.Topshow7=!0),1==i&&(e.$scope.Topshow3=!1,e.$scope.Topshow4=!1,e.$scope.Topshow5=!1,e.$scope.Topshow6=!0,e.$scope.Topshow7=!1),2==i&&(e.$scope.Topshow3=!0,e.$scope.Topshow4=!1,e.$scope.Topshow5=!1,e.$scope.Topshow6=!1,e.$scope.Topshow7=!1),3==i&&(e.$scope.Topshow3=!1,e.$scope.Topshow4=!0,e.$scope.Topshow5=!1,e.$scope.Topshow6=!1,e.$scope.Topshow7=!1),4==i&&(e.$scope.Topshow3=!1,e.$scope.Topshow4=!1,e.$scope.Topshow5=!0,e.$scope.Topshow6=!1,e.$scope.Topshow7=!1),i++,e.$scope.$apply()},4e3)},e.inheritFromCtrl(e.portal.homeCtrl),e.registerDependency("gxb.controllers.portal.homeCtrl",["gxb.services.home.homeSrv"]),e.registerView("gxb.controllers.portal.homeCtrl","business/index")}(gxb.controllers,gxb.utils),function(e,o){e.kegongchang.kgcCtrl=function(e){var o=function(e){e=e||{},this.classId=e.classId||null,this.chapterId=e.chapterId||null,this.video={uuid:e.uuid||null,title:e.uuid||null,file:e.filePath||null,srt:e.srtPath||null,cover:e.coverPath||null},this.time=e.time||0,this.localHost=e.localHost||{},this.isNormal=e.isNormal||!1,this.isPreview=e.isPreview||!0};$(".more").click(function(){window.open("http://www.kegongchang.com/")}),e.$scope.playInfo={playing:!1,title:""},e.$scope.closeVideo=function(){e.$scope.playInfo.playing=!1,$("#videoPlayer").empty(),$(".img-mask").css({display:"none"})},e.$scope.onPreview=function(t){$("#videoPlayer").empty();var s="<gxbvideo data='data'></gxbvideo>",i=e.$scope.$new();i.data=new o(t),$("#videoPlayer").append(e.$compile(s)(i)[0]),$(".img-mask").css({display:"block"}),window.setTimeout(function(){e.$scope.playInfo.playing=!0,e.$scope.playInfo.title=t.title},30)}},e.inheritFromCtrl(e.kegongchang.kgcCtrl),e.registerDependency("gxb.controllers.kegongchang.kgcCtrl",[]),e.registerView("gxb.controllers.kegongchang.kgcCtrl","business/kgc/index")}(gxb.controllers,gxb.utils),function(e,o){e.mobile.mobileCtrl=function(e){},e.inheritFromCtrl(e.mobile.mobileCtrl),e.registerDependency("gxb.controllers.mobile.mobileCtrl",[]),e.registerView("gxb.controllers.mobile.mobileCtrl","business/mobile/index")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.bigdataCtrl=function(e){e.$scope.classId01=10476,e.$scope.classId02=10475,e.$scope.classId03=10474,e.$scope.classId04=10473,e.$scope.classId05=10472,e.$scope.classId06=10471,e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})}},e.inheritFromCtrl(e.mooc.activities.bigdataCtrl),e.registerDependency("gxb.controllers.mooc.activities.bigdataCtrl",[]),e.registerView("gxb.controllers.mooc.activities.bigdataCtrl","business/mooc/activities/bigdata")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.CxcyCtrl=function(e){},e.inheritFromCtrl(e.mooc.activities.CxcyCtrl),e.registerDependency("gxb.controllers.mooc.activities.CxcyCtrl",[]),e.registerView("gxb.controllers.mooc.activities.CxcyCtrl","business/mooc/activities/cxcy")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.findchalkCtrl=function(e){},e.inheritFromCtrl(e.mooc.activities.findchalkCtrl),e.registerDependency("gxb.controllers.mooc.activities.findchalkCtrl",[]),e.registerView("gxb.controllers.mooc.activities.findchalkCtrl","business/mooc/activities/findchalk")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.operationCtrl=function(e){e.$scope.classId01=10676,e.$scope.classId02=10677,e.$scope.classId03=10702,e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})}},e.inheritFromCtrl(e.mooc.activities.operationCtrl),e.registerDependency("gxb.controllers.mooc.activities.operationCtrl",[]),e.registerView("gxb.controllers.mooc.activities.operationCtrl","business/mooc/activities/operation")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.showdataCtrl=function(e){function o(){var e=$(".bagPic");e.animate({left:"0",opacity:"0"},500,function(){e.animate({left:"224px",opacity:"0.3"},500,function(){e.animate({left:"112px",opacity:"1"},500)})})}var t=function(e){e=e||{},this.classId=e.classId||null,this.chapterId=e.chapterId||null,this.video={uuid:e.uuid||null,title:e.uuid||null,file:e.filePath||null,srt:e.srtPath||null,cover:e.coverPath||null},this.time=e.time||0,this.localHost=e.localHost||{},this.isNormal=e.isNormal||!1,this.isPreview=e.isPreview||!0},s=new CountUp("cont1-num1",107900,108148,0,2.5),i=new CountUp("cont1-num2",35800,36034,0,2.5),c=!0;$(window).scroll(function(){$(this).scrollTop()>900?c&&(o(),c=!1):0==$(this).scrollTop()&&($(".bagPic").css("left","112px"),$(".bagPic").css("opacity","1"),c=!0),$(window).scrollTop()>=3195&&(s.start(),i.start()),$(window).scrollTop()>=4118&&$(".floatLayerBox").hide()}),$(".levelTit li").click(function(){s=new CountUp("cont1-num1",108e3,108148,0,2.5),i=new CountUp("cont1-num2",35900,36034,0,2.5);var e=new CountUp("cont2-num1",133600,133765,0,2.5),o=new CountUp("cont2-num2",7e4,70171,0,2.5),t=new CountUp("cont3-num1",49e3,49226,0,2.5),c=new CountUp("cont3-num2",66800,66915,0,2.5),n=new CountUp("cont3-num3",34800,34956,0,2.5),r=$(this).index();$(this).addClass("cur").siblings().removeClass("cur"),$(".levelCont").children(".contShow").hide().eq(r).show(),0==r?(s.start(),i.start()):1==r?(e.start(),o.start()):(t.start(),c.start(),n.start())}),$(".floatLayerBox .floatLayerClose").click(function(){$(this).parents(".floatLayerBox").hide()}),new ZoomPic("jswbox"),e.$scope.playInfo={playing:!1,title:""},e.$scope.closeVideo=function(){e.$scope.playInfo.playing=!1,$("#videoPlayer").empty(),$(".img-mask").css({display:"none"})},e.$scope.onPreview=function(o){$("#videoPlayer").empty();var s="<gxbvideo data='data'></gxbvideo>",i=e.$scope.$new();i.data=new t(o),$("#videoPlayer").append(e.$compile(s)(i)[0]),$(".img-mask").css({display:"block"}),window.setTimeout(function(){e.$scope.playInfo.playing=!0,e.$scope.playInfo.title=o.title},30)},$(".bookBox a").click(function(){var e=$(this).index();$(".contactTip").show(),$(".contactTip").removeClass("animateStyle").addClass("animateStyle").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){$(this).removeClass("animateStyle")}),0==e?$("#bookName").html("创新创业解决方案"):1==e?$("#bookName").html("互联网+解决方案"):2==e?$("#bookName").html("核心能力解决方案"):3==e&&$("#bookName").html("综合素养解决方案")})},e.inheritFromCtrl(e.mooc.activities.bigdataCtrl),e.registerDependency("gxb.controllers.mooc.activities.showdataCtrl",[]),e.registerView("gxb.controllers.mooc.activities.showdataCtrl","business/mooc/activities/showdata")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.smartclassCtrl=function(e){},e.inheritFromCtrl(e.mooc.activities.smartclassCtrl),e.registerDependency("gxb.controllers.mooc.activities.smartclassCtrl",[]),e.registerView("gxb.controllers.mooc.activities.smartclassCtrl","business/mooc/activities/smartclass")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.startupCtrl=function(e){e.$scope.classId01=10569,e.$scope.classId02=10572,e.$scope.classId03=10571,e.$scope.classId04=10570,e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})}},e.inheritFromCtrl(e.mooc.activities.startupCtrl),e.registerDependency("gxb.controllers.mooc.activities.startupCtrl",[]),e.registerView("gxb.controllers.mooc.activities.startupCtrl","business/mooc/activities/startup")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.teachingCtrl=function(e){},e.inheritFromCtrl(e.mooc.activities.teachingCtrl),e.registerDependency("gxb.controllers.mooc.activities.teachingCtrl",[]),e.registerView("gxb.controllers.mooc.activities.teachingCtrl","business/mooc/activities/teaching")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.activities.wordCtrl=function(e){e.$scope.classId01=10610,e.$scope.classId02=10666,e.$scope.classId03=10687,e.$scope.classId04=10668,e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})}},e.inheritFromCtrl(e.mooc.activities.wordCtrl),e.registerDependency("gxb.controllers.mooc.activities.wordCtrl",[]),e.registerView("gxb.controllers.mooc.activities.wordCtrl","business/mooc/activities/word")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.courseCtrl=function(e){e.$scope.curPage=1,e.$scope.pageSize=8,e.$scope.newHot="new",e.$scope.searchText="",e.$scope.categoryId="",e.$scope.mklist=[];var o=function(){e.$scope.ngPaginationConfig={pageCount:1,visiblePageCount:5,prevText:"Prev",nextText:"Next",showIfOnePage:!1,pagenums:[]};var o="<gxbtmpagination conf='ngPaginationConfig' page-count='ngPaginationConfig.pageCount' current-page='currentPage' on-page-change='onPageChange()'></gxbtmpagination>",t=e.$scope.$new();$("#pagination").empty(),$("#pagination").append(e.$compile(o)(t)[0])};o(),e.$scope.onPageChange=function(){curPage=this.currentPage,t(curPage,e.$scope.pageSize,e.$scope.searchText,e.$scope.newHot,e.$scope.mklistParent),e.$scope.$apply()};var t=function(o,t,s,i,c){e.$scope.labstatus=s,e.$homeSrv.getCategorysList(o,t,s,i,c).then(function(o){if(e.$scope.mklistdetail=o.dataList||[],e.$scope.mklistdetail.length>4?e.$scope.lengthHeight="Height8":e.$scope.lengthHeight="Height4",e.$scope.total=o.paging.total,e.$scope.ngPaginationConfig.pageCount=o.paging.totalPage,e.$scope.ngPaginationConfig.visiblePageCount=o.paging.totalPage>5?5:o.paging.totalPage,0==e.$scope.ngPaginationConfig.pagenums.length)for(var t=0;t<e.$scope.ngPaginationConfig.visiblePageCount;t++)e.$scope.ngPaginationConfig.pagenums.push(t+1);e.$scope.$apply()})};e.$homeSrv.getCategorys().then(function(o){e.$scope.categorys=o.data||[],e.$scope.getmklist("",-1,-2)}),e.$scope.categorysList=function(o){for(var t=0;t<e.$scope.categorys.length;t++)e.$scope.categorys[t].categoryId==o&&(e.$scope.mklist=e.$scope.categorys[t].childList||[],e.$scope.mklistParent=e.$scope.categorys[t].categoryId)},e.$scope.mklistNone=function(){e.$scope.mklist=[]},e.$scope.getmklist=function(s,i,c){e.$scope.searchText="",e.$scope.tab=i,e.$scope.tab_2=c,e.$scope.tab_22="",e.$scope.ngPaginationConfig.pagenums=[],e.$scope.mklistParent=s,o(),t(e.$scope.curPage,e.$scope.pageSize,e.$scope.searchText,e.$scope.newHot,s)},e.$scope.getmklist2=function(s,i){e.$scope.searchText="",e.$scope.tab_22=i,e.$scope.tab_2=i,e.$scope.ngPaginationConfig.pagenums=[],e.$scope.mklistParent=s,o(),t(e.$scope.curPage,e.$scope.pageSize,e.$scope.searchText,e.$scope.newHot,s)},e.$scope.search=function(){e.$scope.ngPaginationConfig.pagenums=[],e.$scope.searchText=e.$scope.searchText,o(),t(e.$scope.curPage,e.$scope.pageSize,e.$scope.searchText,e.$scope.newHot,e.$scope.categoryId)},e.$scope.myKeyup=function(o){var t=window.event?o.keyCode:o.which;13==t&&e.$scope.search()}},e.inheritFromCtrl(e.mooc.courseCtrl),e.registerDependency("gxb.controllers.mooc.courseCtrl",["gxb.services.home.homeSrv"]),e.registerView("gxb.controllers.mooc.courseCtrl","business/mooc/course")}(gxb.controllers,gxb.utils),function(e,o){e.mooc.itemCtrl=function(e){var o=e.$stateParams.classId,t=function(e){e=e||{},this.classId=e.classId||null,this.chapterId=e.chapterId||null,this.video={uuid:e.uuid||null,title:e.uuid||null,file:e.filePath||null,srt:e.srtPath||null,cover:e.coverPath||null,contentId:e.contentId||null},this.time=e.time||0,this.localHost=e.localHost||{},this.isNormal=e.isNormal||!1,this.isPreview=e.isPreview||!1};e.$homeSrv.getCourseDetail(o).then(function(s){if(1==s.status&&(e.$scope.data=s.data||[],e.$scope.data.promotionalVideo)){$("#videoPromotionPlayer").empty();var i="<gxbvideo data='data'></gxbvideo>",c=e.$scope.$new();c.data=new t({classId:o,filePath:e.$scope.data.promotionalVideo,srtPath:e.$scope.data.promotionalVideoSrt,coverPath:e.$scope.data.courseCover||e.$scope.data.promotionalVideoCover,isPreview:!0,isNormal:!0}),$("#videoPromotionPlayer").append(e.$compile(i)(c)[0]),e.$scope.$apply()}e.$scope.$apply()}),e.$homeSrv.getChapterDetail(o).then(function(o){e.$scope.chaptersData=o.data||[],e.$scope.$apply()}),e.$scope.playInfo={playing:!1,title:""},e.$scope.closeVideo=function(){e.$scope.playInfo.playing=!1,$("#videoPlayer").empty(),$(".img-mask").css({display:"none"})},e.$scope.onPreview=function(o){$("#videoPlayer").empty();var s="<gxbvideo data='data'></gxbvideo>",i=e.$scope.$new();i.data=new t(o),$("#videoPlayer").append(e.$compile(s)(i)[0]),$(".img-mask").css({display:"block"}),window.setTimeout(function(){e.$scope.playInfo.playing=!0,e.$scope.playInfo.title=o.title},30)},e.$homeSrv.getRelatedCourse(1,3,"related").then(function(o){e.$scope.coursedata=o.dataList||[],e.$scope.$apply()}),e.$scope.goCourseItem=function(o){e.$state.go("business_mooc_item",{classId:o})}},e.inheritFromCtrl(e.mooc.courseCtrl),e.registerDependency("gxb.controllers.mooc.itemCtrl",["gxb.services.home.homeSrv","$compile","$interval"]),e.registerView("gxb.controllers.mooc.itemCtrl","business/mooc/item")}(gxb.controllers,gxb.utils),function(e,o){e.teacher.teacherCtrl=function(e){function o(){return $(".silderBtn")}function t(){return $(".teacher_slider_goBox")}e.$homeSrv.getTeacherSilder().then(function(o){e.$scope.data=o.data||[],e.$scope.$apply()});var s=function(){var o=0;setInterval(function(){var t=$(".New_sliderWrapper .indicator a").length;o==t&&(o=0),e.$scope.changeSlide(o),o++},3e3)};s(),e.$scope.changeSlide=function(e){var o=$(".New_sliderWrapper .content a"),t=$(".New_sliderWrapper .indicator a");o.removeClass("active"),o.eq(e).addClass("active"),t.removeClass("active"),t.eq(e).addClass("active")},e.$scope.gotoLogin=function(){gxb.settings.identifier.goTeacherLoginUrl()};var i=0,c=0,n=null;o().eq(0).addClass("hover"),$(".teacher_slider_goBox").css("width","3000px"),e.$scope.animate_index=function(o,t){e.$scope.setInterval_ani(o,t)},$(".silderBtn").click(function(){clearInterval(n)});var n=setInterval(function(){i++,c++,i>7?(i=0,c=0,t().css({marginLeft:"0px"})):c>6&&(c=0),e.$scope.setInterval_ani(i,c)},2600);e.$scope.setInterval_ani=function(e,t){$(".teacher_slider_goBox").animate({marginLeft:e*-242+"px"},1700,"ease-in-out"),o().removeClass("hover"),o().eq(t).addClass("hover")},e.$scope.setInterval_ani(0,0)},e.inheritFromCtrl(e.teacher.teacherCtrl),e.registerDependency("gxb.controllers.teacher.teacherCtrl",["gxb.services.home.homeSrv"]),e.registerView("gxb.controllers.teacher.teacherCtrl","business/teacher/index")}(gxb.controllers,gxb.utils),function(e){var o=e.controllers,t="gxb.controllers",s="",i=[],c=function(t,s){e.utils.objectUtils.isObjectOnly(t)||(t=i.pop()),i.length&&e.utils.objectUtils.getKeys(t,function(t,n){var r=s+"."+n;e.utils.objectUtils.isObjectOnly(t)?(i.push(t),c(t,r)):e.utils.langUtils.isFunction(t)&&o.registerController(r,o.getDependency(r))})};e.utils.objectUtils.getKeys(o,function(o,n){e.utils.objectUtils.isObjectOnly(o)&&(s=t+"."+n,i.push(o),c(o,s))})}(gxb);