PageSourceSearch

http://www.houdask.com/site/hd/resources/js/home/home.js?v=20260903

js houdask.com collected 2026-10-02 06:29:08 UTC 8,722 bytes, 315 lines download raw bytes

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.