diff --git a/Host/Views.Mobile/Product/Index.cshtml b/Host/Views.Mobile/Product/Index.cshtml index 6683445..f7d55a3 100644 --- a/Host/Views.Mobile/Product/Index.cshtml +++ b/Host/Views.Mobile/Product/Index.cshtml @@ -745,6 +745,42 @@ +
+ @@ -1103,8 +1139,14 @@ localStorage.setItem('buyrecommend', new Date().getTime()); } } + function buyrecommendfunc_2() { + var isChecked = $('#recommendchechk_2').is(':checked'); + if (isChecked) { + localStorage.setItem('buyrecommend_2', new Date().getTime()); + } + } function onrecommend(id) { - if (id != 29 && id != 28 && id != 25 && id != 22 && id != 21 && id != 20 && id != 18 ) { + if (id != 29 && id != 28 && id != 22 && id != 21 && id != 20 && id != 18 && id != 1 ) { var lastClosedTime = localStorage.getItem('buyrecommend'); if (!lastClosedTime) { // 如果之前没有关闭时间记录,则显示提示框 @@ -1119,6 +1161,21 @@ } } } + if (id == 1) { + var lastClosedTime = localStorage.getItem('buyrecommend_2'); + if (!lastClosedTime) { + // 如果之前没有关闭时间记录,则显示提示框 + $('#product_recommend_2').modal('show') + } else { + // 如果有关闭时间记录,则检查是否超过7天 + var sevenDaysInMillis = 7 * 24 * 60 * 60 * 1000; // 7天的毫秒数 + var currentTime = new Date().getTime(); + if (currentTime - lastClosedTime > sevenDaysInMillis) { + // 超过7天,显示提示框 + $('#product_recommend_2').modal('show') + } + } + } } $(function(){ setTimeout(function(){ diff --git a/Host/Views.Mobile/Product/ReBuyIndex.cshtml b/Host/Views.Mobile/Product/ReBuyIndex.cshtml index 53c7a75..e72752d 100644 --- a/Host/Views.Mobile/Product/ReBuyIndex.cshtml +++ b/Host/Views.Mobile/Product/ReBuyIndex.cshtml @@ -157,6 +157,42 @@ + +