PageSourceSearch

https://ws.static.mingyihui.net/js/rank_header_20260806.js

js mingyihui.net collected 2026-10-01 07:34:21 UTC 4,946 bytes, 157 lines download raw bytes

1
2if(window.location.href.indexOf('https')!=-1){
3    var MYHAPI = 'https://www.mingyihui.net';
4  } else {
5    var MYHAPI = 'http://www.mingyihui.net';
6  }
7var userid = 0;
8
9
10
11
12$(function () {
13    if(!isCrawler()){
14        $.ajax({
15            url: SITEURL + '/api_check.php',
16            type: 'post',
17            data: { 'act': 'checkLogin' },
18            success: function (res) {
19                res = JSON.parse(res)
20                if (res.userid) {
21                    userid = res.userid;
22                    //checkNoteNum()
23                } else {
24                    $('.header_js_login').hide();
25                    $('.hospital_dislogin').show();
26                    userid = 0
27                }
28            }
29        })
30    }
31
32
33    function isCrawler() {
34        var userAgent=  navigator.userAgent;
35        // 常见的爬虫User-Agent关键词
36        const crawlers = [
37            'googlebot',          // Google 爬虫
38            'bingbot',            // Bing 爬虫
39            'slurp',             // Yahoo 爬虫
40            'yandexbot',         // Yandex 爬虫
41            'baiduspider',       // 百度爬虫
42            'duckduckbot',       // DuckDuckGo 爬虫
43            'facebot',           // Facebook 爬虫
44            'ia_archiver',       // Alexa 爬虫
45            'twitterbot',        // Twitter 爬虫
46            'linkedinbot',       // LinkedIn 爬虫
47            'msnbot',            // MSN 爬虫
48            'ahrefsbot',        // Ahrefs 爬虫
49            'semrushbot',        // SEMrush 爬虫
50            'mj12bot',          // Majestic 爬虫
51            'seznambot',        // Seznam 爬虫
52            'dotbot',            // DotBot 爬虫
53            'exabot',           // Exabot 爬虫
54            'gigabot',           // Gigabot 爬虫
55            'sogou',             // 搜狗爬虫
56            'bytespider',        // 字节跳动爬虫
57            'petalbot',         // Petal 爬虫
58            'adsbot',            // Google Ads 爬虫
59            'applebot',          // Apple 爬虫
60        ];
61
62        // 将User-Agent转换为小写,方便匹配
63        userAgent = userAgent.toLowerCase();
64
65        // 检查User-Agent是否包含爬虫关键词
66        return crawlers.some(crawler => userAgent.includes(crawler));
67    }
68})
69
70$(document).on("click", ".CODEIMG span", function () {
71    $(this).parent().remove();
72})
73
74function headerCodeShows(url) {
75    var IMGHTML = "<div class='CODEIMG'><img src='" + url + "'><span>&times;</span></div>"
76    $("body").append(IMGHTML);
77}
78
79
80function checkNoteNum() {
81    $.ajax({
82        url: SITEURL + '/api_notice.php',
83        type: 'post',
84        data: { 'mode': 'notice' },
85        success: function (res) {
86            res = JSON.parse(res);
87            if (res.newNoticeCount) {
88                $('#note_num').html(res.data.newNoticeCount);
89                $('#note_num2').html(res.data.newNoticeCount);
90            } else {
91                $('#note_num').remove();
92                $('#note_num2').remove();
93            }
94            $('.header_js_login').show();
95            $('.hospital_dislogin').hide();
96        }
97    })
98}
99
100$(function(){
101
102    $('.edit_info_icon').on('click',function(){
103        $('.edit_info_box').show();
104    })
105
106    $('.close_edit_box').on('click',function(){
107        $('.edit_info_box').hide();
108    })
109    // 已登录我的更多
110    $(".header_js_login").hover(function() {
111        $(".header_alreadyLogin").show()
112        $(this).addClass("dislogin");
113    }, function() {
114        $(".header_alreadyLogin").hide();
115        $(this).removeClass("dislogin");
116    })
117
118    // 退出登录
119    $('#btnLogout').on('click',function() {
120        $.ajax({
121            type: 'POST',
122            url: MYHAPI + "/api_logout.php",
123            xhrFields: {
124                withCredentials: true
125            },
126            crossDomain: true,
127            success: function(data) {
128                location.reload();
129            }
130        });
131    });
132})
133
134$(document).on('click',"#btnSearch", function() {
135    var searchKey = $('#searchKey').val()
136    if(searchKey==''){
137        showmessage('error','请输入需要搜索的内容!');
138        return false;
139    }
140    var regEn = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im,
141        regCn = /[·!#¥(——):;“”‘、,|《。》?、【】[\]]/im;
142
143    if(regEn.test(searchKey) || regCn.test(searchKey)) {
144        showmessage('error','搜索内容含有非法字符!');
145        return false;
146    }
147    window.location = MYHAPI +"/vue/services/search/?keyword=" +searchKey
148})
149
150/***** 回车键点击搜索按钮start *****/
151$('#searchKey').bind('keypress',function(event){
152    if(event.keyCode == "13"){
153        $('#btnSearch').click();
154        return false;
155    }
156});
157/***** 回车键点击搜索按钮end *****/

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.