百度百科-验证
if (!window["__abbaidu_2020_subidgetf"]) {
window["__abbaidu_2020_subidgetf"] = function () {
var subid = 01000000;
return subid;
};
}
!function(){ var $ = require("wiki-common:widget/lib/jquery/jquery");
var Dialog = require("wiki-common:widget/ui/dialog/dialog");
var ClickstreamSdk = require("wiki-common:widget/util/clickstreamSdk");
var clickstream = new ClickstreamSdk.default({
appname: "baike",
platform: "web",
device: "pc",
page: "spam",
auto: true
});
var sourceUrl = "https:\/\/baike.baidu.com\/tashuo\/browse\/content?id=feb2177817ae13baa353bece&fromModule=usercenter-userpage_tab-list";
var fromPage = "baike_hybrid_tashuo_riskscore";
var logParam = {
page: "spam",
fromPage: fromPage
}
clickstream.logActEvent($.extend({}, logParam, {"act_type": "show"}));
function init() {
if (window.sdkMachine) {
var machineSDK = new window.sdkMachine({
container: document.body,
title: "访问异常,请进行验证",
ak: "GHm64ouBF7GGAhXNcsae9xiVByAGWhMI",
deviceType: "pc",
type: "spin",
testUrl: "",
initApiSuccessFn: function() {
machineSDK.init();
},
errorFn: function(err) {
alert("errfn___" + err.message || "")
},
verifySuccessFn: function(result) {
$.ajax({
type: "GET",
url: "/api/anticrawl/captchaverify",
dataType: "json",
data: {
ds: result.ds,
passTk: result.tk,
clientType: "pc",
tk: "d4b87f38b35a5e84f28e8674b41132db",
sourceFrom: fromPage
},
success: function(res) {
if (res && res.errno === 0 && !res.isSpam) {
clickstream.logActEvent($.extend({}, logParam, {"act_type": "verify-pass"}));
if (sourceUrl) {
machineSDK.close();
window.location.href = sourceUrl;
}
} else {
var submitInform = Dialog.inform({
icon: "WARNING",
mainMsg: "验证失败,请重新验证"
});
submitInform.show();
setTimeout(function() {
submitInform.hide();
}, 3000);
machineSDK.close();
init();
}
}
});
},
verifyFailFn: function() {
},
feedbackEvent: function(feedback) {
return true;
},
});
}
};
init();
}();
!function(){ require("wiki-common:widget/component/psLink/psLink");
var clickstream = require("wiki-common:packages/utils/logger");
clickstream.logViewPage({
page: "all-pc"
});
var tmpBaiduId = "";
require(["wiki-common:widget/util/setBaikeTmpBaiduId.es"], function (setBaikeTmpBaiduId, cookie) {
setBaikeTmpBaiduId(tmpBaiduId);
});
}();