初始提交
This commit is contained in:
132
Host/Views/Product/ReBuyIndex.cshtml
Normal file
132
Host/Views/Product/ReBuyIndex.cshtml
Normal file
@@ -0,0 +1,132 @@
|
||||
@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}";
|
||||
}
|
||||
<style>
|
||||
.productName {
|
||||
font-style: oblique;
|
||||
font-weight: 400;
|
||||
font-size: 32px;
|
||||
color: #f49119;
|
||||
}
|
||||
|
||||
.pkgNameCard {
|
||||
background: #223da4;
|
||||
height: 90px;
|
||||
padding: 15px;
|
||||
}
|
||||
.youhuiNew {
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
<!-- ad -->
|
||||
<div class="container-fluid ad">
|
||||
<a asp-action="taobao" asp-controller="article"> <img src="~/img/acBanner.png"></a>
|
||||
</div>
|
||||
|
||||
<div class="container stepOne packagebox" id="@("box"+defaultProduct.Id)">
|
||||
<div class="container bg_taocan">
|
||||
<div class="row" style="background:url(/img/products.png) no-repeat; background-size:100% 100%;">
|
||||
<div class="col-lg-4" style="height:200px;padding-top:30px;padding-left:50px;">
|
||||
<p class="productName">@defaultProduct.Name</p>
|
||||
</div>
|
||||
<div class="col-lg-8" style="height:200px;padding-top:30px">
|
||||
<p>@defaultProduct.Name</p>
|
||||
@foreach (var str in defaultProduct.ContentLine)
|
||||
{
|
||||
<p>@str</p>
|
||||
}
|
||||
<div class="row" style="text-align: right; position: absolute; right: 50px; bottom: 10px;">
|
||||
<a asp-action="index" asp-controller="product">
|
||||
<button type="button" class="btn btn-warning">购买通道</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
@foreach (var package in Model.Packages.Where(m => m.IsTest == 0 && m.Status == 1))
|
||||
{
|
||||
<div class="item packageitem" id="@("pkg"+package.Id)" a-pkg-id="@package.Id">
|
||||
|
||||
<p><span class="price">@package.Price</span>元</p>
|
||||
<p class="yuanjia">原价:<span>@package.LinePrice</span>元</p>
|
||||
<p>@(package.DayPrice)元/天</p>
|
||||
<div class="pkgNameCard">
|
||||
<p class="tianka">@package.Name</p>
|
||||
<p class="qixian">@package.Profile</p>
|
||||
</div>
|
||||
<img src="~/img/check.png" class="cardCheck">
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div style="border: 1px dashed #ccc;margin-top:30px;width:90%;margin-left: 63px;">
|
||||
<p class="youhuiNew">温馨提示:需求5个以上,可以联系客服设置优惠价;若您之前享优惠价,请联系客服帮你改价哦;开通后有任何问题可无理由退款</p>
|
||||
|
||||
</div>
|
||||
@if (user == null)
|
||||
{
|
||||
<p class="tijiao"><button type="button" class="btn btn-primary login">提交</button></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="tijiao"><button type="button" class="btn btn-primary btn-submit">提交</button></p>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if(!string.IsNullOrWhiteSpace(ViewBag.errorTip))
|
||||
{
|
||||
<script>
|
||||
alert('@ViewBag.errorTip')
|
||||
history.go(-1);
|
||||
</script>
|
||||
}
|
||||
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
var currentPkgId =@defaultPackage.Id;
|
||||
function selectPackage(id) {
|
||||
currentPkgId = id;
|
||||
var el = "#pkg" + id;
|
||||
//$(".packageitem").hide();
|
||||
//$(el).show()
|
||||
$(el).addClass("kuang");
|
||||
$(el).siblings().removeClass("kuang");
|
||||
$(el).find(".cardCheck").show();
|
||||
$(el).siblings().find(".cardCheck").hide();
|
||||
}
|
||||
function loginSuccess(data) {
|
||||
window.location.href = "rebuy?packageId=" + currentPkgId+"&accounts=@ViewBag.accounts";
|
||||
}
|
||||
$(function () {
|
||||
$(".card .item").click(function () {
|
||||
currentPkgId = $(this).attr('a-pkg-id');
|
||||
selectPackage(currentPkgId)
|
||||
})
|
||||
$(".btn-submit").click(function () {
|
||||
window.location.href = "rebuy?packageId=" + currentPkgId+"&accounts=@ViewBag.accounts";
|
||||
})
|
||||
selectPackage(currentPkgId)
|
||||
})
|
||||
|
||||
</script>
|
||||
}
|
||||
Reference in New Issue
Block a user