1$.ajax({ 2 type:"POST", 3 dataType:"json", 4 url:"/api/other/examinecountdown/anon/getHomePageDataWeb", 5 success:function(msg){ 6 if(msg.code==1){ 7 var data=msg.data; 8 //è½®æå¾ 9 bannerList(data.carouselList); 10 //å ¨å½åæ ¡ 11 schoolList(data.cityList); 12 }else{ 13 layer.msg(data.message); 14 } 15 } 16}) 17$.ajax({ 18 type:"POST", 19 dataType:"json", 20 url:"/api/other/systemmessage/anon/list/pc", 21 success:function(msg){ 22 if(msg.code==1){ 23 $(".infoPush").html('<a href="'+msg.data.pcActivityLink+'">'+msg.data.title+'</a>') 24 }else{ 25 layer.msg(data.message); 26 } 27 } 28}) 29 30//è½®æå¾ 31function bannerList(data){ 32 var bannerHtml=""; 33 $.each(data,function(i,item){ 34 bannerHtml+='<div class="swiper-slide">'+ 35 '<a href="'+item.detailsLink+'" target="_blank">'+ 36 '<img src="'+item.pcImgUrl+'" alt="">'+ 37 '</a>'+ 38 '</div>'; 39 }) 40 $(".banner .swiper-wrapper").html(bannerHtml); 41 /*banner*/ 42 var banner = new Swiper('.banner',{ 43 prevButton:'.swiper-button-prev', 44 nextButton:'.swiper-button-next', 45 autoplay:5000, 46 loop:true, 47 effect: 'fade', 48 observer:true,//ä¿®æ¹swiperèªå·±æåå ç´ æ¶ï¼èªå¨åå§åswiper 49 observeParents:true,//ä¿®æ¹swiperçç¶å ç´ æ¶ï¼èªå¨åå§åswiper 50 }); 51 $(".banner").mouseenter(function () {//æ»è¿æ¬å 52 banner.stopAutoplay(); 53 }).mouseleave(function(){//离å¼å¼å¯ 54 banner.startAutoplay(); 55 }); 56} 57 58 59//å ¨å½åæ ¡ 60var cityList=""; 61function schoolList(data){ 62 cityList=data; 63 var schoolCity=""; 64 $.each(data,function(i,item){ 65 schoolCity+='<span>'+item.name+'</span>' 66 }) 67 schoolCity+='<a href="/site/hd/resources/views/school/schoolHome.html">äºè§£æ´å¤</a>'; 68 $(".mapNav").html(schoolCity); 69 $(".mapNav span").eq(0).addClass("active"); 70 //å表 71 getSchool(data[0].schoolList); 72} 73$(".mapNav").on("click","span",function(){ 74 var idx=$(this).index(); 75 $(this).addClass("active").siblings().removeClass("active"); 76 getSchool(cityList[idx].schoolList); 77}) 78function getSchool(data){ 79 if(data){ 80 var schoolList=""; 81 $.each(data,function(i,item){ 82 schoolList+='<ul>'+ 83 '<li><strong>'+item.name+'</strong><i></i></li>'+ 84 '<li><label>ç±»åï¼</label><span>'+item.description+'</span></li>'+ 85 '<li><label>çµè¯ï¼</label><span>'+item.telephone+'</span></li>'+ 86 /*'<li><label>QQï¼</label><span>'+item.qq+'</span></li>'+*/ 87 '<li><label>å°åï¼</label><span>'+item.address+'</span></li>'+ 88 '</ul>'; 89 }) 90 $(".mapDetail").html(schoolList); 91 } 92} 93 94//ææ°éé--å¯¼èª 95$.ajax({ 96 url:"/api/other/examlivebroadcast/anon/v2/mobile/liveType", 97 type:"POST", 98 dataType:"json", 99 success:function(res){ 100 if(res.code==1){ 101 var infoNav=""; 102 $.each(res.data,function(i,item){ 103 infoNav+='<li data-id="'+item.id+'">'+item.name+'<span></span></li>' 104 }) 105 $(".infoNav").html(infoNav); 106 $(".infoNav li").eq(0).addClass("active"); 107 } 108 } 109}) 110//ææ°éé--å表 111infoList(""); 112function infoList(id){ 113 $.ajax({ 114 url:"/api/other/examlivebroadcast/anon/v2/pc/get/list", 115 type:"POST", 116 dataType:"json", 117 data:{ 118 broadcaseTypeId:id, 119 pageNum:1, 120 pageSize:6 121 }, 122 success:function(res){ 123 if(res.code==1){ 124 var infoList=""; 125 $.each(res.data.list,function(i,item){ 126 infoList+='<div class="infoMin" data-id="'+item.id+'" data-type="'+item.videoType+'" data-url="'+item.pcVideo+'">'+ 127 '<h6><i></i>'+item.title+'</h6>'+ 128 '<p>æ¶é´ï¼'+item.startDateStr+'</p>'+ 129 '</div>'; 130 }) 131 $(".infoCont").html(infoList); 132 } 133 } 134 }) 135} 136//ä¿¡æ¯ééå¯¼èª 137$(".infoNav").on("click","li",function(){ 138 var id=$(this).attr("data-id"); 139 $(this).addClass("active").siblings().removeClass("active"); 140 infoList(id); 141}) 142//ä¿¡æ¯éé跳转详æ 143$(".infoCont").on("click",".infoMin",function(){ 144 var data=$(this).data(); 145 if(!data.url){ 146 layer.msg("ææªçæå°å"); 147 return false; 148 } 149 //æ·»å ææ¾é 150 var amountPlay={ 151 "liveId":data.id, 152 "type":1 153 }; 154 $.ajax({
155 type:"POST", 156 dataType:"json", 157 url:"/api/other/livestatistics/anon/play", 158 data:{ 159 data:JSON.stringify(amountPlay) 160 }, 161 success:function(){} 162 }) 163 if(data.type==1){//彿å°å 164 window.open("/site/hd/resources/views/free/zhiboPlay.html?id="+data.id); 165 }else{//åææç´æå°å 166 window.open(data.url); 167 } 168}) 169 170//å 费课å 171$(".freeCont").on("mouseenter",".freeMin",function(){ 172 $(this).children("div").filter(':not(:animated)').slideDown(100); 173}) 174$(".freeCont").on("mouseleave",".freeMin",function(){ 175 $(this).children("div").slideUp(100); 176}) 177$(".freeCont").on("click",".goPlay",function(){ 178 var islogin=sessionStorage.getItem("userID"); 179 if(!islogin){ 180 $(".loginWrap").show(); 181 return; 182 } 183 $(this).addClass("active").siblings().removeClass("active"); 184 var $li=$(this); 185 //20260903 é¶æ®µæé(æ¸²ææ¶é¢å)ï¼åæ§ä¸æ æé å¼¹æ¡æ¦æªï¼èæ¥å£æ åæ®µé»è®¤æ¾è¡ 186 if($li.attr("data-isfree")=="0" && $li.attr("data-haspower")=="0"){ 187 layer.confirm($li.attr("data-tips")||"è¯¥é¶æ®µä¸ºå¦ä¹ å ä¸äº«ï¼è´ä¹°åå³å¯å¦ä¹ ",{ 188 title:false, 189 closeBtn:0, 190 area:["400px","auto"], 191 btn:["åæ¶","å»è´ä¹°"] 192 },function(index){ 193 layer.close(index); 194 },function(index){ 195 layer.close(index); 196 var jumpUrl=$li.attr("data-jumpurl"); 197 if(jumpUrl){ 198 window.open(jumpUrl); 199 } 200 }); 201 return; 202 } 203 var classId=$li.attr("data-classId"); 204 var phaseId=$li.attr("data-phaseId"); 205 var teacherId=$li.attr("data-teacherId"); 206 window.open("/site/hd/resources/views/free/play.html?id="+classId+"&phaseId="+phaseId+"&teacherId="+teacherId); 207}) 208 209$.ajax({ 210 type:"POST", 211 dataType:"json", 212 url:"/api/other/freeclass/anon/pc/teacher/list", 213 data:{ 214 data:JSON.stringify({courseType:1}) 215 }, 216 success:function(res){ 217 if(res.code==1){ 218 var freeData=res.data.teacherList; 219 var freeHtml=""; 220 $.each(freeData,function(i,item){ 221 var lis=""; 222 if(item.phaseList.length>0){ 223 lis+='<ul>'; 224 $.each(item.phaseList,function(j,items){ 225 //20260903 é¶æ®µæéåæ®µé渲æåå ¥(èæ¥å£æ åæ®µæ¶é»è®¤æ¾è¡å¼) 226 lis+='<li class="goPlay" data-classId="'+items.classId+'" data-phaseId="'+items.phaseId+'" data-teacherId="'+item.id+'"' 227 +' data-isfree="'+(items.isFree==undefined?"1":items.isFree)+'"' 228 +' data-haspower="'+(items.hasPower==undefined?"1":items.hasPower)+'"' 229 +' data-jumpurl="'+(items.jumpUrl||'')+'"' 230 +' data-tips="'+(items.powerTips||'')+'">' 231 +items.phaseName+'</li>' 232 }) 233 lis+='</ul>'; 234 }else{ 235 lis='<p>å³å°ä¸ä¼ </p>' 236 } 237 freeHtml+='<div class="freeMin">'+ 238 /*'<span>'+item.lawName+'</span>'+*/ 239 '<img src="'+item.teacherImage+'" alt="">'+ 240 /*'<p>'+item.name+'</p>'+*/ 241 '<div>'+lis+'</div>'+ 242 '</div>'; 243 }) 244 $(".freeCont").html(freeHtml); 245 } 246 } 247}) 248 249//24-11-05产åèå 250$.ajax({ 251 type:"POST", 252 dataType:"json", 253 url:"/api/sp/splb/spProdLb/anon/pcIndex", 254 headers:{ 255 appType:"WEB" 256 }, 257 success:function(res){ 258 if(res.code==1){ 259 var html = "" 260 var list =res.data; 261 for(var i=0;i<list.length;i++){ 262 var needEnd = false; 263 var item = list[i]; 264 if(item.type == "lb"){ 265 if(item.sl>0){ 266 if(i != 0){ 267 needEnd = false 268 html+="</div> "//å表çç»å°¾ 269 } 270 html+='<div class="title">'+ 271 '<i></i>'+ 272 '<h3>'+item.name+'</h3>'+ 273 '<a href="/site/hd/resources/views/book/bookHome.html">æ¥çæ´å¤</a>'+ 274 '</div>'; 275 html+='<div class="shopCont">' //å表çå¼å§ 276 needEnd=true; 277 } 278 }else{ 279 var bigClass="",coverImg=item.sm_pic; 280 if(item.pc_index_img){ 281 bigClass="shopMinBig"; 282 coverImg=item.pc_index_img; 283 } 284 // var time=""; 285 // if(item.start_time){ 286 // time='<time>'+item.start_time.replace(/-/g,".")+'-'+item.end_time.replace(/-/g,".")+'</time>'; 287 // } 288 html+='<dl class="shopMin '+bigClass+'" data-url="'+item.url+'">'+ 289 '<dt><img src="'+coverImg+'" alt=""></dt>'+ 290 '<dd>'+ 291 '<h6>'+item.spname+'</h6>'+ 292 '<p>'+ 293 '<span>ï¿¥'+item.price+'</span>'+ 294 '</p>'+ 295 '</dd>'+ 296 '</dl>' 297 if(needEnd){ 298 html+='</div>'//æåä¸ä¸ªç±»å«çå表ç»å°¾ 299 } 300 } 301 302 } 303 $(".shop").html(html); 304 } 305 } 306}) 307//产å跳转æèµåå 308$(".shop").on("click",".shopMin",function(){ 309 var jumpUrl=$(this).attr("data-url"); 310 if(jumpUrl){ 311 window.open(jumpUrl); 312 }else{ 313 layer.msg("ææ è¯¦æ "); 314 } 315})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.