京东优惠券coupon.m.jd.com无法领取

About: 返利推广链接自动清洗
CYDCYD
zemené April 2018 v Diskusia o skripte Sogou Explorer

http://coupon.m.jd.com/coupons/show.action?key=d570541fc2f346148a102d09ff18b50f&roleId=11083415

function getQueryString(name) {  
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
    var r = window.location.search.substr(1).match(reg);  
    if (r != null) return unescape(r[2]);  
    return null;  
}  
if (window.location.host.indexOf("jd.") > 0) {  
    if (window.location.host.indexOf("re.jd.com") == 0) {  
        location.replace(document.getElementsByClassName("gobuy")[0].getElementsByTagName("a")[0].href);  
    }  
    if (window.location.search.indexOf("jd_pop=") > 0 || window.location.search.indexOf("utm_source") > 0) {  
        for (i = 0; i < jdad.length; i++) {  
            setcookie(jdad[i], jdad[i + 1]);  
        }  
        if(window.location.host.indexOf("coupon.m.jd.com") == 0 ){  
            location.replace(window.location.origin + window.location.pathname + "?key=" + getQueryString("key") + "&roleId=" + getQueryString("roleId"));
        }else{  
            location.replace(window.location.origin + window.location.pathname);  
        }  
    }  
}  

稍微改进了下。
感谢原作者。

Komentáre

  • 这是放在哪段啊?

  • @CYD 说道:
    http://coupon.m.jd.com/coupons/show.action?key=d570541fc2f346148a102d09ff18b50f&roleId=11083415

    function getQueryString(name) {  
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");  
        var r = window.location.search.substr(1).match(reg);  
        if (r != null) return unescape(r[2]);  
        return null;  
    }  
    if (window.location.host.indexOf("jd.") > 0) {  
        if (window.location.host.indexOf("re.jd.com") == 0) {  
            location.replace(document.getElementsByClassName("gobuy")[0].getElementsByTagName("a")[0].href);  
        }  
        if (window.location.search.indexOf("jd_pop=") > 0 || window.location.search.indexOf("utm_source") > 0) {  
            for (i = 0; i < jdad.length; i++) {  
                setcookie(jdad[i], jdad[i + 1]);  
            }  
            if(window.location.host.indexOf("coupon.m.jd.com") == 0 ){  
                location.replace(window.location.origin + window.location.pathname + "?key=" + getQueryString("key") + "&roleId=" + getQueryString("roleId"));
            }else{  
                location.replace(window.location.origin + window.location.pathname);  
            }  
        }  
    }  
    

    稍微改进了下。
    感谢原作者。

    放在哪段啊

Prihlásiť saaleboRegistrovať pre komentovanie.