|
5精币
JS代码如下:
function bargainSus() {
isClick = false;
clearInterval(timer);
$(".dialog-game").fadeOut(100);
$(".dialog-commMsg").addClass("noClose").show().find(".text").text("金币数量统计中……").siblings(".close").hide();
// 提交抢金币价格
var data = {};
data['data'] = XXTEA.encryptToBase64('vt4=' + window['forUserId'] + '&tctm=' + clickCnt + '&uid=' + window["USERID"], window['csrfToken']);
$.post("/bargainShare/vote4.html", data, function (d) {
if (d.ok) {
var num = parseInt(d.payLoad);
var alPrice = parseInt($(".progress .al-prize").text()) + num;
$(".progress .al-prize").text(alPrice);
$(".progress .surplus-prize span").text(3000 - alPrice);
$(".progress .bar").css("width", (alPrice / 3000) > 1 ? 100 : (alPrice / 3000 * 100) + "%");
haveVoted = true;
setTimeout(function () {
$(".dialog-commMsg").hide().removeClass("noClose").find(".text").text("").siblings(".close").show();
$(".dialog-bargainSus .price span").text("+" + num);
$(".dialog-bargainSus").show();
}, 2000);
} else {
totalTime = 5;
timeText.text(totalTime);
is_start = true;
isClick = true;
clickCnt = 0;
$(".dialog-commMsg").removeClass("noClose").find(".text").text(d.payLoad).siblings(".close").show();
}
}, "json");
}
需要data, window['forUserId'], window["USERID"],,window['csrfToken']都有固定的值。
求代码写法
|
|