喜马拉雅 网页 滑块 简单

发布时间 2023-09-03 22:29:26作者: inks

 

function postveri() {
    let o = +new Date,
        W = "xm_" + o.toString(36) + Math.random().toString(36).substr(2, 6);
    return {
        'bpId': '139',
        'sessionId': W,
    }
}

V = function V() {
    this.ZOOM = 0.8;
    this.PAD_WIDTH = 10;
    this.SLIDER_WIDTH = 380;
    this.BLOCK_IMG_WIDTH = 84.80000000000001;
    this.BLOCK_SIZE = 40;
}
V.prototype.getSliderLeft = function (t) {
    return parseInt("" + (this.getImgLeft(t) / this.ZOOM + 44), 10)
}
V.prototype.getImgLeft = function (t) {
    return -12 * this.ZOOM + (t + this.PAD_WIDTH) * (this.SLIDER_WIDTH - this.BLOCK_IMG_WIDTH + 24 * this.ZOOM) / (this.SLIDER_WIDTH - this.BLOCK_SIZE)
}

function postD(x,id,sessionId) {
    var d = new V()
        , i = 680
        , n = 178
        , a = parseInt(x * 0.8105726872246696)
        , c = -10;
    d.captchaText = d.getSliderLeft(a) + "," + parseInt("" + c / d.ZOOM, 10);
    return {
        bpId: id,
        captchaText: d.captchaText,
        sessionId: sessionId,
        startTime: +new Date - 923,
        startX: i,
        startY: n,
        type: "slider"
    }
}
View Code