PageSourceSearch

http://stajy.com/public/static/common/js/ey_global.js?t=v1.6.3

js stajy.com collected 2026-10-08 12:10:38 UTC 1,984 bytes, 70 lines download raw bytes

1
2// 首页、列表页等加入购物车
3function ShopAddCart1625194556(aid, spec_value_id, num, rootDir) {
4    rootDir = rootDir ? rootDir : '';
5    $.ajax({
6        url : rootDir + '/index.php?m=user&c=Shop&a=shop_add_cart&_ajax=1',
7        data: {aid: aid, num: num, spec_value_id: spec_value_id},
8        type:'post',
9        dataType:'json',
10        success:function(res){
11            if (1 == res.code) {
12                window.location.href = res.url;
13            } else {
14                if (-1 == res.data.code) {
15                    layer.msg(res.msg, {time: time});
16                } else {
17                    // 去登陆
18                    window.location.href = res.url;
19                }
20            }
21        }
22    });
23}
24
25/**
26 * 设置cookie
27 * @param {[type]} name  [description]
28 * @param {[type]} value [description]
29 * @param {[type]} time  [description]
30 */
31function ey_setCookies(name, value, time)
32{
33    var cookieString = name + "=" + escape(value) + ";";
34    if (time != 0) {
35        var Times = new Date();
36        Times.setTime(Times.getTime() + time);
37        cookieString += "expires="+Times.toGMTString()+";"
38    }
39    document.cookie = cookieString+"path=/";
40}
41
42// 读取 cookie
43function getCookie(c_name)
44{
45    if (document.cookie.length>0)
46    {
47        c_start = document.cookie.indexOf(c_name + "=")
48        if (c_start!=-1)
49        {
50            c_start=c_start + c_name.length+1
51            c_end=document.cookie.indexOf(";",c_start)
52            if (c_end==-1) c_end=document.cookie.length
53            return unescape(document.cookie.substring(c_start,c_end))
54        }
55    }
56    return "";
57}
58
59function ey_getCookie(c_name)
60{
61    return getCookie(c_name);
62}
63
64function getQueryString(name) {
65    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
66    var r = window.location.search.substr(1).match(reg);
67    if (r != null) return unescape(r[2]);
68    return null;
69}
70

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.