(function(o,S){var A={init:function(){var e=this;e.aHrefClick(),e.fixed(),e.advert(),e.serach(),e.calendar(),e.baiduMap(),e.weather(),e.course(),e.courseWare(),e.getAjaxRoomInfo(),e.setAnimation()},aHrefClick:function(){for(var e=o("a[href]"),n=[],s=0,i=e.length;s-1||t.attr("href").indexOf("/myroom/#")>-1&&t.attr("href").indexOf("/nolimit")<0||t.attr("href").indexOf("/pay/#")>-1)&&(t.attr("clickUrl",t.attr("href")),t.removeAttr("href"))}o(".module a[clickUrl]").on("click",function(p){p.stopPropagation();var r=window.user,a=o(this).attr("clickUrl"),u=function(l){l=="STUDENT"?a.indexOf("/pay/#")>-1?window.location.href=a.indexOf("/pay/#/")>-1?a:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=a.indexOf("/myroom/#/")>-1?a:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=a.indexOf("/aroom/#/")>-1?a:window.basePath?"/"+window.basePath+"#/":"/#/"},d=function(){r.loginLayer(function(l){l.success&&r.isLogin(function(c){c.success&&u(c.data.userTypeExact)})})};getCookie("token")||getCookie("stoken")?r.isLogin(function(l){l.success?u(l.data.userTypeExact):d()}):d()})},fixed:function(){for(var e=this,n=o(".module[data-fixed]"),s=0,i=n.length;sP&&(C=!1,b=P),b<0&&(C=!0,b=0),x>_&&(N=!1,x=_),x<0&&(N=!0,x=0),B.css({transform:"translate("+b+"px, "+x+"px)"})},a["int"+g]=setInterval(function(){a["fn"+g](I,g)},i),I.hover(function(){clearInterval(a["int"+g])},function(){a["int"+g]=setInterval(function(){a["fn"+g](I,g)},i)})}(c,l,u);else{var v=parseInt(t)-parseInt(l.css("width")),y=parseInt(p)-parseInt(l.css("height"));l.css({position:"fixed",left:h<0?0:h>v?"auto":h,right:h>v?0:"auto",top:w>p?y:w,zIndex:999})}}}},serach:function(){var e=this;if(e.$search=o(".module[data-type=search]"),e.$search.length<1)return!1;for(var n=0,s=e.$search.length;n",f=new BMap.InfoWindow(c);l.openInfoWindow(f)}else message.info("\u60A8\u9009\u62E9\u5730\u5740\u6CA1\u6709\u89E3\u6790\u5230\u7ED3\u679C!")},t.city)}},weather:function(){var e=this;e.getCity()},getCity:function(){var e=this;e.$Map.length>0?e.hasScene(JSON.parse(e.$Map.eq(0).attr("data-map")).city):e.hasScene("\u676D\u5DDE")},hasScene:function(e){var n=this;o(document).ready(function(){if(n.$weather=o(".module[data-type=weather]"),n.$weather.addClass("scene"),n.$weather.length<1)return!1;loadScriptmin.apply(n,["/design/designstatic/home/js/city.js",n.scene,e])})},scene:function(e){var n=this;n.getAjaxScence(e);var s=new Vcity.CitySelector({input:"sceneCitySelect"});s.createWarp(),o(".cityBox").addClass("hide"),n.$weather.find(".scene-change").click(function(r){var a=e;o(".scene-city").hide(),o(".scene-change").hide(),o(".scene-demo").show(),o(".blackone").show(),o("#sceneCitySelect").attr("value",a),setTimeout(function(){o(".cityBox").removeClass("hide")},0)});var i=o("#cityBox a");i.click(function(){var r=o("#sceneCitySelect").val();n.getAjaxScence(r),o(".scene-city").text(r),o(".scene-city").show(),o(".scene-change").show(),o(".scene-demo").hide()});var t=o(".citySelector");t.on("click",".cityslide",function(){var r=o("#sceneCitySelect").val();n.getAjaxScence(r),o(".scene-city").text(r),o(".scene-city").show(),o(".scene-change").show(),o(".scene-demo").hide()}),o("#sceneCitySelect").on("keypress",function(r){setTimeout(function(){if(r.keyCode==13){var a=o("#sceneCitySelect").val();n.getAjaxScence(a),o(".scene-city").text(a),o(".scene-city").show(),o(".scene-change").show(),o(".scene-demo").hide()}},300)}),o(document).click(function(r){if(o(".scene-demo").css("display")=="block"&&r.target.className!="scene-change"){var a="\u676D\u5DDE",u=/[^\u4E00-\u9FA5]/g,d=o(".scene-city"),l=o("#sceneCitySelect").val(),c="";p(l.replace(u,"")+"|")!=-1&&l.replace(u,"")!=""?(c=l.replace(u,""),n.getAjaxScence(c)):c=a,o(".scene-city").text(c),o(".scene-city").show(),o(".scene-change").show(),o(this).hide(),o(".scene-demo").hide()}});function p(r){for(var a=0;a0&&(p="\u4F18\u79C0"),t<=100&&t>50&&(p="\u826F\u597D"),t<=150&&t>100&&(p="\u4E00\u822C"),t<=200&&t>150&&(p="\u5F88\u5DEE"),t>200&&(p="\u5F88\u5DEE"),o(".scene-airquality").text(t+" "+p),t||(p="\u6682\u7F3A",o(".scene-airquality").text(p));for(var r="",a="",u=/[\u4E00-\u9FA5]/g,d=[],l=[],c=o(".scene-ul li"),f=0;f<3;++f){var m=o("#day"+f);switch(d[f]=i.forecast[f].low.replace(u,""),l[f]=i.forecast[f].high.replace(u,""),i.forecast[f].type){case"\u591A\u4E91":r="cloud.png",a="cloud2.png";break;case"\u6674":r="fine.png",a="fine2.png";break;case"\u9634":r="overcast.png",a="overcast2.png";break;case"\u5C0F\u96E8":r="small_rain.png",a="small_rain2.png";break;case"\u5C0F\u5230\u4E2D\u96E8":r="stom_rain.png",a="stom_rain2.png";break;case"\u5927\u96E8":r="big_rain.png",a="big_rain2.png";break;case"\u4E2D\u5230\u5927\u96E8":r="big_rain.png",a="big_rain2.png";break;case"\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u5927\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u7279\u5927\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u5927\u5230\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u66B4\u96E8\u5230\u5927\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u5927\u66B4\u96E8\u5230\u7279\u5927\u66B4\u96E8":r="mbig_rain.png",a="mbig_rain2.png";break;case"\u96E8\u5939\u96EA":r="rain_snow.png",a="rain_snow2.png";break;case"\u9635\u96EA":r="quick_snow.png",a="quick_snow2.png";break;case"\u5C0F\u96EA":r="small_snow.png",a="small_snow2.png";break;case"\u5C0F\u5230\u4E2D\u96EA":r="mid_snow.png",a="mid_snow2.png";break;case"\u4E2D\u96EA":r="mid_snow.png",a="mid_snow2.png";break;case"\u4E2D\u5230\u5927\u96EA":r="mid_big_snow.png",a="mid_big_snow2.png";break;case"\u5927\u5230\u66B4\u96EA":r="big_snow.png",a="big_snow2.png";break;case"\u96FE":r="fog.png",a="fog2.png";break;case"\u6C99\u5C18\u66B4":r="sand.png",a="sand2.png";break;case"\u6D6E\u5C18":r="sand.png",a="sand2.png";break;case"\u626C\u6C99":r="sand.png",a="sand2.png";break;case"\u5F3A\u6C99\u5C18\u66B4":r="sand.png",a="sand2.png";break;case"\u96FE\u973E":r="sand.png",a="sand2.png";break;case"\u51BB\u96E8":r="ice_rain.png",a="ice_rain2.png";break;case"\u4E2D\u96E8":r="mid_rain.png",a="mid_rain2.png";break;case"\u96F7\u9635\u96E8\u4F34\u6709\u51B0\u96F9":r="quick_rain_ice.png",a="quick_rain_ice2.png";break;case"\u9635\u96E8":r="quick_rain.png",a="quick_rain2.png";break;case"\u96F7\u9635\u96E8":r="lquick_rain.png",a="lquick_rain2.png";break;case"\u65E0\u5929\u6C14\u7C7B\u578B":r="unknown.png",a="unknown2.png";break;default:r="unknown.png",a="unknown2.png";break}var h=c.eq(f),w=i.forecast[f];h.find(".scene-date").text(w.date),h.hasClass("scene-on")?(h.find(".scene-icon").attr("src","//static.ebanhui.com/ebh/tpl/wnl/images/"+r),h.find(".scene-temp").html(i.wendu+"\xBA")):(h.find(".scene-icon").attr("src","//static.ebanhui.com/ebh/tpl/wnl/images/"+a),h.find(".scene-temp").html(" ")),h.find(".scene-weather").text(w.type),h.find(".scene-tempSection").text(d[f]+"~"+l[f]);var v=w.fengli,y=v.replace("","",y),h.find(".scene-wind").text(w.fengxiang+" "+y)}o(".scene-city").text(e),o(".scene .scene-ul li").show()}else n.css("background","url(//static.ebanhui.com/ebh/tpl/wnl/images/wrong.png) no-repeat center"),o(".scene .scene-ul li").hide()},error:function(){n.css("background","url(//static.ebanhui.com/ebh/tpl/wnl/images/wrong.png) no-repeat center"),o(".scene .scene-ul li").hide()}})},course:function(){var e=this;e.$course=o(".module[data-type=course]");for(var n=0,s=e.$course.length;n0?(e.classify=t,e.condition=""):(e.classify=[],e.condition=n),e.condition=="\u5168\u90E8"&&(e.condition=void 0),s.getAjaxCourse(e)},getSelectHover:function(e,n,s){var i=this,t=e.classify;if(n.length>0){if(!t)i.carrySeletStyle("\u5168\u90E8",n,s);else if(t){var p=e.options;t[0]&&p.forEach(function(r){r.id==t[0]&&(t[1]?r.child.forEach(function(a){a.id==t[1]&&i.carrySeletStyle(a.name,n,s)}):i.carrySeletStyle(r.name,n,s))})}}i.getAjaxCourse(e)},carrySeletStyle:function(e,n,s){n.html(s);var i=n.find(".module[data-type=text]");Array.from(i).forEach(function(t){var p=o(t);if(p.find(".box").text().trim()==e){var r=p.find("style.hover");if(r.length>0)r.html(r.text().replace(/:hover/,""));else{var a=p.css("backgroundColor");p.css({color:a=="rgba(0, 0, 0, 0)"?"#fff":a,backgroundColor:p.css("color")})}}})},getAjaxCourse:function(e){var n=this;n.postAjaxCourseIng=!0,o.ajax({type:"get",url:"/api/course/getDressCourseInfoByIds?projectid=12",data:{condition:e.condition,courseIds:e.courseIds?e.courseIds.join(","):e.courseIds,mainClassify:e.classify[0],childClassify:e.classify[1],beginNum:e.startNum,endNum:e.endNum},contentType:"application/json;charset=utf-8",dataType:"json",success:function(s){s.success&&(clearTimeout(n.postAjaxCourseIngtime),n.postAjaxCourseIngtime=setTimeout(function(){n.postAjaxCourseIng=!1},200),n.renderCourse(e,s.data))},error:function(s){console.log("\u63A5\u53E3\u8BF7\u6C42\u5931\u8D25")}})},renderCourse:function(e,n){var s="",i,t=function(c){var f="/pages/info.html?cid="+c.courseId;return parseInt(c.courseType)==2||parseInt(c.courseType)==4?f="/pages/bundle.html?cid="+c.courseId:f="/pages/info.html?cid="+c.courseId,f},p=function(c){var f=c.courseType,m=c.price;return parseInt(f)==1||parseInt(f)==3?m>0?"/design/designstatic/design/image/course/signup"+(parseInt(e.sLState)?e.sLState:"")+".png":"/design/designstatic/design/image/course/free"+(parseInt(e.sLState)?e.sLState:"")+".png":"/design/designstatic/design/image/course/package"+(parseInt(e.sLState)?e.sLState:"")+".png"},r=function(c){return c.price>0?c.courseType=="1"||c.courseType=="3"?"\uFFE5"+c.price/100+"/"+c.deadline+"\u5929":"\uFFE5"+c.price/100:"\u514D\u8D39"};switch(e.styleType){case"wzlb":i=function(c){var f="";return parseInt(c.courseType)==2||parseInt(c.courseType)==4?f="/pages/bundle.html?cid="+c.courseId:f="/pages/info.html?cid="+c.courseId,'
  • '+c.courseName+''+c.mainTeacher+"
  • "};break;case"xtwlb":i=function(c){return'
  • '+(parseInt(e.sDesc)==1?c.introduce:"")+"
    "+(parseInt(e.sLabel)==1?'
    ':"")+'

    '+c.courseName+"

    "+(parseInt(e.sTeacher)==1?'

    '+c.mainTeacher+"

    ":"")+'

    '+(parseInt(e.sWareCount)==1?' '+c.coursewareCount+"\u8BFE\u65F6":"")+(parseInt(e.sNum)==1?''+c.popularityCount+"":"")+(parseInt(e.sPriceDate)==1?''+r(c)+"":"")+"

  • "};break;case"twlb":i=function(c){return'
  • '+(parseInt(e.sLabel)==1?'
    ':"")+'

    '+c.courseName+""+(parseInt(e.sPriceDate)==1?''+r(c)+"":"")+"

    "+(parseInt(e.sDesc)==1?'

    '+c.introduce+"

    ":"")+(parseInt(e.sTeacher)==1?'

    '+c.mainTeacher+"

    ":"")+'

    '+(parseInt(e.sWareCount)==1?' '+c.coursewareCount+"\u8BFE\u65F6":"")+(parseInt(e.sNum)==1?''+c.popularityCount+"":"")+"

  • "};break;case"ttlb":var a="";parseInt(n[0].courseType)==2||parseInt(n[0].courseType)==4?a="/pages/bundle.html?cid="+n[0].courseId:a="/pages/info.html?cid="+n[0].courseId,s+='
  • '+n[0].courseName+''+n[0].mainTeacher+''+n[0].introduce+"
  • ",i=function(c){var f="";return parseInt(c.courseType)==2||parseInt(c.courseType)==4?f="/pages/bundle.html?cid="+c.courseId:f="/pages/info.html?cid="+c.courseId,'
  • '+c.courseName+''+c.mainTeacher+"
  • "};break;case"btrqlb":i=function(c){return'
  • '+c.courseName+""+(parseInt(e.sPriceDate)==1?''+r(c)+"":"")+"

    "+(parseInt(e.sDesc)==1?'

    '+c.introduce+"

    ":"")+(parseInt(e.sTeacher)==1?'

    '+c.mainTeacher+"

    ":"")+'

    '+(parseInt(e.sWareCount)==1?' '+c.coursewareCount+"\u8BFE\u65F6":"")+(parseInt(e.sNum)==1?''+c.popularityCount+"":"")+"

  • "};break}for(var u=0,d=n.length;u'+u.courseWareName+''+u.realName+""};break;case"xtwlb":t=function(u){return'
  • '+(parseInt(e.sDesc)==1?u.introduce:"")+'

    '+u.courseWareName+"

    "+(parseInt(e.sTeacher)==1?'

    '+u.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+u.popularityCount+"":"")+(parseInt(e.sPriceDate)==1?''+(u.price?"\uFFE5"+JSON.parse(u.price)[0]/100+"/"+JSON.parse(u.price)[1]+"\u5929":"\u514D\u8D39")+"":"")+"

  • "};break;case"twlb":t=function(u){return'
  • '+u.courseWareName+""+(parseInt(e.sPriceDate)==1?''+(u.price?"\uFFE5"+JSON.parse(u.price)[0]/100+"/"+JSON.parse(u.price)[1]+"\u5929":"\u514D\u8D39")+"":"")+"

    "+(parseInt(e.sDesc)==1?'

    '+u.introduce+"

    ":"")+(parseInt(e.sTeacher)==1?'

    '+u.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+u.popularityCount+"":"")+"

  • "};break;case"ttlb":i+='
  • '+n[0].courseWareName+''+n[0].realName+''+n[0].introduce+"
  • ",t=function(u){return'
  • '+u.courseWareName+''+u.realName+"
  • "};break;case"btrqlb":t=function(u){return'
  • '+u.courseWareName+""+(parseInt(e.sPriceDate)==1?''+(u.price?"\uFFE5"+JSON.parse(u.price)[0]/100+"/"+JSON.parse(u.price)[1]+"\u5929":"\u514D\u8D39")+"":"")+"

    "+(parseInt(e.sDesc)==1?'

    '+u.introduce+"

    ":"")+(parseInt(e.sTeacher)==1?'

    '+u.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+u.popularityCount+"":"")+"

  • "};break;default:}for(var p=0,r=n.length;p'+l.title+''+s.getTimeString(l.gmtCreate)+""};break;case"xtwlb":t=function(l){return'
  • '+l.introduce+'

    '+l.title+"

    "+(parseInt(e.sTeacher)==1?'

    '+l.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+l.viewCount+"":"")+(parseInt(e.sDate)==1?''+s.getTimeString(l.gmtCreate)+"":"")+"

  • "};break;case"twlb":t=function(l){return'
  • '+l.title+'

    '+l.introduce+"

    "+(parseInt(e.sTeacher)==1?'

    '+l.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+l.viewCount+"":"")+(parseInt(e.sDate)==1?''+s.getTimeString(l.gmtCreate)+"":"")+"

  • "};break;case"ttlb":t=function(l,c){return c==0?'
  • '+l.title+''+s.getTimeString(l.gmtCreate)+''+l.detail+"
  • ":'
  • '+l.title+''+s.getTimeString(l.gmtCreate)+"
  • "};break;case"btrqlb":t=function(l){return'
  • '+l.title+'

    '+l.introduce+"

    "+(parseInt(e.sTeacher)==1?'

    '+l.realName+"

    ":"")+'

    '+(parseInt(e.sNum)==1?''+l.viewCount+"":"")+(parseInt(e.sDate)==1?''+s.getTimeString(l.gmtCreate)+"":"")+"

  • "};break;default:}for(var r=document.createElement("div"),a=0,u=n.length;a1440&&f1440&&f>s){var m=(s-1440)/2;a.css({maxWidth:s+"px",left:"-"+m+"px"}),a.find("img").css({maxWidth:s+"px"})}else s<1440&&f>s&&(a.css({maxWidth:"1440px",left:"0px"}),a.find("img").css({maxWidth:"1440px"}))})}o(window).resize(function(){s=o(window).width();for(var l=0,c=n.length;l1440&&v1440&&v>s){var y=(s-1440)/2;f.css({maxWidth:s+"px",left:"-"+y+"px"}),f.find("img").css({maxWidth:s+"px"})}else s<1440&&v>s&&(f.css({maxWidth:"1440px",left:"0px"}),f.find("img").css({maxWidth:"1440px"}))})}});function d(l,c){var f=new Image;f.src=l,f.complete?c(f.width,f.height):f.onload=function(){c(f.width,f.height)}}},getAjaxRoomInfo:function(){var e=this;o.ajax({type:"get",url:"/api/disk/home?projectid=12",dataType:"json",success:function(n){n.success&&(window.roominfo=n.data,parseInt(n.data.type)==3&&e.Render(n.data))}})},Render:function(e){var n=this;n.summary(e.introduction),n.QRcode(e.wechatQRCode),n.logo(e.logo),n.documentTitle(e),n.licence(e.licence)},summary:function(e){var n=this;if(n.$introduce=o(".module[data-type=introduce]"),n.$introduce.length<1)return!1;for(var s=0,i=n.$introduce.length;s0?e?n.html(e):n.hide():o("body").append('
    '+e+"
    ")},setAnimation:function(){var e=this;e.animArr=[];for(var n=o(".module"),s=0,i=n.length;s