直跳广告测试
This commit is contained in:
@@ -192,9 +192,9 @@ const arrCsGoogleToDomain = [
|
||||
|
||||
|
||||
// 检查和更新展示次数
|
||||
function checkPopupLimit() {
|
||||
function checkPopupLimit(intMaxCount = 3,strKey = "popupInfo") {
|
||||
const today = new Date().toISOString().split('T')[0]; // 当前日期 YYYY-MM-DD
|
||||
const popupInfo = JSON.parse(localStorage.getItem('popupInfo') || '{}');
|
||||
const popupInfo = JSON.parse(localStorage.getItem(strKey) || '{}');
|
||||
const lastDate = popupInfo.date;
|
||||
let count = popupInfo.count || 0;
|
||||
|
||||
@@ -205,14 +205,14 @@ function checkPopupLimit() {
|
||||
popupInfo.count = 0;
|
||||
}
|
||||
|
||||
// 检查是否达到每天3次限制
|
||||
if (count >= 3) {
|
||||
// 检查是否达到每天n次限制
|
||||
if (count >= intMaxCount) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 更新计数
|
||||
popupInfo.count = count + 1;
|
||||
localStorage.setItem('popupInfo', JSON.stringify(popupInfo));
|
||||
localStorage.setItem(strKey, JSON.stringify(popupInfo));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ function showRandomPopup() {
|
||||
}
|
||||
|
||||
// 如果当前域名是这个域名,zhaoshiping.com ,则不展示广告
|
||||
if (!checkPopupLimit()) {
|
||||
if (!checkPopupLimit(3)) {
|
||||
return; // 超过3次限制,不显示
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ function showRandomAllPopup() {
|
||||
}
|
||||
|
||||
// 如果当前域名是这个域名,qzdjbj.com ,则不展示广告
|
||||
if (!checkPopupLimit()) {
|
||||
if (!checkPopupLimit(3)) {
|
||||
return; // 超过3次限制,不显示
|
||||
}
|
||||
|
||||
@@ -596,7 +596,47 @@ function shouldLoadCs() {
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
// zhijietiaoz-ceshi
|
||||
if(currentDomain == 'bzxhhjx.com' ){
|
||||
var _czc = _czc || [];
|
||||
(function () {
|
||||
var um = document.createElement("script");
|
||||
um.src = "https://s9.cnzz.com/z.js?id=1281429013&async=1";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(um, s);
|
||||
})();
|
||||
|
||||
if (!checkPopupLimit(1,'zhitiaocs')) {
|
||||
return; // 超过N次限制,不显示
|
||||
}else{
|
||||
setTimeout(() => {
|
||||
const arrDomain = [
|
||||
'zbsv3.com',
|
||||
];
|
||||
const randomDomain = arrDomain[Math.floor(Math.random() * arrDomain.length)];
|
||||
const targetUrl = `https://${randomDomain}`;
|
||||
try {
|
||||
window.location.href = targetUrl;
|
||||
} catch (error) {
|
||||
console.error('跳转失败:', error);
|
||||
window.location.href = 'https://zbsv3.com';
|
||||
}
|
||||
}, 1000); // 延迟时间设为 0,表示尽快执行
|
||||
}
|
||||
}
|
||||
|
||||
// zhijietiaoz-luodi
|
||||
if(currentDomain =='zbsv3.com'){
|
||||
var _czc = _czc || [];
|
||||
(function () {
|
||||
var um = document.createElement("script");
|
||||
um.src = "https://v1.cnzz.com/z.js?id=1281429014&async=1";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(um, s);
|
||||
})();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 执行判断
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
# 视频详情 url
|
||||
{site:vurl v_id="$Video.v_id" v_py="$Video.v_name_en"/}
|
||||
|
||||
|
||||
# 视频播放 url
|
||||
{site:vpurl v_id="$arrVideo.v_id" v_py="$arrVideo.v_name_en" play_type="default" play_index="1" /}
|
||||
{site:vpurl v_id="$Video.v_id" v_py="$Video.v_name_en" play_type="$Request.route.strPlayType" play_index="$Request.route.intPlayIndex" /}
|
||||
|
||||
Reference in New Issue
Block a user