function __doParkAdv(){
let _data = [];
$(".adv-6park").each(function (){
_data.push($(this).attr("adv-id"));
})
_dataStr = JSON.stringify(_data);
$.post('https://ad.parkvv.com/index.php?app=show&act=show','adv_id='+encodeURIComponent(_dataStr),function(data){
$(".adv-6park").each(function (){
let _id = $(this).attr("adv-id");
if (data.hasOwnProperty(_id)) {
let value = data[_id];
if(value.indexOf("script") !== -1)
{
value = value.replace("script","scr"+"ipt");
}
$(this).html(value);
}
else{
$(this).hide();
}
})
});
}
if (typeof jQuery === 'undefined') {
// jQuery 未加载,动态添加 jQuery 脚本
const jqueryScript = document.createElement('script');
jqueryScript.src = 'https://ad.parkvv.com/public/jquery-3.5.1.min.js'; // 替换为你想要的 jQuery 版本的 URL
jqueryScript.onload = function() {
__doParkAdv();
};
// 将脚本元素添加到页面的 部分或任何适当的位置
document.head.appendChild(jqueryScript);
}
else{
__doParkAdv()
}