Files
juipnet/Host/Views.Mobile/Product/ReBuyIndex.cshtml

253 lines
12 KiB
Plaintext
Raw Normal View History

2023-07-29 10:19:42 +08:00
@using Hncore.Pass.Vpn.Response.Product
@using Microsoft.Extensions.Configuration
@using Hncore.Pass.BaseInfo.Response
@using Hncore.Infrastructure.Serializer;
@inject IConfiguration m_Configuration
@model ProductWithPackageResponse
@{
ViewData["Title"] = "购买产品";
UserLoginModel user = null;
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
{
user = userCookie.FromJsonTo<UserLoginModel>();
}
var defaultProduct = Model.Product;
var defaultPackage = Model.Packages.FirstOrDefault();
var baseUrl = m_Configuration["BaseInfoUrl"];
Func<string, string> P = (path) => $"{baseUrl}{path}";
}
@* <div class="cpBanner">
<img src="~/m/img/cpBanner.png">
</div> *@
2023-09-08 15:03:14 +08:00
<br><br><br><br>
2023-07-29 10:19:42 +08:00
<div class="cpNav">
2023-09-08 15:03:14 +08:00
<div class="item" style="width:100% !important">
2023-07-29 10:19:42 +08:00
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="@Model.Product.Id">
2023-09-08 15:03:14 +08:00
<div style="background:rgb(57, 81, 107);color:#FFFFFF;">
<p class="texing text-center" style="color:#009933;border:none;">@Model.Product.Name 简介</p>
<hr>
<ul class="texingList" style="padding-bottom:0;">
@foreach (var str in Model.Product.ContentLine)
{
<li style="padding:5px;">·@str</li>
}
2023-07-29 10:19:42 +08:00
</ul>
2023-09-08 15:03:14 +08:00
</div>
2023-07-29 10:19:42 +08:00
@foreach (var package in Model.Packages.Where(m=>m.IsTest==0&&m.Status==1 && m.Id != 21&& m.Id != 20).OrderBy(m => m.TenantId))
{
@if(package.Id == 101||package.Id == 103||package.Id == 104||(package.Id>103)){
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
2023-09-08 15:03:14 +08:00
<div class="card color_2">
2023-07-29 10:19:42 +08:00
<div class="item">
2023-09-08 15:03:14 +08:00
<p style="font-size: 35px;color:#FFFF00;">@package.Name </p>
2023-07-29 10:19:42 +08:00
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>
</a>
}
@* else if(package.Id == 19){
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
2023-09-08 15:03:14 +08:00
<div class="card color_2">
2023-07-29 10:19:42 +08:00
<div class="item">
2023-09-08 15:03:14 +08:00
<p style="font-size: 35px;color:#FFFF00;">@package.Name 送10天</p>
2023-07-29 10:19:42 +08:00
<p>@(package.DayPrice)元/天</p>
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>
</a>
} *@
@* else if(package.Id == 63||package.Id == 64||package.Id == 65||package.Id == 66||package.Id == 67||package.Id == 13||package.Id == 14||package.Id == 15||package.Id == 16){
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
2023-09-08 15:03:14 +08:00
<div class="card color_2">
2023-07-29 10:19:42 +08:00
<div class="item">
2023-09-08 15:03:14 +08:00
<p style="font-size: 35px;color:#FFFF00;">@package.Name 85折</p>
2023-07-29 10:19:42 +08:00
<p>@(package.DayPrice)元/天</p>
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>
</a>
} *@
else if(package.Id == 100 || package.Id == 102){
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
2023-09-08 15:03:14 +08:00
<div class="card color_2">
2023-07-29 10:19:42 +08:00
<div class="item">
2023-09-08 15:03:14 +08:00
<p style="font-size: 35px;color:#FFFF00;">@package.Name </p>
2023-07-29 10:19:42 +08:00
<p>@package.Profile</p>
</div>
<div class="item">
<p>¥<span>@package.Price</span></p>
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>
</a>
} else if(package.Id != 88) {
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
2023-09-08 15:03:14 +08:00
<div class="card color_2">
2023-07-29 10:19:42 +08:00
<div class="item">
<p>@package.Name</p>
<p>@package.Profile</p>
</div>
<div class="item">
@if((package.Id == 64||package.Id == 1004)&&package.Price<60){
<p>¥<span>60.00</span></p>
} else {
<p>¥<span>@package.Price</span></p>
}
<p style="color: #FF9900;text-decoration: line-through">原价:@package.LinePrice 元</p>
</div>
</div>
</a>
}
}
</div>
</div>
</div>
2024-07-15 17:32:00 +08:00
</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">
2024-11-13 14:47:25 +08:00
<p style="font-weight:bold;">重磅打造:</p>
<p style="font-weight:bold;">1.极光IP聚IP池子最大的动态产品240城市纯净住宅IP</p>
<p style="font-weight:bold;">2.极狐IP聚IP网速最快的动态产品260城市纯净住宅IP</p>
2024-07-15 17:32:00 +08:00
2024-09-25 10:42:09 +08:00
<p style="font-weight:bold;">现推广期天卡1毛体验</p>
2024-07-15 17:32:00 +08:00
2025-04-19 18:24:52 +08:00
<p style="font-weight:bold;">承诺不好用24小时内免费退款</p>
2024-07-15 17:32:00 +08:00
<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>
2024-08-12 14:43:48 +08:00
<div class="modal fade" id="product_recommend_2" 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;color: red;">强子IP即将停运IP资源池将加进极狐IP。</p>
2024-11-13 14:47:25 +08:00
<p style="font-weight:bold;">重磅打造:</p>
<p style="font-weight:bold;">1.极光IP聚IP池子最大的动态产品240城市纯净住宅IP</p>
<p style="font-weight:bold;">2.极狐IP聚IP网速最快的动态产品260城市纯净住宅IP</p>
2024-08-12 14:43:48 +08:00
2024-09-25 10:42:09 +08:00
<p style="font-weight:bold;">现推广期天卡1毛体验</p>
2024-08-12 14:43:48 +08:00
2025-04-19 18:24:52 +08:00
<p style="font-weight:bold;">承诺不好用24小时内免费退款</p>
2024-08-12 14:43:48 +08:00
<div class="text-right">
<label>
<input id="recommendchechk_2" 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_2()" data-dismiss="modal">
忽略
</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
2024-07-15 17:32:00 +08:00
<script type="text/javascript">
function buyrecommendfunc() {
var isChecked = $('#recommendchechk').is(':checked');
if (isChecked) {
localStorage.setItem('rebuyrecommend', new Date().getTime());
}
}
2024-08-12 14:43:48 +08:00
function buyrecommendfunc_2() {
var isChecked = $('#recommendchechk_2').is(':checked');
if (isChecked) {
localStorage.setItem('buyrecommend_2', new Date().getTime());
}
}
2024-07-15 17:32:00 +08:00
var id = getUrlParam('productId')
if (id != 29 && id != 26 && id != 3 && id != 28 && id != 22 && id != 21 && id != 20 && id != 18 && id != 1 ) {
2024-08-12 14:43:48 +08:00
var lastClosedTime = localStorage.getItem('buyrecommend');
2024-07-15 17:32:00 +08:00
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')
}
}
}
2024-08-12 14:43:48 +08:00
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')
}
}
}
2024-07-15 17:32:00 +08:00
//获取url中的参数
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
var r = window.location.search.substr(1).match(reg); //匹配目标参数
if (r != null) return unescape(r[2]); return null; //返回参数值
}
</script>