极狐推荐

This commit is contained in:
“wanyongkang”
2024-07-15 17:32:00 +08:00
parent b29e9bb51f
commit 345c45c478
8 changed files with 306 additions and 36 deletions

View File

@@ -1086,6 +1086,41 @@
</div>
</div>
<div class="modal fade" id="product_recommend" tabindex="-1" role="dialog" aria-labelledby="myModalLabelproduct" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title" id="myModalLabelproduct">
产品推荐
</h4>
</div>
<div class="modal-body">
<p style="font-weight:bold;">重磅打造极狐IP聚IP最好的动态产品260城市纯净IP三网混合IP稳定极速视频直播无压力且有不同带宽可选</p>
<p style="font-weight:bold;">现推广期天卡1毛体验周送1天月送1周双月送1月</p>
<p style="font-weight:bold;">承诺不好用48小时内免费退款</p>
<div class="text-right">
<label>
<input id="recommendchechk" type="checkbox"> 7天内不再提示
</label>
</div>
</div>
<div class="modal-footer">
<a href="/product/index" type="button" class="btn btn-primary" >
查看
</a>
<button type="button" class="btn btn-warning" onclick="buyrecommendfunc()" data-dismiss="modal">
忽略
</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
@section Scripts{
@@ -1445,11 +1480,35 @@
</script>
<script type="text/javascript">
var currentPkgId = 0;
var testProductId = 0;
var product_id_click = 0;
var isTest = false;
function buyrecommendfunc() {
var isChecked = $('#recommendchechk').is(':checked');
if (isChecked) {
localStorage.setItem('buyrecommend', new Date().getTime());
}
}
function select(id) {
if (id != 29 && id != 28 && id != 25 && id != 22 && id != 21 && id != 20 && id != 18 ) {
var lastClosedTime = localStorage.getItem('buyrecommend');
if (!lastClosedTime) {
// 如果之前没有关闭时间记录,则显示提示框
$('#product_recommend').modal('show')
} else {
// 如果有关闭时间记录则检查是否超过7天
var sevenDaysInMillis = 7 * 24 * 60 * 60 * 1000; // 7天的毫秒数
var currentTime = new Date().getTime();
if (currentTime - lastClosedTime > sevenDaysInMillis) {
// 超过7天显示提示框
$('#product_recommend').modal('show')
}
}
}
var el = "#p" + id;
var packageBox = "#box" + id;
$(".packagebox").hide();