基于中科视拓的seetaface6封装的免费人脸识别项目后端接口
shentao
2025-09-22 aeb7a4313819c6406db74bb8d643aa8bc27b7b9d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var version = "1.0"
 
function LoadCSS(url, isappendversion) {
    if (isappendversion) {
        url += "?version=" + version;
    }
    document.write('<link rel="stylesheet" href= ' + url + ' media="all"></link>');
}
 
function LoadJS(url, isappendversion) {
    if (isappendversion) {
        url += "?version=" + version;
    }
    document.write('<script src= ' + url + '></script>');
}
 
function GetRootPath() {
    var loc = window.location,
        host = loc.hostname,
        protocol = loc.protocol,
        port = loc.port ? (':' + loc.port) : '';
    var path = location.pathname;
 
    if (path.indexOf('/') === 0) {
        path = path.substring(1);
    }
 
    var mypath = '/' + path.split('/')[0];
    path = (mypath != undefined ? mypath : ('/' + loc.pathname.split('/')[1])) + '/';
 
    var rootPath = protocol + '//' + host + port + path+"/";
    return rootPath;
}
 
function GetCookie(cookieName) {
    //获取所有的cookie "psw=1234we; rememberme=true; user=Annie"
    var totalCookie = document.cookie;
    //获取参数所在的位置
    var cookieStartAt = totalCookie.indexOf(cookieName + "=");
    //判断参数是否存在 不存在直接返回
    if (cookieStartAt == -1) {
        return;
    }
    //获取参数值的开始位置
    var valueStartAt = totalCookie.indexOf("=", cookieStartAt) + 1;
    //以;来获取参数值的结束位置
    var valueEndAt = totalCookie.indexOf(";", cookieStartAt);
    //如果没有;则是最后一位
    if (valueEndAt == -1) {
        valueEndAt = totalCookie.length;
    }
    //截取参数值的字符串
    var cookieValue = unescape(totalCookie.substring(valueStartAt, valueEndAt));
    return cookieValue;
}
 
LoadJS(GetRootPath() + 'plugin/jquery/jquery-1.10.2.min.js', false);
LoadJS(GetRootPath() + 'plugin/jquery/jquery.validate.min.js', false);
LoadJS(GetRootPath() + 'plugin/jquery/jquery.validate.message_cn.js', false);
LoadJS(GetRootPath() + 'js/common.js', false);
LoadJS(GetRootPath() + 'plugin/layui/layui.js', false);
LoadJS(GetRootPath() + 'plugin/layuiextend/table.js', true);
LoadJS(GetRootPath() + 'plugin/layuiextend/dialog.js', true);
LoadJS(GetRootPath() + 'plugin/layuiextend/form.js', true);
LoadJS(GetRootPath() + 'plugin/layuiextend/select.js', true);
LoadCSS(GetRootPath() + 'css/common.css', true);
LoadCSS(GetRootPath() + 'plugin/layui/css/layui.css', false);