PageSourceSearch

https://www.inheadline.com/template/pc/skin/js/common.js

js inheadline.com collected 2026-09-25 00:51:19 UTC 4,569 bytes, 150 lines download raw bytes

1jQuery(document).ready(function(){
2	/*头部搜索*/
3	if( $(window).width() < 748)
4	{
5	$('.searchBar a').click(function(){
6	   if($(this).attr('id')!='click'){
7			$(this).attr('id','click');
8			$('.searchBar-m').show();
9		}else{
10			$(this).removeAttr('id');
11			$('.searchBar-m').hide();
12		}
13	});
14	}
15	else
16	{
17		$('.searchBar a').click(function(){
18		$('.searchBar-m').slideDown();
19	})
20	}
21		$('.searchBar-m a').click(function(){
22		$('.searchBar-m').hide();
23	})
24
25	 /*弹出友链*/
26	$(".friendlink,.popup-link").hover(function(){
27		$(this).parent().find("ul").show();
28		},function(){
29		$(this).parent().find("ul").hide();
30	})
31});
32
33//登录注册tab
34function setTab(name, cursel, n) {
35	for (i = 1; i <= n; i++) {
36		var menu = document.getElementById(name + i);
37		var con = document.getElementById("con_" + name + "_" + i);
38		menu.className = i == cursel ? "cur": "";
39		con.style.display = i == cursel ? "block": "none";
40	}
41}
42
43function showErrorMsg(msg){
44    layer.msg(msg, {icon: 5,time: 2000});
45}
46
47function showErrorAlert(msg, icon){
48    if (!icon && icon != 0) {
49        icon = 5;
50    }
51    layer.alert(msg, {icon: icon, title: false, closeBtn: false});
52}
53
54// 加载层
55function layer_loading(msg){
56    var loading = layer.msg(
57    msg+'...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请勿刷新页面', 
58    {
59        icon: 1,
60        time: 3600000, //1小时后后自动关闭
61        shade: [0.2] //0.1透明度的白色背景
62    });
63    //loading层
64    var index = layer.load(3, {
65        shade: [0.1,'#fff'] //0.1透明度的白色背景
66    });
67
68    return loading;
69}
70
71$(document).keydown(function(event){
72    if(event.keyCode ==13){
73        $('form#popup_login_submit input[name=submit]').trigger("click");
74    }
75});
76
77function ey_fleshVerify(){
78    var src = __eyou_basefile__ + "?m=api&c=Ajax&a=vertify&type=users_login&r=" + Math.floor(Math.random()*100);
79    $('form#popup_login_submit #imgVerifys').attr('src', src);
80}
81
82function popup_login_submit()
83{
84    var username = $('form#popup_login_submit input[name=username]');
85    var password = $('form#popup_login_submit input[name=password]');
86
87    if($.trim(username.val()) == ''){
88        layer.msg('用户名不能为空!', {time: 1500, icon: 5});
89        username.focus();
90        return false;
91    }
92
93    if($.trim(password.val()) == ''){
94        layer.msg('密码不能为空!', {time: 1500, icon: 5});
95        password.focus();
96        return false;
97    }
98
99    $('form#popup_login_submit input[name=referurl]').val(window.location.href);
100    
101    var formData = $('#popup_login_submit').serialize();
102    if (document.getElementById("pop_equal_privkey")) {
103        //使用公钥加密
104        var encrypt = new JSEncrypt(); //创建加密对象实例
105        encrypt.getKey();
106        var privkey = encrypt.getPrivateKey(); //ssl生成的私钥
107        var pubkey = encrypt.getPublicKey(); //ssl生成的公钥
108        encrypt.setPublicKey(pubkey);
109        var password_value = $('form#popup_login_submit input[name=password]').val();
110        var rsaPassWord = encrypt.encrypt(password_value);
111
112        formData = eyou_replaceParamVal(formData, 'password', eyou_base64_encode(rsaPassWord));
113        formData = eyou_replaceParamVal(formData, 'equal_privkey', eyou_base64_encode(privkey));
114    }
115
116    layer_loading('正在处理');
117    $.ajax({
118        // async:false,
119        url : __eyou_basefile__ + "?m=user&c=Users&a=login",
120        data: formData,
121        type:'post',
122        dataType:'json',
123        success:function(res){
124            if (1 == res.code) {
125                if (5 == res.data.status) {
126                    layer.alert(res.msg, {icon: 5, title: false, closeBtn: false},function(){
127                        window.location.href = res.url;
128                    });
129                }else{
130                    window.location.href = res.url;
131                }
132            } else {
133                layer.closeAll();
134                if ('vertify' == res.data.status) {
135                    ey_fleshVerify();
136                }
137                
138                if (2 == res.data.status) {
139                    showErrorAlert(res.msg, 4);
140                } else {
141                    layer.msg(res.msg, {icon: 5,time: 1500});
142                }
143            }
144        },
145        error:function(e) {
146            layer.closeAll();
147            showErrorAlert(e.responseText);
148        }
149    });
150}

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.