初始提交
This commit is contained in:
60
Host/Views.Mobile/Article/Index.cshtml
Normal file
60
Host/Views.Mobile/Article/Index.cshtml
Normal file
@@ -0,0 +1,60 @@
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model PageData<ArticleEntity>
|
||||
@{
|
||||
var type = this.Context.Request.GetInt("Catalog");
|
||||
}
|
||||
|
||||
<div class="quanjushousuo">
|
||||
<form asp-action="Search" asp-controller="Article" method="get">
|
||||
<p><input type="text" name="KeyWord" placeholder="请输入问题关键词" /><button type="submit" class="btnOrange">搜索全部</button></p>
|
||||
<p class="hot">搜索热词:<span>账号无法登录</span><span>如何充值</span></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="jiaocheng">
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="3"><img src="~/m/img/ios.png"></a></p>
|
||||
<p>苹果手机教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action ="info" asp-controller="article" asp-route-id="4"><img src="~/m/img/az.png"></a></p>
|
||||
<p>安卓手机教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="5"><img src="~/m/img/mnq.png"></a></p>
|
||||
<p>安卓模拟器教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="6"><img src="~/m/img/pc.png"></a></p>
|
||||
<p>windows电脑教程</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="newsList">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
|
||||
<li role="presentation" class="@(type==1?"active":"")"><a href="?Catalog=1">聚IP头条</a></li>
|
||||
<li role="presentation" class="@(type==2?"active":"")"><a href="?Catalog=2">优惠活动</a></li>
|
||||
<li role="presentation" class="@(type==3?"active":"")"><a href="?Catalog=3">常见问题</a></li>
|
||||
<li role="presentation" class="@(type==4?"active":"")"><a href="?Catalog=4">新手教程</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="home">
|
||||
<ul class="news">
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id">@item.Title</a><span>@item.CreateTime.ToString("yyyy.MM.dd")</span></li>
|
||||
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
@*<div role="tabpanel" class="tab-pane" id="profile">2</div>
|
||||
<div role="tabpanel" class="tab-pane" id="messages">3</div>
|
||||
<div role="tabpanel" class="tab-pane" id="settings">4</div>*@
|
||||
</div>
|
||||
</div>
|
||||
45
Host/Views.Mobile/Article/Search.cshtml
Normal file
45
Host/Views.Mobile/Article/Search.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model PageData<ArticleEntity>
|
||||
@{
|
||||
var type = this.Context.Request.GetInt("Catalog");
|
||||
}
|
||||
|
||||
<div class="quanjushousuo">
|
||||
<form asp-action="Search" asp-controller="Article" method="get">
|
||||
<p><input type="text" name="KeyWord" placeholder="请输入问题关键词" /><button type="submit" class="btnOrange">搜索全部</button></p>
|
||||
<p class="hot">搜索热词:<span>账号无法登录</span><span>如何充值</span></p>
|
||||
</form>
|
||||
</div>
|
||||
<div class="jiaocheng">
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="3"><img src="~/m/img/ios.png"></a></p>
|
||||
<p>苹果手机教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="4"><img src="~/m/img/az.png"></a></p>
|
||||
<p>安卓手机教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="5"><img src="~/m/img/mnq.png"></a></p>
|
||||
<p>安卓模拟器教程</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p><a asp-action="info" asp-controller="article" asp-route-id="6"><img src="~/m/img/pc.png"></a></p>
|
||||
<p>windows电脑教程</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="newsList">
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active">
|
||||
<ul class="news">
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id">@item.Title</a><span>@item.CreateTime.ToString("yyyy.MM.dd")</span></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
26
Host/Views.Mobile/Article/info.cshtml
Normal file
26
Host/Views.Mobile/Article/info.cshtml
Normal file
@@ -0,0 +1,26 @@
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model ArticleInfoMode
|
||||
@{
|
||||
|
||||
}
|
||||
<div class="quanjushousuo">
|
||||
<form asp-action="Search" asp-controller="Article" method="get">
|
||||
<p><input type="text" name="KeyWord" placeholder="请输入问题关键词" /><button type="submit" class="btnOrange">搜索全部</button></p>
|
||||
<p class="hot">搜索热词:<span>账号无法登录</span><span>如何充值</span></p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="lujing">
|
||||
<a href="/">首页</a>><span>@Model.Info.CatalogId.GetEnumDisplayName()</span>
|
||||
</div>
|
||||
<div class="lineBar">
|
||||
|
||||
</div>
|
||||
<div class="dmain">
|
||||
<p class="dtit">@Model.Info.Title</p>
|
||||
<p class="dtime grayText">@Model.Info.CreateTime.ToString("yyyy.MM.dd")</p>
|
||||
<p class="dcon">
|
||||
@Html.Raw(Model.Info.Content)
|
||||
</p>
|
||||
</div>
|
||||
39
Host/Views.Mobile/Article/taobao.cshtml
Normal file
39
Host/Views.Mobile/Article/taobao.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="container-fluid tAd">
|
||||
<img src="~/img/tBanner.png">
|
||||
</div>
|
||||
|
||||
<div class="container-fluid taobao_tintro text-center">
|
||||
<p>您可通过淘宝付款,系统自动赠送1元无限制优惠券。</p>
|
||||
<p>购买任意套餐都可以使用(相当于天卡半价),每隔30天可参加一次即得1张。</p>
|
||||
</div>
|
||||
|
||||
<div class="container tPeitu">
|
||||
<img src="~/img/peitu.png">
|
||||
</div>
|
||||
|
||||
<div class="container ttishi text-center">
|
||||
—— 为方便充值及开通,请选择自己需要的产品的对应店铺 ——
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row tlink">
|
||||
<div class="col-lg-3 col-xs-6 col-sm-6">
|
||||
<a href="https://item.taobao.com/item.htm?spm=a230r.7195193.1997079397.8.5a165f8bWrye7I&id=537279953649&abbucket=4
|
||||
" target="_blank"><img src="~/img/t1.png"></a>
|
||||
</div>
|
||||
<div class="col-lg-3 col-xs-6 col-sm-6">
|
||||
<a href="https://item.taobao.com/item.htm?spm=a230r.7195193.1997079397.8.5a165f8b9jMT39&id=557842664450&abbucket=4
|
||||
" target="_blank"><img src="~/img/t2.png"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row tlink">
|
||||
<div class="col-lg-3 col-xs-6 col-sm-6">
|
||||
<a href="https://item.taobao.com/item.htm?spm=a230r.7195193.1997079397.8.5a165f8b9jMT39&id=557842664450&abbucket=4
|
||||
" target="_blank"><img src="~/img/t3.png"></a>
|
||||
</div>
|
||||
<div class="col-lg-3 col-xs-6 col-sm-6">
|
||||
<a href="https://item.taobao.com/item.htm?spm=a230r.7195193.1997079397.28.72145f8bwi5F1r&id=613389354570&abbucket=4" target="_blank"><img src="~/img/t4.png"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
303
Host/Views.Mobile/Home/Index.cshtml
Normal file
303
Host/Views.Mobile/Home/Index.cshtml
Normal file
@@ -0,0 +1,303 @@
|
||||
@model List<ProductModel>
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer
|
||||
@using Hncore.Pass.Vpn.Service
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject ArticleService m_ArticleService
|
||||
@inject IConfiguration m_Configuration
|
||||
@{
|
||||
ViewData["Title"] = "聚IP JUIP.COM-千万动态ip切换,自建机房ip代理覆盖全国,多款市面热销产品";
|
||||
Layout = "_Layout";
|
||||
|
||||
UserLoginModel user = null;
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
}
|
||||
|
||||
var articleNews = await m_ArticleService.GetTop(12, ArticleCatalog.Top);
|
||||
var activityNews = await m_ArticleService.GetTop(12, ArticleCatalog.Activity);
|
||||
var helpsNews = await m_ArticleService.GetTop(12, ArticleCatalog.Help);
|
||||
var QANews = await m_ArticleService.GetTop(12, ArticleCatalog.QA);
|
||||
var baseUrl = m_Configuration["BaseInfoUrl"];
|
||||
Func<string, string> P = (path) => $"{baseUrl}{path}";
|
||||
var epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
|
||||
var countStr = epoch.ToString().Substring(0, 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
.swiper-container-youshi .swiper-slide-active{
|
||||
background:rgba(0,0,0.8);
|
||||
}
|
||||
</style>
|
||||
<div class="banner">
|
||||
<div class="buttonList">
|
||||
<div class="item">
|
||||
<a asp-action="soft" asp-controller="product"> <button type="button" class="btnBlue">客户端下载</button></a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a asp-action="index" asp-controller="linelist"> <button type="button" class="btnBlue">PPTP线路表</button></a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a asp-action="index" asp-controller="product"> <button type="button" class="btnOrange">免费试用</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="titProducts">
|
||||
<p>PRODUCTS</p>
|
||||
<p>产品介绍</p>
|
||||
</div>
|
||||
<div class="conProducts">
|
||||
<!-- Swiper -->
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach (var item in Model.Where(m => m.Sort != 1000))
|
||||
{
|
||||
<div class="swiper-slide">
|
||||
<div class="productCard">
|
||||
@*<div class="item">
|
||||
<img src="@P(item.Image)" />
|
||||
</div>*@
|
||||
<div class="item pName">
|
||||
@item.Name
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.Profile
|
||||
</div>
|
||||
<div class="item showLine">
|
||||
|
||||
<a asp-action="index" asp-controller="linelist" asp-route-ProductId="@item.Id">查看线路表→</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a asp-action="index" asp-controller="product" asp-route-id="@item.Id"><button type="button" class="btnBlue">测试与购买</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<!-- Add Arrows -->
|
||||
<div class="swiper-button-next"></div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="youshi">
|
||||
<!-- Swiper -->
|
||||
<div class="swiper-container-youshi">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide" style="background-image:url(./m/img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y1.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
全网产品最多IP库最大
|
||||
</div>
|
||||
<div class="item">
|
||||
旗下有强子PPTP,老鹰PPTP,先锋PPTP,星星PPTP等十几种动态IP,多产品组合畅享IP库翻倍,可用IP超1亿
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide" style="background-image:url(./img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y2.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
全设备全协议支持
|
||||
</div>
|
||||
<div class="item">
|
||||
支持安卓,iOS,电脑,windows,linux等系统。支持PPTP,L2TP,SSTP等协议
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide" style="background-image:url(./img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y3.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
用户独享宽带
|
||||
</div>
|
||||
<div class="item">
|
||||
一号一拨绝不超拨,快速切换平均带宽6-10兆,最高可达50兆
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide" style="background-image:url(./img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y4.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
价低质优,免费测试
|
||||
</div>
|
||||
<div class="item">
|
||||
全自营机房一手资源,价低质优,量大可联系客服获取最低价
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide" style="background-image:url(./img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y5.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
专属产品定制
|
||||
</div>
|
||||
<div class="item">
|
||||
支持定制独立服务器,可针对特定的项目需求定制专用产品
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-slide" style="background-image:url(./img/youshi-bg.png)">
|
||||
<div class="youshiList">
|
||||
<div class="item">
|
||||
<img src="~/m/img/y6.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
专业的服务团队
|
||||
</div>
|
||||
<div class="item">
|
||||
资深售前售后1对1指导,7*24小时实时响应,竭诚为您服务
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add Pagination -->
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="map">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="use">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="titProducts">
|
||||
<p>INFORMATION</p>
|
||||
<p>资讯&帮助</p>
|
||||
</div>
|
||||
<div class="newsList">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">聚IP头条</a></li>
|
||||
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">常见问题</a></li>
|
||||
<li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">新手教程</a></li>
|
||||
<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">优惠活动</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="home">
|
||||
<ul class="news">
|
||||
@foreach (var item in articleNews)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id"><span>@item.CreateTime.ToString("yyyy.MM.dd")</span>@item.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="profile">
|
||||
<ul class="news">
|
||||
@foreach (var item in activityNews)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id"><span>@item.CreateTime.ToString("yyyy.MM.dd")</span>@item.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="messages">
|
||||
<ul class="news">
|
||||
@foreach (var item in QANews)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id"><span>@item.CreateTime.ToString("yyyy.MM.dd")</span>@item.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="settings">
|
||||
<ul class="news">
|
||||
@foreach (var item in helpsNews)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id"><span>@item.CreateTime.ToString("yyyy.MM.dd")</span>@item.Title</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="qixia">
|
||||
<p>旗下产品</p>
|
||||
<ul>
|
||||
@foreach (var item in Model.Where(m => m.Sort != 1000))
|
||||
{
|
||||
<li><a asp-action="index" asp-controller="product" asp-route-id="@item.Id">@item.Name</a></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="linkus">
|
||||
<div class="item">
|
||||
<p>联系我们</p>
|
||||
<p>企业电话:400 800 9925</p>
|
||||
<p>工作时间:周一到周日8:00-24:00</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>商务合作</p>
|
||||
<p>电话/微信:18039519517</p>
|
||||
<p>QQ:508095081</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ewm">
|
||||
<p><img src="~/m/img/ewm.png"></p>
|
||||
<p class="banquan">copyright 2020 聚IP JUIP.COM 版权所有</p>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#myTabs a').click(function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
</script>
|
||||
<!-- Initialize Swiper -->
|
||||
<script>
|
||||
var swiper = new Swiper('.swiper-container', {
|
||||
slidesPerView: 3,
|
||||
spaceBetween: 30,
|
||||
slidesPerGroup: 1,
|
||||
loop: false,
|
||||
loopFillGroupWithBlank: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var swiper = new Swiper('.swiper-container-youshi', {
|
||||
effect: 'coverflow',
|
||||
grabCursor: true,
|
||||
centeredSlides: true,
|
||||
slidesPerView: 'auto',
|
||||
coverflowEffect: {
|
||||
rotate: 50,
|
||||
stretch: 0,
|
||||
depth: 100,
|
||||
modifier: 1,
|
||||
slideShadows: true,
|
||||
},
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
172
Host/Views.Mobile/LineList/Index.cshtml
Normal file
172
Host/Views.Mobile/LineList/Index.cshtml
Normal file
@@ -0,0 +1,172 @@
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using Hncore.Pass.Vpn.Service
|
||||
@inject ProductService m_ProductService
|
||||
@model List<ProductRouteEntity>
|
||||
@{
|
||||
var pid = this.Context.Request.GetInt("ProductId");
|
||||
var product = ViewData["products"] as List<ProductEntity>;
|
||||
var currentProduct = (await m_ProductService.GetById(pid)) ?? new ProductEntity();
|
||||
var lineTotalCount = Model.Count;
|
||||
var lineCount = Model.Where(m => m.Status == "正常").Count();
|
||||
}
|
||||
|
||||
<div class="quanjushousuo">
|
||||
<form asp-action="index" asp-controller="linelist" method="get">
|
||||
<p><input type="text" name="KeyWord" placeholder="输入地区/名称/服务器" id="KeyWord" /><button type="submit" class="btnOrange">搜索全部</button></p>
|
||||
<p><img src="~/m/img/shuju.png"> 实时总线路:@(lineTotalCount)条 <img src="~/m/img/shuju.png"> 实时可用线路:@(lineCount)条</p>
|
||||
<p>所有线路均支持:【电脑/安卓/苹果】【PPTP/L2TP/SSTP】</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="zhilian">
|
||||
<div class="item">
|
||||
<span class="btnZhilian">
|
||||
<a asp-index="" asp-controller="article" asp-route-Catalog="4"><img src="~/m/img/zhilian.png">直连教程</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
@*<p class="blueText">已购产品:<span>老鹰b组</span></p>*@
|
||||
<p class="grayText" style="font-size: 25px;">线路表与账号必须为同一产品才能使用</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="lineBar"></div>
|
||||
|
||||
<div class="cpList">
|
||||
<ul>
|
||||
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9))
|
||||
{
|
||||
<li class="item @(item.Id==pid?"cpActive":"")" a-pid="@item.Id" a-name="@item.Name">@item.Name</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="dangqianshousuo">
|
||||
<form asp-action="index" asp-controller="linelist" method="get">
|
||||
<p>
|
||||
<input type="hidden" name="ProductId" id="ProductId" value="@pid" />
|
||||
<input type="text" name="KeyWord" placeholder="输入地区/名称/服务器" id="KeyWord" />
|
||||
<button type="submit" class="btnBlue">搜索当前</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="daochu">
|
||||
<div class="item">
|
||||
<p><img src="~/m/img/miyao.png"> L2TP密钥:@currentProduct.L2TPPwd</p>
|
||||
<p><img src="~/m/img/dk.png"> SSTP端口:@currentProduct.SSTPPort</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span><img src="~/m/img/excel.png"> 导出Excel</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tableTit">
|
||||
<div class="item">
|
||||
地区
|
||||
</div>
|
||||
<div class="item">
|
||||
运营商
|
||||
</div>
|
||||
<div class="item">
|
||||
服务器域名
|
||||
</div>
|
||||
<div class="item">
|
||||
详情
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach (var group in Model.GroupBy(m => m.Province))
|
||||
{
|
||||
<p class="city">@group.Key</p>
|
||||
@foreach (var item in group)
|
||||
{
|
||||
<div class="cityData" style="@(item.Status=="正常"?"":"color:red")">
|
||||
<div class="item">
|
||||
@item.City
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.Name
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.ServerUrl
|
||||
</div>
|
||||
<div class="item">
|
||||
<button type="button" class="btnDetail"
|
||||
a-City="@item.City"
|
||||
a-Name="@item.Name"
|
||||
a-ServerUrl="@item.ServerUrl"
|
||||
a-BandWidth="@item.BandWidth"
|
||||
a-IpRemark="@item.IpRemark"
|
||||
a-Status="@item.Status">详情</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
<!-- 弹窗详情 -->
|
||||
<div class="layerTable">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>城市:</td>
|
||||
<td id="layer_city"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>运营商:</td>
|
||||
<td id="layer_name"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>服务器域名:</td>
|
||||
<td id="layer_server"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实时带宽:</td>
|
||||
<td id="layer_brand"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>IP量:</td>
|
||||
<td id="layer_ip"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>状态:</td>
|
||||
<td id="layer_status"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="back">
|
||||
<img src="~/m/img/arrowback.png"> 返回列表
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var pid =@pid;
|
||||
var productName=""
|
||||
$(function () {
|
||||
$(".cpList ul li").click(function(){
|
||||
$(this).addClass("cpActive");
|
||||
$(this).siblings().removeClass("cpActive");
|
||||
pid = $(this).attr("a-pid");
|
||||
productName = $(this).attr('a-name')
|
||||
$("#pName").text(productName);
|
||||
$("#ProductId").val(pid);
|
||||
window.location.href = "/linelist/index?ProductId=" + pid;
|
||||
})
|
||||
$(".daochu").click(function () {
|
||||
var p = $("#ProductId").val()||0;
|
||||
var KeyWord = $("#KeyWord").val() || "";
|
||||
window.location.href = "/linelist/Excel?ProductId=" + p + "&KeyWord=" + KeyWord;
|
||||
})
|
||||
$(".btnDetail").click(function () {
|
||||
$(".layerTable").show();
|
||||
$("#layer_city").text($(this).attr("a-City"));
|
||||
$("#layer_name").text($(this).attr("a-Name"));
|
||||
$("#layer_server").text($(this).attr("a-ServerUrl"));
|
||||
$("#layer_brand").text($(this).attr("a-BandWidth"));
|
||||
$("#layer_ip").text($(this).attr("a-IpRemark"));
|
||||
$("#layer_status").text($(this).attr("a-Status"));
|
||||
|
||||
})
|
||||
$(".back").click(function () { $(".layerTable").hide(); });
|
||||
})
|
||||
</script>
|
||||
95
Host/Views.Mobile/Product/Index.cshtml
Normal file
95
Host/Views.Mobile/Product/Index.cshtml
Normal file
@@ -0,0 +1,95 @@
|
||||
@using Hncore.Pass.Vpn.Response.Product
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@inject IConfiguration m_Configuration
|
||||
@model List<ProductWithPackageResponse>
|
||||
@{
|
||||
ViewData["Title"] = "购买产品";
|
||||
UserLoginModel user = null;
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
}
|
||||
var pid = this.Context.Request.Query.ContainsKey("id") ? this.Context.Request.Query["id"].ToString() : "";
|
||||
var defaultProduct = Model.Select(m => m.Product).FirstOrDefault();
|
||||
if (pid == "")
|
||||
{
|
||||
pid = Model.Select(m => m.Product).FirstOrDefault().Id.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultProduct = Model.Select(m => m.Product).FirstOrDefault(m => m.Id.ToString() == pid);
|
||||
}
|
||||
var defaultPackage = Model.Where(m => m.Product.Id == defaultProduct.Id).Select(m => m.Packages.FirstOrDefault()).FirstOrDefault();
|
||||
var baseUrl = m_Configuration["BaseInfoUrl"];
|
||||
Func<string, string> P = (path) => $"{baseUrl}{path}";
|
||||
}
|
||||
<div class="cpBanner">
|
||||
<img src="~/m/img/cpBanner.png">
|
||||
</div>
|
||||
<div class="cpNav">
|
||||
<div class="item">
|
||||
<ul class="nav nav-tabs cpName" role="tablist">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
|
||||
<a href="#@item.Product.Id" role="tab" data-toggle="tab">@item.Product.Name</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tab-content">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div role="tabpanel" class="tab-pane @(item.Product.Id==defaultProduct.Id?"active":"")" id="@item.Product.Id">
|
||||
<p class="texing">@item.Product.Name</p>
|
||||
<ul class="texingList">
|
||||
@foreach (var str in item.Product.ContentLine)
|
||||
{
|
||||
<li>·@str</li>
|
||||
}
|
||||
</ul>
|
||||
<p style="color: #ec6e58;font-size:30px;font-weight: bold;">
|
||||
需求5个以上,可联系客服设置优惠价<br />
|
||||
若之前享优惠价,请联系客服帮你改价
|
||||
</p>
|
||||
@foreach (var package in item.Packages.Where(m => m.Status == 1))
|
||||
{
|
||||
if (package.IsTest == 1)
|
||||
{
|
||||
<a asp-action="test" asp-controller="product" asp-route-id="@package.ProductId">
|
||||
<div class="card color_@((item.Packages.IndexOf(package)+1)%5)">
|
||||
<div class="item">
|
||||
<p>@package.Name</p>
|
||||
<p>@(package.DayPrice)元/天</p>
|
||||
<p>@package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>¥<span>@package.Price</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="buy" asp-controller="product" asp-route-id="@package.Id">
|
||||
<div class="card color_@((item.Packages.IndexOf(package)+1)%5)">
|
||||
<div class="item">
|
||||
<p>@package.Name</p>
|
||||
<p>@(package.DayPrice)元/天</p>
|
||||
<p>@package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>¥<span>@package.Price</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
60
Host/Views.Mobile/Product/ReBuyIndex.cshtml
Normal file
60
Host/Views.Mobile/Product/ReBuyIndex.cshtml
Normal file
@@ -0,0 +1,60 @@
|
||||
@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>
|
||||
<div class="cpNav">
|
||||
<div class="item">
|
||||
<ul class="nav nav-tabs cpName" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#@Model.Product.Id">@Model.Product.Name</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="@Model.Product.Id">
|
||||
<p class="texing">@Model.Product.Name</p>
|
||||
<ul class="texingList">
|
||||
<p>·不限速,网速最高可达50兆</p>
|
||||
<p>·支持手机,电脑,模拟器</p>
|
||||
<p>·200多个城市+全国混波量ip千万级</p>
|
||||
<p>·带宽6-10兆</p>
|
||||
<p>·断开再链接换ip</p>
|
||||
</ul>
|
||||
@foreach (var package in Model.Packages.Where(m=>m.IsTest==0&&m.Status==1))
|
||||
{
|
||||
<a asp-action="rebuy" asp-controller="Product" asp-route-packageId="@package.Id" asp-route-accounts=@ViewBag.accounts>
|
||||
<div class="card color_@((Model.Packages.IndexOf(package)+1)%5)">
|
||||
<div class="item">
|
||||
<p>@package.Name</p>
|
||||
<p>@(package.DayPrice)元/天</p>
|
||||
<p>@package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>¥<span>@package.Price</span></p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
36
Host/Views.Mobile/Product/Soft.cshtml
Normal file
36
Host/Views.Mobile/Product/Soft.cshtml
Normal file
@@ -0,0 +1,36 @@
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@inject IConfiguration m_Configuration
|
||||
@model List<ProductEntity>
|
||||
@{
|
||||
var baseUrl = m_Configuration["BaseInfoUrl"];
|
||||
Func<string, string> P = (path) => $"{baseUrl}{path}";
|
||||
}
|
||||
<div class="container-fluid softBg">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
<p class="simg"><img src="~/img/img_soft.png"></p>
|
||||
<p class="sintro">软件和账户必须为同一产品才能使用</p>
|
||||
</div>
|
||||
<div class="col-sm-4 text-right">
|
||||
<a href="#" class="jiaocheng">使用教程→</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="softList">
|
||||
@foreach (var item in Model.Where(m=>m.Sort != 1000))
|
||||
{
|
||||
<div class="item">
|
||||
@*<p><img src="@P(item.Image)"></p>*@
|
||||
<p>@item.Name</p>
|
||||
<p><a href="@item.SimulatorDownloadUrl"> <button type="button" class="btnBlue">SSTP客户端下载</button></a></p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
103
Host/Views.Mobile/Product/Test.cshtml
Normal file
103
Host/Views.Mobile/Product/Test.cshtml
Normal file
@@ -0,0 +1,103 @@
|
||||
@using Hncore.Pass.Vpn.Response.Product
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Hncore.Infrastructure.Common
|
||||
@model PackageInfoResponse
|
||||
@inject IConfiguration m_Configuration
|
||||
@inject Hncore.Pass.Vpn.Service.ProductAccountService m_AccountService
|
||||
@{
|
||||
ViewData["Title"] = "购买产品";
|
||||
var t = this.Context.Request.GetInt("t");
|
||||
var baseUrl = m_Configuration["BaseInfoUrl"];
|
||||
Func<string, string> P = (path) => $"{baseUrl}{path}";
|
||||
var randomPwd = ValidateCodeHelper.MakeNumCode(3).ToLower();
|
||||
var randomAccount = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(4).ToLower();
|
||||
while (m_AccountService.Exist(m => m.Account == randomAccount))
|
||||
{
|
||||
randomAccount = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(4).ToLower();
|
||||
}
|
||||
}
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<div class="cpTop">
|
||||
<p class="choose">当前已选产品:</p>
|
||||
<div class="kArea">
|
||||
<div class="cpKuang">
|
||||
<div class="item">
|
||||
<p><img src="@P(Model.Product.Image)"></p>
|
||||
<p>@Model.Product.Name</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p class="kaci">@Model.Package.Name</p>
|
||||
<p class="grayText">@(Model.Package.DayPrice)元/天</p>
|
||||
<p class="grayText">@Model.Package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
¥ <span class="price">@Model.Package.Price</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chongxin">
|
||||
<div class="item redText">
|
||||
*请确认好所需产品,买错产品换货将产生费用
|
||||
</div>
|
||||
<div class="item">
|
||||
<a asp-action="index" asp-controller="product"><button type="button" class="btnBlue">返回重新选择</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="biaodan">
|
||||
PPTP账号前缀:<input type="text" name="" id="account" value="@randomAccount" />
|
||||
</div>
|
||||
<div class="biaodan">
|
||||
PPTP账号密码:<input type="text" name="" id="pwd" value="@randomPwd" />
|
||||
</div>
|
||||
<p class="grayText text-center shengyu">剩余试用次数:<span>@(Model.RestTimes)</span></p>
|
||||
<p class="text-center redText tip"></p>
|
||||
<p class="text-center">
|
||||
@if (Model.RestTimes > 0 && Model.Package.Status == 1)
|
||||
{
|
||||
<button type="button" class="btnBlue large" onclick="create()">领取试用</button>
|
||||
}
|
||||
@if (Model.Package.Status == 0)
|
||||
{
|
||||
<span style="color:red;">
|
||||
该产品暂不能测试
|
||||
</span>
|
||||
}
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
@section Scripts{
|
||||
<script>
|
||||
function create() {
|
||||
var data = {
|
||||
ProductId:@(Model.Product.Id),
|
||||
PackageId: @(Model.Package.Id),
|
||||
Account: $('#account').val(),
|
||||
Pwd: $('#pwd').val()
|
||||
};
|
||||
if (data.Account == '' || data.Pwd == '') {
|
||||
$(".tip").text("账户和密码不能为空");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/api/course/v1/productaccount/CreateTestAccount',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
alert("领取成功")
|
||||
window.location.href = "/user/myaccounts";
|
||||
} else {
|
||||
$(".tip").text(res.Message);
|
||||
}
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
}
|
||||
701
Host/Views.Mobile/Product/buy.cshtml
Normal file
701
Host/Views.Mobile/Product/buy.cshtml
Normal file
@@ -0,0 +1,701 @@
|
||||
@using Hncore.Pass.Vpn.Response.Product
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@using Hncore.Pass.BaseInfo.Service
|
||||
@using Hncore.Infrastructure.Common
|
||||
@model PackageInfoResponse
|
||||
@inject UserService m_UserService
|
||||
@inject Hncore.Pass.Vpn.Service.ProductAccountService m_AccountService
|
||||
@{
|
||||
ViewData["Title"] = "购买产品";
|
||||
UserLoginModel user = null;
|
||||
Hncore.Pass.BaseInfo.Models.User userEntity = new Hncore.Pass.BaseInfo.Models.User();
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
userEntity = await m_UserService.GetById(user.Id);
|
||||
}
|
||||
var randomPwd = ValidateCodeHelper.MakeNumCode(3).ToLower();
|
||||
var randomAccount1 = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(4).ToLower();
|
||||
while (m_AccountService.Exist(m => m.Account == randomAccount1))
|
||||
{
|
||||
randomAccount1 = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(4).ToLower();
|
||||
}
|
||||
|
||||
var randomAccountMutil = ValidateCodeHelper.MakeCharCode(3).ToLower();
|
||||
|
||||
while (m_AccountService.Exist(m => m.Account.StartsWith(randomAccountMutil)))
|
||||
{
|
||||
randomAccountMutil = ValidateCodeHelper.MakeCharCode(3).ToLower();
|
||||
}
|
||||
}
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".btnNav").click(function () {
|
||||
$(".mask").fadeIn();
|
||||
});
|
||||
$(".btnClose").click(function () {
|
||||
$(".mask").fadeOut();
|
||||
});
|
||||
|
||||
$(".dan").click(function () {
|
||||
$(this).addClass("zActive");
|
||||
$(".pi").removeClass("zActive");
|
||||
$(".conDan").show();
|
||||
$(".conPi").hide();
|
||||
});
|
||||
$(".pi").click(function () {
|
||||
$(this).addClass("zActive");
|
||||
$(".dan").removeClass("zActive");
|
||||
$(".conDan").hide();
|
||||
$(".conPi").show();
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<vc:pay-wait></vc:pay-wait>
|
||||
<div id="app">
|
||||
<div class="cpTop">
|
||||
<p class="choose">当前已选产品:</p>
|
||||
<div class="kArea">
|
||||
<div class="cpKuang">
|
||||
<div class="item">
|
||||
<p><img src="/@Model.Product.Image"></p>
|
||||
<p>@Model.Product.Name</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p class="kaci">@Model.Package.Name</p>
|
||||
<p class="grayText">@(Model.Package.DayPrice)元/天</p>
|
||||
<p class="grayText">@Model.Package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
¥ <span class="price">@Model.Package.Price</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chongxin">
|
||||
<div class="item redText">
|
||||
*请确认好所需产品,买错产品换货将产生费用
|
||||
@if (Model.Package.Name == "天卡")
|
||||
{
|
||||
<p class="item redText" style="text-align:center">*天卡不支持退款,请谨慎购买</p>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<button type="button" class="btnBlue" onclick="history.go(-1)">返回重新选择</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mytab">
|
||||
<div class="col-sm-6 col-xs-6 text-right">
|
||||
<span class="dan zActive">单个注册</span>
|
||||
</div>
|
||||
<div class="col-sm-6 col-xs-6 text-left">
|
||||
<span class="pi">批量注册</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="conDan">
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP账号前缀:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="OneBuyModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP账号密码:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="OneBuyModel.Pwd" v-on:blur="checkOnePwd" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
连接数:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<div class="jiajian">
|
||||
<div class="item" v-on:click="OneBuyModel.ConnectCount>1&&OneBuyModel.ConnectCount--">
|
||||
-
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" style="width:100%;height:60px;border:0;padding-left:20px" v-model="OneBuyModel.ConnectCount" />
|
||||
@*<span>{{OneBuyModel.ConnectCount}}</span>*@
|
||||
</div>
|
||||
<div class="item" v-on:click="OneBuyModel.ConnectCount++">
|
||||
+
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
选择优惠券:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 select">
|
||||
<select class="chooseYhq" v-model="OneBuyModel.CouponId">
|
||||
<option value="volvo">选择优惠券</option>
|
||||
<option v-for="item in Coupons" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
余额:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<div class="">
|
||||
当前账户余额<span class="blueText">@(userEntity.RestAmount)</span>元
|
||||
<a href="/User/Index">前往充值</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="showPayType">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
支付方式:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 pay">
|
||||
<div class="radio" v-on:click="OneBuyModel.OPayType=100">
|
||||
<input name="OPayType" type="radio" v-model="OneBuyModel.OPayType" checked value="100">
|
||||
<label class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
|
||||
</div>
|
||||
<div class="radio" v-on:click="OneBuyModel.OPayType=70">
|
||||
<input name="OPayType" type="radio" v-model="OneBuyModel.OPayType" value="70">
|
||||
<label class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>
|
||||
</div>
|
||||
<div class="radio" >
|
||||
<input id="UseAccountAmount" name="OPayType" type="radio" v-model="OneBuyModel.UseAccountAmount" value="1">
|
||||
<label for="UseAccountAmount" class="radio-label" style="line-height:150%"> 余额支付</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
应付款:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span>{{OneTotalAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
应付款:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span class="yingfu" style="font-size: 35px;font-weight: bold;">{{OnePayAmount}}</span>元
|
||||
</div>
|
||||
</div> *@
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="redText songquan">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="btnPay" v-on:click="onePay">确认支付</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="conPi">
|
||||
<p class="shuoming">批量注册的账号会使用【账号前缀】+【开始数】+【个数】顺序进行注册,</p>
|
||||
<p class="shuoming">如:注册账号前缀为【user】开始数为【6】个数为【10】,则注册的账号为:user06,user07,user08,....user14</p>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP账号前缀:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="MoreBuyModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP开始号:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="number" v-model="MoreBuyModel.MinPostfix" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP注册个数:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="number" v-model="MoreBuyModel.MaxPostfix" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP账号密码:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="MoreBuyModel.Pwd" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
连接数:
|
||||
</div>
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
<div class="jiajian">
|
||||
<div class="item" @@click="MoreBuyModel.ConnectCount>1&&MoreBuyModel.ConnectCount--">
|
||||
-
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" style="width:100%;height:60px;border:0;padding-left:20px" v-model="MoreBuyModel.ConnectCount" />
|
||||
</div>
|
||||
<div class="item" @@click="MoreBuyModel.ConnectCount++">
|
||||
+
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
@*<span class="quanxian">超过10个请联系客服开通</span>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
选择优惠券:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 select">
|
||||
<select class="chooseYhq" v-model="MoreBuyModel.CouponId">
|
||||
<option value="volvo">选择优惠券</option>
|
||||
<option v-for="item in Coupons" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
余额:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<div class="">
|
||||
当前账户余额<span class="blueText">@(userEntity.RestAmount)</span>元
|
||||
<a href="/User/Index">前往充值</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="showPayType">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
支付方式:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 pay">
|
||||
<div class="radio" v-on:click="MoreBuyModel.OPayType=100">
|
||||
<input name="radio" type="radio" value="100" checked v-model="MoreBuyModel.OPayType">
|
||||
<label class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
|
||||
</div>
|
||||
<div class="radio" v-on:click="MoreBuyModel.OPayType=70">
|
||||
<input name="radio" type="radio" value="70" v-model="MoreBuyModel.OPayType">
|
||||
<label class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>
|
||||
</div>
|
||||
<div class="radio" >
|
||||
<input id="UseAccountAmount_s" name="radio" type="radio" v-model="MoreBuyModel.UseAccountAmount" value="1">
|
||||
<label for="UseAccountAmount_s" class="radio-label" style="line-height:150%"> 余额支付</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
总金额:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span>{{MoreTotalAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
应付款:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span class="yingfu">{{MorePayAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="redText songquan">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="btnPay" @@click="morePay">确认支付</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 支付弹窗结束 -->
|
||||
|
||||
<div id="aliPayBox" style="display:none"></div>
|
||||
|
||||
|
||||
@section Scripts{
|
||||
<script>
|
||||
var productId =@(Model.Product.Id);
|
||||
/** 表单序列化成json字符串的方法 */
|
||||
function form2JsonString(formId) {
|
||||
var paramArray = $('#' + formId).serializeArray();
|
||||
var jsonObj = {};
|
||||
$(paramArray).each(function () {
|
||||
jsonObj[this.name] = this.value;
|
||||
});
|
||||
console.log(jsonObj);
|
||||
return JSON.stringify(jsonObj);
|
||||
}
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
showPayType:true,
|
||||
payHandler:null,
|
||||
Tip:'',
|
||||
RestAmount: @(userEntity.RestAmount),
|
||||
Coupons: [],
|
||||
SelectCoupon: {},
|
||||
OrderInfo: {},
|
||||
OneChecker: {
|
||||
AccountOk: true,
|
||||
PwdOk:true
|
||||
},
|
||||
MoreChecker: {
|
||||
AccountOk: true,
|
||||
PwdOk: true,
|
||||
Max:10,
|
||||
},
|
||||
OneBuyModel: {
|
||||
Price:@(Model.Package.Price),
|
||||
PackageId:@(Model.Package.Id),
|
||||
CouponAmount: 0,
|
||||
OrderType: 1,
|
||||
Account: '@(randomAccount1)',
|
||||
Pwd: '@(randomPwd)',
|
||||
ConnectCount: 1,
|
||||
CouponId: 0,
|
||||
UseAccountAmount: 0,
|
||||
OPayType: 100,
|
||||
PayChannel:40,
|
||||
},
|
||||
MoreBuyModel: {
|
||||
Price:@(Model.Package.Price),
|
||||
PackageId:@(Model.Package.Id),
|
||||
CouponAmount: 0,
|
||||
OrderType: 2,
|
||||
Account: '@(randomAccountMutil)',
|
||||
Pwd: '@(randomPwd)',
|
||||
ConnectCount: 1,
|
||||
CouponId: 0,
|
||||
UseAccountAmount: 0,
|
||||
OPayType: 100,
|
||||
MinPostfix: 1,
|
||||
MaxPostfix: 1,
|
||||
PayChannel:40,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
OneTotalAmount: function () {
|
||||
var total= this.OneBuyModel.Price * this.OneBuyModel.ConnectCount
|
||||
return total.toFixed(2);
|
||||
},
|
||||
OnePayAmount: function () {
|
||||
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ?this.RestAmount:0;
|
||||
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount - this.OneBuyModel.CouponAmount - restAmout;
|
||||
total= total < 0 ? 0 : total;
|
||||
return total.toFixed(2);
|
||||
},
|
||||
MoreTotalAmount: function () {
|
||||
var total= this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix;
|
||||
return total.toFixed(2);
|
||||
},
|
||||
MorePayAmount: function () {
|
||||
var restAmout = this.MoreBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
|
||||
var total = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount * this.MoreBuyModel.MaxPostfix - this.MoreBuyModel.CouponAmount - restAmout;
|
||||
total= total < 0 ? 0 : total;
|
||||
return total.toFixed(2);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'OneBuyModel.CouponId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var totalAmount = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount;
|
||||
for (var i = 0; i < this.Coupons.length; i++) {
|
||||
var item = this.Coupons[i];
|
||||
if (totalAmount < item.AllowMinAmount) {
|
||||
continue;
|
||||
}
|
||||
if (item.Id == newValue) {
|
||||
if (item.CouponType == 1) {//满减
|
||||
this.OneBuyModel.CouponAmount = item.CouponValue;
|
||||
} else {
|
||||
this.OneBuyModel.CouponAmount = totalAmount * item.CouponValue * 0.1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'MoreBuyModel.CouponId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var totalAmount = this.MoreBuyModel.Price * this.MoreBuyModel.ConnectCount;
|
||||
for (var i = 0; i < this.Coupons.length; i++) {
|
||||
var item = this.Coupons[i];
|
||||
if (totalAmount < item.AllowMinAmount) {
|
||||
continue;
|
||||
}
|
||||
if (item.Id == newValue) {
|
||||
if (item.CouponType == 1) {//满减
|
||||
this.MoreBuyModel.CouponAmount = item.CouponValue;
|
||||
} else {
|
||||
this.MoreBuyModel.CouponAmount = totalAmount * item.CouponValue * 0.1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'OneBuyModel.OPayType': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var wx = 10;
|
||||
this.OneBuyModel.UseAccountAmount = false;
|
||||
if (isWeiXin()) wx = 20;
|
||||
this.OneBuyModel.PayChannel = newValue == 70 ? wx : 40;
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'MoreBuyModel.OPayType': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var wx = 10;
|
||||
this.MoreBuyModel.UseAccountAmount = false;
|
||||
if (isWeiXin()) wx = 20;
|
||||
this.MoreBuyModel.PayChannel = newValue == 70 ? wx : 40;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
if (isWeiXin()) {
|
||||
this.OneBuyModel.PayChannel = 20;
|
||||
this.OneBuyModel.OPayType = 70;
|
||||
this.MoreBuyModel.PayChannel = 20;
|
||||
this.MoreBuyModel.OPayType = 70;
|
||||
this.showPayType = false;
|
||||
}
|
||||
@if(user != null) {
|
||||
<text>this.getCoupons()</text>
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isNum(value) {
|
||||
return typeof value === 'number' && !isNaN(value);
|
||||
},
|
||||
selectFn: function (e) {
|
||||
console.log(e.target.value) // 选择项的value
|
||||
},
|
||||
getCoupons: function () {
|
||||
var that = this;
|
||||
var url = '/api/sells/v1/coupon/GetAvailableCoupon';
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
that.Coupons = res.Data.map(m => m.Coupon);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
checkOneAccount() {
|
||||
if (this.OneBuyModel.Account.length > 10 || this.OneBuyModel.Account.length < 5) {
|
||||
this.OneChecker.AccountOk = false;
|
||||
return false;
|
||||
}
|
||||
this.OneChecker.AccountOk = true;
|
||||
return true;
|
||||
},
|
||||
checkOnePwd() {
|
||||
if (this.OneBuyModel.Pwd.length > 6 || this.OneBuyModel.Pwd.length <1) {
|
||||
this.OneChecker.PwdOk = false;
|
||||
return false;
|
||||
}
|
||||
this.OneChecker.PwdOk = true;
|
||||
return true;
|
||||
},
|
||||
checkMoreAccount() {
|
||||
if (this.MoreBuyModel.Account.length > 10 || this.MoreBuyModel.Account.length < 3) {
|
||||
this.MoreChecker.AccountOk = false;
|
||||
return false;
|
||||
}
|
||||
this.MoreChecker.AccountOk = true;
|
||||
return true;
|
||||
},
|
||||
checkMorePwd() {
|
||||
if (this.MoreBuyModel.Pwd.length > 6 || this.MoreBuyModel.Pwd.length < 1) {
|
||||
this.MoreChecker.PwdOk = false;
|
||||
return false;
|
||||
}
|
||||
this.MoreChecker.PwdOk = true;
|
||||
return true;
|
||||
},
|
||||
onePay: function () {
|
||||
this.OneBuyModel.ConnectCount = parseInt(this.OneBuyModel.ConnectCount)
|
||||
if (!this.isNum(this.OneBuyModel.ConnectCount)) return;
|
||||
if (!this.checkOneAccount() || !this.checkOnePwd()) return;
|
||||
if (this.OnePayAmount > 0 ) {
|
||||
if (this.OneBuyModel.UseAccountAmount){
|
||||
alert('余额不足,请充值!');return;
|
||||
}
|
||||
}
|
||||
var that = this;
|
||||
if (this.OneBuyModel.UseAccountAmount === true) this.OneBuyModel.UseAccountAmount = 1;
|
||||
if (this.OneBuyModel.UseAccountAmount === false) this.OneBuyModel.UseAccountAmount = 0;
|
||||
showPayWait();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/product/CreateOrder',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.OneBuyModel),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
hidePayWait();
|
||||
if (res.Data == "00") {
|
||||
//alert('购买成功')
|
||||
showPayOk();
|
||||
} else {
|
||||
that.payCallback(res.Data)
|
||||
that.isPay(res.Data.OrderInfo.OrderNo);
|
||||
}
|
||||
} else {
|
||||
//that.Tip = res.Message;
|
||||
tipPayWait(res.Message);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
morePay: function () {
|
||||
this.MoreBuyModel.ConnectCount = parseInt(this.MoreBuyModel.ConnectCount)
|
||||
if (!this.isNum(this.MoreBuyModel.ConnectCount)) return;
|
||||
if (!this.checkMoreAccount() || !this.checkMorePwd() || this.MoreBuyModel.MaxPostfix>500) return;
|
||||
var that = this;
|
||||
if (this.OnePayAmount > 0 ) {
|
||||
if (this.MoreBuyModel.UseAccountAmount){
|
||||
alert('余额不足,请充值!');return;
|
||||
}
|
||||
}
|
||||
if (this.MoreBuyModel.UseAccountAmount === true) this.MoreBuyModel.UseAccountAmount = 1;
|
||||
if (this.MoreBuyModel.UseAccountAmount === false) this.MoreBuyModel.UseAccountAmount = 0;
|
||||
showPayWait();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/product/CreateOrder',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.MoreBuyModel),
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
hidePayWait();
|
||||
if (res.Data == "00") {
|
||||
//alert('购买成功')
|
||||
showPayOk();
|
||||
} else {
|
||||
that.payCallback(res.Data)
|
||||
that.isPay(res.Data.OrderInfo.OrderNo);
|
||||
}
|
||||
} else {
|
||||
//that.Tip = res.Message;
|
||||
tipPayWait(res.Message);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
payCallback: function (data) {
|
||||
this.OrderInfo = data.OrderInfo;
|
||||
if (!data.PayData) { alert("下单失败");return; }
|
||||
var payChannel = this.OrderInfo.PayChannel;
|
||||
if (payChannel == 10) {
|
||||
this.h5WxPay(data.PayData)
|
||||
} else if (payChannel == 20) {
|
||||
this.jsWxPay(data.PayData);
|
||||
} else if (payChannel == 40) {
|
||||
this.aliPay(data.PayData);
|
||||
}
|
||||
},
|
||||
h5WxPay(payData) {
|
||||
window.location.href = payData;
|
||||
},
|
||||
jsWxPay(payData) {
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
JSON.parse(payData),
|
||||
function (res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
window.location.href = "/User/MyAccounts";
|
||||
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
||||
|
||||
} else {
|
||||
alert("支付失败" + res.err_msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
aliPay(payData) {
|
||||
$("#aliPayBox").html(payData);
|
||||
//window.location.href = payData;
|
||||
},
|
||||
checkAccount: function () {
|
||||
var account = $("#sAccount").val()
|
||||
var url = '/api/course/v1/productaccount/ExistAccount?productId=' + productId + '&accounts=' + account;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code != 10000) {
|
||||
$("#sAccountTip").text(res.Message)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
isPay: function (orderNo) {
|
||||
var that = this;
|
||||
this.payHandler= setInterval(function () {
|
||||
var url = '/product/IsPay?orderNo=' + orderNo;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000 && res.Data ==1) {
|
||||
clearInterval(that.payHandler);
|
||||
$(".payMask").hide();
|
||||
showPayOk();
|
||||
//window.location.href = "/user/myaccounts";
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 3000)
|
||||
},
|
||||
close() {
|
||||
clearInterval(this.payHandler);
|
||||
$('.payMask').hide();
|
||||
$('#qrcode').empty();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function checkAccount() {
|
||||
var account = $("#sAccount").val()
|
||||
var url = '/api/course/v1/productaccount/ExistAccount?productId=' + productId+ '&accounts=' + account;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code != 10000) {
|
||||
$("#sAccountTip").text(res.Message)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
}
|
||||
328
Host/Views.Mobile/Product/rebuy.cshtml
Normal file
328
Host/Views.Mobile/Product/rebuy.cshtml
Normal file
@@ -0,0 +1,328 @@
|
||||
@using Hncore.Pass.Vpn.Response.Product
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@using Hncore.Pass.BaseInfo.Service
|
||||
@model PackageInfoResponse
|
||||
@inject UserService m_UserService
|
||||
@{
|
||||
ViewData["Title"] = "购买产品";
|
||||
UserLoginModel user = null;
|
||||
Hncore.Pass.BaseInfo.Models.User userEntity = new Hncore.Pass.BaseInfo.Models.User();
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
userEntity = await m_UserService.GetById(user.Id);
|
||||
}
|
||||
}
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<vc:pay-wait></vc:pay-wait>
|
||||
<div id="app">
|
||||
<div class="cpTop">
|
||||
<p class="choose">当前已选产品:</p>
|
||||
<div class="kArea">
|
||||
<div class="cpKuang">
|
||||
<div class="item">
|
||||
<p><img src="~/@Model.Product.Image"></p>
|
||||
<p>@Model.Product.Name</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p class="kaci">@Model.Package.Name</p>
|
||||
<p class="grayText">@(Model.Package.DayPrice)元/天</p>
|
||||
<p class="grayText">@Model.Package.Profile</p>
|
||||
</div>
|
||||
<div class="item">
|
||||
¥ <span class="price">@Model.Package.Price</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chongxin">
|
||||
<div class="item redText">
|
||||
*请确认好所需产品,买错产品换货将产生费用
|
||||
</div>
|
||||
<div class="item">
|
||||
<button type="button" class="btnBlue" onclick="history.go(-1)">返回重新选择</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- con -->
|
||||
<div class="container zhuce">
|
||||
<div class="reg_tab">
|
||||
<div class="item dan active_dan">
|
||||
续费
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="conDan">
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP产品账号:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="OneBuyModel.Account" disabled />
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
PPTP账号密码:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 shuru">
|
||||
<input type="text" v-model="OneBuyModel.Pwd" />
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
连接数:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<div class="jiajian">
|
||||
<div class="item">
|
||||
|
||||
</div>
|
||||
<div class="item">
|
||||
<span>{{OneBuyModel.ConnectCount}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
选择优惠券:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 select">
|
||||
<select class="chooseYhq" v-model="OneBuyModel.CouponId">
|
||||
<option value="0">请选择优惠券</option>
|
||||
<option v-for="item in Coupons" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
余额抵扣:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<div class="radio">
|
||||
<input type="checkbox" v-model="OneBuyModel.UseAccountAmount" value="1"> 当前账户余额<span class="blueText">@(userEntity.RestAmount)</span>元
|
||||
@*<input id="radio-1" name="radio" type="radio">
|
||||
<label for="radio-1" class="radio-label">使用余额抵扣,当前账户余额@(userEntity.RestAmount)元</label>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="showPayType">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
支付方式:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7 pay">
|
||||
<div class="radio" v-on:click="OneBuyModel.OPayType=100">
|
||||
<input type="radio" v-model="OneBuyModel.OPayType" value="100">
|
||||
<label class="radio-label"><img src="~/m/img/zfb.png"> 支付宝支付</label>
|
||||
</div>
|
||||
<div class="radio" v-on:click="OneBuyModel.OPayType=70">
|
||||
<input type="radio" v-model="OneBuyModel.OPayType" value="70">
|
||||
<label class="radio-label"><img src="~/m/img/wx.png"> 微信支付</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
总金额:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span>{{TotalAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5 col-xs-5">
|
||||
应付款:
|
||||
</div>
|
||||
<div class="col-sm-7 col-xs-7">
|
||||
<span class="yingfu" style="font-size: 35px;font-weight: bold;">{{PayAmount}}</span>元
|
||||
</div>
|
||||
</div>
|
||||
<p class="grayText songquan">每隔30天淘宝下单可获得一张优惠券</p>
|
||||
<p class="grayText songquan" style="color:red">{{Tip}}</p>
|
||||
<div class="ok">
|
||||
<button type="button" class="btnPay" v-on:click="onePay">确认支付</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="aliPayBox" style="display:none"></div>
|
||||
@section Scripts{
|
||||
<script>
|
||||
var productId =@(Model.Product.Id);
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
showPayType: true,
|
||||
Tip:'',
|
||||
RestAmount: @(userEntity.RestAmount),
|
||||
Coupons: [],
|
||||
SelectCoupon: {},
|
||||
OrderInfo: {},
|
||||
OneBuyModel: {
|
||||
Price:@(Model.Package.Price),
|
||||
PackageId:@(Model.Package.Id),
|
||||
OrderType: @ViewBag.orderType,
|
||||
Account: '@ViewBag.accounts',
|
||||
CouponAmount: 0,
|
||||
Pwd: '',
|
||||
ConnectCount: @(ViewBag.ConnectCount),
|
||||
CouponId: 0,
|
||||
UseAccountAmount: 0,
|
||||
OPayType: 100,
|
||||
PayChannel:40,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
TotalAmount: function () {
|
||||
var count = this.OneBuyModel.Account.split(',').length;
|
||||
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count;
|
||||
return total.toFixed(2);
|
||||
},
|
||||
PayAmount: function () {
|
||||
var count = this.OneBuyModel.Account.split(',').length;
|
||||
var restAmout = this.OneBuyModel.UseAccountAmount == 1 ? this.RestAmount : 0;
|
||||
var total = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount * count - this.OneBuyModel.CouponAmount - restAmout;
|
||||
total= total < 0 ? 0 : total;
|
||||
return total.toFixed(2);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'OneBuyModel.CouponId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var totalAmount = this.OneBuyModel.Price * this.OneBuyModel.ConnectCount;
|
||||
for (var i = 0; i < this.Coupons.length; i++) {
|
||||
var item = this.Coupons[i];
|
||||
if (totalAmount < item.AllowMinAmount) {
|
||||
continue;
|
||||
}
|
||||
if (item.Id == newValue) {
|
||||
if (item.CouponType == 1) {//满减
|
||||
this.OneBuyModel.CouponAmount = item.CouponValue;
|
||||
} else {
|
||||
this.OneBuyModel.CouponAmount = totalAmount * item.CouponValue * 0.1;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
'OneBuyModel.OPayType': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
var wx = 10;
|
||||
if (isWeiXin()) wx = 20;
|
||||
this.OneBuyModel.PayChannel = newValue == 70 ? wx : 40;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
if (isWeiXin()) {
|
||||
this.OneBuyModel.PayChannel = 20;
|
||||
this.OneBuyModel.OPayType = 70;
|
||||
this.showPayType = false;
|
||||
}
|
||||
this.getCoupons();
|
||||
},
|
||||
methods: {
|
||||
getCoupons: function () {
|
||||
var that = this;
|
||||
var url = '/api/sells/v1/coupon/GetAvailableCoupon';
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
that.Coupons = res.Data.map(m => m.Coupon);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onePay: function () {
|
||||
if (this.PayAmount == 0 || this.OneBuyModel.UseAccountAmount) {
|
||||
if (!confirm('余额和微信支付宝组合支付时,余额将立即扣除,请务必完成后续差额支付!')) return;
|
||||
}
|
||||
var that = this;
|
||||
if (this.OneBuyModel.UseAccountAmount === true) this.OneBuyModel.UseAccountAmount = 1;
|
||||
if (this.OneBuyModel.UseAccountAmount === false) this.OneBuyModel.UseAccountAmount = 0;
|
||||
var that = this;
|
||||
showPayWait();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/product/CreateOrder',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.OneBuyModel),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
hidePayWait();
|
||||
that.payCallback(res.Data)
|
||||
//that.isPay(res.Data.OrderInfo.OrderNo);
|
||||
} else {
|
||||
//that.Tip = res.Message;
|
||||
tipPayWait(res.Message);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
payCallback: function (data) {
|
||||
this.OrderInfo = data.OrderInfo;
|
||||
if (!data.PayData) { alert("下单失败"); return; }
|
||||
var payChannel = this.OrderInfo.PayChannel;
|
||||
if (payChannel == 10) {
|
||||
this.h5WxPay(data.PayData)
|
||||
} else if (payChannel == 20) {
|
||||
this.jsWxPay(data.PayData);
|
||||
} else if (payChannel == 40) {
|
||||
this.aliPay(data.PayData);
|
||||
}
|
||||
},
|
||||
h5WxPay(payData) {
|
||||
window.location.href = payData;
|
||||
},
|
||||
jsWxPay(payData) {
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
JSON.parse(payData),
|
||||
function (res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
window.location.href = "/User/MyAccounts";
|
||||
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
||||
|
||||
} else {
|
||||
alert("支付失败" + res.err_msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
aliPay(payData) {
|
||||
$("#aliPayBox").html(payData);
|
||||
},
|
||||
isPay: function (orderNo) {
|
||||
var handler = setInterval(function () {
|
||||
var url = '/product/IsPay?orderNo=' + orderNo;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000 && res.Data == 1) {
|
||||
clearInterval(handler);
|
||||
// $(".payMask").hide();
|
||||
window.location.href = "/user/myaccounts";
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 3000)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
}
|
||||
35
Host/Views.Mobile/Shared/Components/Pager/Default.cshtml
Normal file
35
Host/Views.Mobile/Shared/Components/Pager/Default.cshtml
Normal file
@@ -0,0 +1,35 @@
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model ViewComponents.PagerModel
|
||||
@{
|
||||
Model.PageIndex = Model.PageIndex == 0 ? 1 : Model.PageIndex;
|
||||
var q = this.Context.Request.Remove("PageIndex");
|
||||
if (string.IsNullOrEmpty(q))
|
||||
{
|
||||
q = "?";
|
||||
}
|
||||
else
|
||||
{
|
||||
q += "&";
|
||||
}
|
||||
}
|
||||
|
||||
@if (Model.TotalPage > 1)
|
||||
{
|
||||
<ul class="pagination">
|
||||
@if (Model.PageIndex > 1)
|
||||
{
|
||||
string href = $"{q}PageIndex={Model.PageIndex - 1}";
|
||||
<li class="page-item"><a class="page-link" href="@href">上一页</a></li>
|
||||
}
|
||||
@for (var i = 1; i <= Model.TotalPage; i++)
|
||||
{
|
||||
<li class="page-item"><a class="page-link @(Model.PageIndex==i?"fenyeActive2":"")" href="@(q)PageIndex=@i">@i</a></li>
|
||||
|
||||
}
|
||||
@if (Model.PageIndex < Model.TotalPage)
|
||||
{
|
||||
string href = $"{q}PageIndex={Model.PageIndex + 1}";
|
||||
<li class="page-item"><a class="page-link" href="@href">下一页</a></li>
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
79
Host/Views.Mobile/Shared/Components/PayWait/Default.cshtml
Normal file
79
Host/Views.Mobile/Shared/Components/PayWait/Default.cshtml
Normal file
@@ -0,0 +1,79 @@
|
||||
|
||||
<style>
|
||||
/* 支付等待弹窗开始 */
|
||||
.paywait {
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
width: 360px;
|
||||
height: 500px;
|
||||
top: 50%;
|
||||
margin-top: -200px;
|
||||
left: 50%;
|
||||
margin-left: -180px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plTop img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.plFour {
|
||||
background: #fff;
|
||||
margin: 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.plFour img {
|
||||
width: 90%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.plClose {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
right: 10px;
|
||||
z-index: 999;
|
||||
}
|
||||
.errorTip{
|
||||
margin-top:30px;
|
||||
color:red;
|
||||
}
|
||||
/* 支付等待弹窗结束 */
|
||||
</style>
|
||||
|
||||
<!-- 支付等待 -->
|
||||
<div class="paywait">
|
||||
<img src="~/img/close.png" class="plClose">
|
||||
<div class="plTop">
|
||||
<img src="~/img/paywait.png">
|
||||
</div>
|
||||
<div class="row plFour">
|
||||
<div class="col-lg-12 text-center loadingBox">
|
||||
<img src="~/img/loading.gif" style="width:100px;height:20px">
|
||||
<p>账号检测中请耐心等待</p>
|
||||
</div>
|
||||
<div class="col-lg-12 text-center errorTip">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function showPayWait() {
|
||||
$(".popmask").show()
|
||||
$(".paywait").show();
|
||||
$(".loadingBox").show();
|
||||
$(".errorTip").text("");
|
||||
}
|
||||
function hidePayWait() {
|
||||
$(".popmask").hide()
|
||||
$(".paywait").hide();
|
||||
}
|
||||
function tipPayWait(info) {
|
||||
showPayWait();
|
||||
$(".loadingBox").hide();
|
||||
$(".errorTip").text(info)
|
||||
}
|
||||
$(".plClose").on("click", function () { hidePayWait() })
|
||||
</script>
|
||||
<!-- 支付等待弹窗结束 -->
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@using Hncore.Pass.BaseInfo.Service
|
||||
@using Hncore.Infrastructure.Common
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@inject IConfiguration m_Configuration
|
||||
@inject UserService m_UserService
|
||||
@{
|
||||
var act = this.Context.Request.Get("act");
|
||||
var WxAppId = m_Configuration["WxApps:AppID"];
|
||||
var BaseUrl = m_Configuration["Service_BaseUrl"];
|
||||
var requestUrl =this.Context.Request.GetUrl().UrlEncode();
|
||||
UserLoginModel user = null;
|
||||
Hncore.Pass.BaseInfo.Models.User userEntity = new Hncore.Pass.BaseInfo.Models.User();
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
userEntity = await m_UserService.GetById(user.Id);
|
||||
}
|
||||
}
|
||||
|
||||
@if (user == null)
|
||||
{
|
||||
<script>
|
||||
|
||||
function isWeiXin() {
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger')!=-1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isWeiXin() || "login" =="@act") {
|
||||
window.location.href = "/User/WebLogin?redirect=@requestUrl";
|
||||
} else {
|
||||
window.location.href = "@(BaseUrl)User/MP_GetUserInfo?appid=@WxAppId&callbakUrl=@requestUrl";
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
25
Host/Views.Mobile/Shared/Error.cshtml
Normal file
25
Host/Views.Mobile/Shared/Error.cshtml
Normal file
@@ -0,0 +1,25 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Error";
|
||||
}
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
@if (Model.ShowRequestId)
|
||||
{
|
||||
<p>
|
||||
<strong>Request ID:</strong> <code>@Model.RequestId</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
25
Host/Views.Mobile/Shared/_CookieConsentPartial.cshtml
Normal file
25
Host/Views.Mobile/Shared/_CookieConsentPartial.cshtml
Normal file
@@ -0,0 +1,25 @@
|
||||
@using Microsoft.AspNetCore.Http.Features
|
||||
|
||||
@{
|
||||
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
|
||||
var showBanner = !consentFeature?.CanTrack ?? false;
|
||||
var cookieString = consentFeature?.CreateConsentCookie();
|
||||
}
|
||||
|
||||
@if (showBanner)
|
||||
{
|
||||
<div id="cookieConsent" class="alert alert-info alert-dismissible fade show" role="alert">
|
||||
Use this space to summarize your privacy and cookie use policy. <a asp-area="" asp-controller="Home" asp-action="Privacy">Learn More</a>.
|
||||
<button type="button" class="accept-policy close" data-dismiss="alert" aria-label="Close" data-cookie-string="@cookieString">
|
||||
<span aria-hidden="true">Accept</span>
|
||||
</button>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var button = document.querySelector("#cookieConsent button[data-cookie-string]");
|
||||
button.addEventListener("click", function (event) {
|
||||
document.cookie = button.dataset.cookieString;
|
||||
}, false);
|
||||
})();
|
||||
</script>
|
||||
}
|
||||
226
Host/Views.Mobile/Shared/_Layout.cshtml
Normal file
226
Host/Views.Mobile/Shared/_Layout.cshtml
Normal file
@@ -0,0 +1,226 @@
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@using Hncore.Pass.Vpn.Service
|
||||
@inject ProductService m_ProductService
|
||||
@{
|
||||
UserLoginModel user = null;
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
}
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable" />
|
||||
<meta content="yes" name="apple-touch-fullscreen" />
|
||||
<meta content="telephone=no,email=no" name="format-detection" />
|
||||
<meta content="maximum-dpr=2" name="flexible" />
|
||||
<title>聚IP JUIP.COM-产品购买</title>
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/base.css" />
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/swiper.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/bootstrap.css" />
|
||||
<link rel="Shortcut Icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||
<script src="~/m/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
|
||||
<script src="~/js/vue.js"></script>
|
||||
<script src="~/m/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="~/m/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$.ajaxSetup({
|
||||
complete: function (XMLHttpRequest, textStatus) {
|
||||
console.log(textStatus);
|
||||
//var sessionstatus = XMLHttpRequest.getResponseHeader("sessionstatus");
|
||||
if (textStatus == "parsererror") {
|
||||
//如果超时就处理 ,指定要跳转的页面(比如登陆页)
|
||||
window.location.href="/user/weblogin"
|
||||
}
|
||||
}
|
||||
});
|
||||
$(function () {
|
||||
$(".btnNav").click(function () {
|
||||
$(".mask").fadeIn();
|
||||
console.log(1)
|
||||
});
|
||||
$(".btnClose").click(function () {
|
||||
$(".mask").fadeOut();
|
||||
console.log(2)
|
||||
});
|
||||
|
||||
$(".on_q").click(function () {
|
||||
$(".side_q").toggle();
|
||||
});
|
||||
|
||||
//$(".item_on_q").mouseover(function () {
|
||||
// $(".side_q").stop().show();
|
||||
//});
|
||||
//$(".item_on_q").mouseleave(function () {
|
||||
// $(".side_q").stop().hide();
|
||||
//});
|
||||
|
||||
//$(".on_wx").click(function () {
|
||||
// $(".side_kefu").toggle();
|
||||
//});
|
||||
|
||||
$(".item_on_wx").mouseover(function () {
|
||||
$(".side_kefu").stop().fadeIn();
|
||||
});
|
||||
$(".item_on_wx").mouseleave(function () {
|
||||
$(".side_kefu").stop().fadeOut();
|
||||
});
|
||||
|
||||
$(".on_gzh").mouseover(function () {
|
||||
$(".side_gzh").stop().fadeIn();
|
||||
});
|
||||
$(".on_gzh").mouseleave(function () {
|
||||
$(".side_gzh").stop().fadeOut();
|
||||
});
|
||||
|
||||
$(".on_tel").mouseover(function () {
|
||||
$(".side_tel").stop().fadeIn();
|
||||
});
|
||||
$(".on_tel").mouseleave(function () {
|
||||
$(".side_tel").stop().fadeOut();
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
function isWeiXin() {
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf('micromessenger') != -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="popmask"></div>
|
||||
<div class="sideBar">
|
||||
|
||||
<div class="item item_on_q">
|
||||
|
||||
<img src="~/img/qq.png" class="on_q"><div class="kefu_tit">QQ</div>
|
||||
|
||||
<div class="side_q">
|
||||
<h4 style="border-bottom:1px solid #ccc;text-align:center;width:100%;padding:15px 0;">实时响应 在线时间8:00-24:00</h4>
|
||||
<div class="item">
|
||||
<a href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true" target="_blank">
|
||||
<div class="ileft">
|
||||
<img src="~/img/q.png">
|
||||
</div>
|
||||
<div class="iright">
|
||||
<span>人工客服:售前</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="https://admin.qidian.qq.com/template/blue/mp/menu/qr-code-jump.html?linkType=0&env=ol&kfuin=2852138148&fid=299&key=f377ec024ca45115a03a7632c7bda230&cate=1&source=&isLBS=&isCustomEntry=&type=16&ftype=1&_type=wpa&qidian=true" target="_blank">
|
||||
<div class="ileft">
|
||||
<img src="~/img/q.png">
|
||||
</div>
|
||||
<div class="iright">
|
||||
<span>人工客服:售后</span>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item_on_wx">
|
||||
<img src="~/img/weixin.png" class="on_wx"><div class="kefu_tit">微信</div>
|
||||
<div class="side_kefu">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist" style="padding-top: 10px;padding-left:10px">
|
||||
<li role="presentation" class="active"><a href="#xx" aria-controls="xx" role="tab" data-toggle="tab" style="border-color:#ccc">售前</a></li>
|
||||
<li role="presentation"><a href="#qq" aria-controls="qq" role="tab" data-toggle="tab" style="border-color:#ccc">售后</a></li>
|
||||
@*<li role="presentation"><a href="#ss" aria-controls="ss" role="tab" data-toggle="tab" style="border-color:#ccc">珊珊</a></li>
|
||||
<li role="presentation"><a href="#tt" aria-controls="tt" role="tab" data-toggle="tab" style="border-color:#ccc">兔兔</a></li>*@
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content" style="margin-top: 60px;">
|
||||
<div role="tabpanel" class="tab-pane active" id="xx">
|
||||
<img src="~/img/kf_sq.jpg">
|
||||
<p style="color:#f90">实时响应 在线时间 8:00-24:00</p>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="qq">
|
||||
<img src="~/img/kf_sh.jpg">
|
||||
<p style="color:#f90">实时响应 在线时间 8:00-24:00</p>
|
||||
</div>
|
||||
@*<div role="tabpanel" class="tab-pane" id="ss">
|
||||
<img src="~/img/w3.png">
|
||||
<p style="color:#f90">实时响应 在线时间 8:00-24:00</p>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="tt">
|
||||
<img src="~/img/w4.png">
|
||||
<p style="color:#f90">实时响应 在线时间 8:00-24:00</p>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/img/gzh.png" class="on_gzh"><div class="kefu_tit">公众号</div>
|
||||
<div class="side_gzh">
|
||||
<p><img src="~/img/ewm.png"></p>
|
||||
<p style="color:#f90">实时响应 在线时间 8:00-24:00</p>
|
||||
<p style="color:#f90">关注公众号可获取免费的到期提醒服务</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/img/tel.png" class="on_tel"><div class="kefu_tit">电话</div>
|
||||
<div class="side_tel">
|
||||
<p><b>400 800 9925</b></p>
|
||||
<p>实时接通</p>
|
||||
<p>电话值班时间 8:00-24:00</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="#top"><img src="~/img/top.png"></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 弹窗导航 -->
|
||||
<div class="mask">
|
||||
<ul class="layNav">
|
||||
<li><a href="/">首页</a></li>
|
||||
<li><a asp-action="index" asp-controller="product">产品购买</a> </li>
|
||||
<li><a asp-action="index" asp-controller="LineList" asp-route-Catalog="1">线路表</a> </li>
|
||||
<li><a asp-action="soft" asp-controller="product">软件下载</a> </li>
|
||||
<li><a asp-action="index" asp-controller="article">资讯&帮助</a></li>
|
||||
<li><a asp-action="taobao" asp-controller="article">淘宝充值活动</a></li>
|
||||
@if (user != null)
|
||||
{
|
||||
<li><a asp-action="index" asp-controller="user">个人中心</a></li>
|
||||
<li><a asp-action="LoginOut" asp-controller="user">退出</a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li><a asp-action="WebLogin" asp-controller="user">登录</a></li>
|
||||
}
|
||||
|
||||
<li><img src="~/m/img/close.png" class="btnClose"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mynav">
|
||||
<div class="item">
|
||||
<img src="~/m/img/back.png" onclick="history.go(-1)">
|
||||
</div>
|
||||
<div class="item mlogo">
|
||||
<img src="~/m/img/logo.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/m/img/nav.png" class="btnNav">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@RenderBody()
|
||||
@RenderSection("Scripts", required: false)
|
||||
<!-- WPA start -->
|
||||
<script id="qd28521381485d6faa97edf5ad07d7e159f6cb902af0" src="https://wp.qiye.qq.com/qidian/2852138148/5d6faa97edf5ad07d7e159f6cb902af0" charset="utf-8" async defer></script>
|
||||
<!-- WPA end -->
|
||||
</body>
|
||||
</html>
|
||||
84
Host/Views.Mobile/Shared/_UserLayout.cshtml
Normal file
84
Host/Views.Mobile/Shared/_UserLayout.cshtml
Normal file
@@ -0,0 +1,84 @@
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Infrastructure.Serializer;
|
||||
@using Hncore.Pass.Vpn.Service
|
||||
@inject ProductService m_ProductService
|
||||
@{
|
||||
UserLoginModel user = null;
|
||||
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
|
||||
{
|
||||
user = userCookie.FromJsonTo<UserLoginModel>();
|
||||
}
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable" />
|
||||
<meta content="yes" name="apple-touch-fullscreen" />
|
||||
<meta content="telephone=no,email=no" name="format-detection" />
|
||||
<meta content="maximum-dpr=2" name="flexible" />
|
||||
|
||||
<title>聚IP JUIP.COM-产品购买</title>
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/base.css" />
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/swiper.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="~/m/css/bootstrap.css" />
|
||||
<link href="~/m/css/LCalendar.css" rel="stylesheet" />
|
||||
<link rel="Shortcut Icon" href="/img/favicon.ico" type="image/x-icon" />
|
||||
<script src="~/m/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
|
||||
<script src="~/js/vue.js"></script>
|
||||
<script src="~/m/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="~/m/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".btnNav").click(function () {
|
||||
$(".mask").fadeIn();
|
||||
console.log(1)
|
||||
});
|
||||
$(".btnClose").click(function () {
|
||||
$(".mask").fadeOut();
|
||||
console.log(2)
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<!-- 弹窗导航 -->
|
||||
<div class="mask">
|
||||
<ul class="layNav">
|
||||
<li><a href="/">首页</a></li>
|
||||
<li><a asp-action="index" asp-controller="product">产品购买</a> </li>
|
||||
<li><a asp-action="index" asp-controller="LineList">线路表</a> </li>
|
||||
<li><a asp-action="soft" asp-controller="product">软件下载</a> </li>
|
||||
<li><a asp-action="index" asp-controller="article">资讯&帮助</a></li>
|
||||
<li>
|
||||
@if (user != null)
|
||||
{
|
||||
<a asp-action="index" asp-controller="user">个人中心</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-action="WebLogin" asp-controller="user">登录</a>
|
||||
}
|
||||
</li>
|
||||
<li><img src="~/m/img/close.png" class="btnClose"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mynav">
|
||||
<div class="item">
|
||||
<img src="~/m/img/back.png" onclick="history.go(-1)">
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/m/img/logo.png">
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="~/m/img/nav.png" class="btnNav">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@RenderBody()
|
||||
@RenderSection("Scripts", required: false)
|
||||
</body>
|
||||
</html>
|
||||
18
Host/Views.Mobile/Shared/_ValidationScriptsPartial.cshtml
Normal file
18
Host/Views.Mobile/Shared/_ValidationScriptsPartial.cshtml
Normal file
@@ -0,0 +1,18 @@
|
||||
<environment include="Development">
|
||||
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
|
||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha256-F6h55Qw6sweK+t7SiOJX+2bpSAa3b/fnlrVCJvmEj1A=">
|
||||
</script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.11/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
|
||||
crossorigin="anonymous"
|
||||
integrity="sha256-9GycpJnliUjJDVDqP0UEu/bsm9U+3dnQUH8+3W10vkY=">
|
||||
</script>
|
||||
</environment>
|
||||
80
Host/Views.Mobile/User/FindPwd.cshtml
Normal file
80
Host/Views.Mobile/User/FindPwd.cshtml
Normal file
@@ -0,0 +1,80 @@
|
||||
@using Home.Models
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
|
||||
|
||||
<div class="loginArea">
|
||||
<div class="loginTop">
|
||||
<p> <img src="~/m/img/logoBlue.png"></p>
|
||||
<p class="logoTit">找回密码</p>
|
||||
</div>
|
||||
|
||||
<div class="loginCenter">
|
||||
<p><img src="~/m/img/phone.png"><input type="text" name="" id="username" value="" placeholder="手机号" /></p>
|
||||
<p><img src="~/m/img/password.png"><input type="text" name="" id="password" value="" placeholder="密码" /></p>
|
||||
<p class="yzm"><img src="~/m/img/yanzhengma.png"><input type="text" name="" id="yanzhengma" value="" placeholder="验证码" /><button type="button" class="btnBlue" onclick="getCode(this)">获取验证码</button></p>
|
||||
</div>
|
||||
<p><button type="button" class="btnLogin" onclick="reg()">找回密码</button></p>
|
||||
<p class="tixing">*手机号不是PPTP账号,请登录后开通PPTP账号*</p>
|
||||
<p class="bianjie">已有账号?<a asp-action="WebLogin" asp-controller="User">立即登录</a></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var time = 60;
|
||||
function getCode(_self) {
|
||||
var name = $("#username").val()
|
||||
if(name == '') { alert('手机号不能为空'); return; }
|
||||
if (!timing(_self)) return;
|
||||
var url = '/User/SendPhoneCode?key=FindUser_Code&phone=' + name;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
alert(res.Message)
|
||||
//if (res.Code == 10000) {
|
||||
// alert(res.Message)
|
||||
//}
|
||||
}
|
||||
});
|
||||
}
|
||||
function timing(_self) {
|
||||
if (time != 60) return false
|
||||
var timerHandler = setInterval(function () {
|
||||
time--;
|
||||
if (time <= 1) {
|
||||
clearInterval(timerHandler);
|
||||
time = 60;
|
||||
$(_self).text("获取验证码")
|
||||
} else {
|
||||
$(_self).text(time + "s");
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
return true;
|
||||
}
|
||||
function reg() {
|
||||
var name = $("#username").val()
|
||||
var pwd = $("#password").val()
|
||||
var code = $("#yanzhengma").val()
|
||||
if (name == '') { alert('手机号不能为空'); return; }
|
||||
if (code == '') { alert('验证码不能为空'); return; }
|
||||
var data = { Phone: name, Pwd: pwd, Code: code };
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/User/FindPwd',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
alert("密码重置成功,请重新登录")
|
||||
window.location.href="/User/WebLogin"
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
19
Host/Views.Mobile/User/Index.cshtml
Normal file
19
Host/Views.Mobile/User/Index.cshtml
Normal file
@@ -0,0 +1,19 @@
|
||||
@using Home.Models
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<div class="ptop">
|
||||
<a class="pname">@Model.UserModel.LoginCode</a>
|
||||
</div>
|
||||
|
||||
<ul class="plist">
|
||||
<li><img src="~/m/img/p1.png"><a asp-action="indexInfo" asp-controller="user">个人信息<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p1.png"><a asp-action="myorders" asp-controller="user">我的订单<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p2.png"><a asp-action="myrefundorders" asp-controller="user">退货订单<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p3.png"><a asp-action="myaccounts" asp-controller="user">PPTP账号管理<img src="~/m/img/arrow.png"></a></li>
|
||||
<li><img src="~/m/img/p4.png"><a asp-action="mycoupons" asp-controller="user">我的优惠券<img src="~/m/img/arrow.png"></a></li>
|
||||
</ul>
|
||||
|
||||
361
Host/Views.Mobile/User/IndexInfo.cshtml
Normal file
361
Host/Views.Mobile/User/IndexInfo.cshtml
Normal file
@@ -0,0 +1,361 @@
|
||||
@using Home.Models
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.msg {
|
||||
margin-top: 1.466666rem;
|
||||
}
|
||||
|
||||
.lineBar {
|
||||
background: #3c5eb5;
|
||||
width: 5px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.accout_tit {
|
||||
height: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.model {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 0.933333rem;
|
||||
line-height: 0.933333rem;
|
||||
background: #fff;
|
||||
flex-wrap: wrap;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.model .item {
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
height: 0.933333rem;
|
||||
line-height: 0.933333rem;
|
||||
}
|
||||
|
||||
.model .item:nth-child(odd) {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.model .item:nth-child(even) {
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.inputBox {
|
||||
width: 330px;
|
||||
}
|
||||
</style>
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<div class="container msg">
|
||||
<!-- 账户信息 -->
|
||||
<div class="accout_tit"><span class="lineBar"></span>账户信息 <button class="btnXq" onclick="$('#infoBox').show()">完善信息</button> <button class="btnXq" onclick="$('#pwdBox').show()">修改密码</button></div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
用户名:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.UserModel.Phone??Model.UserModel.LoginCode)
|
||||
</div>
|
||||
<div class="item">
|
||||
密码:
|
||||
</div>
|
||||
<div class="item">
|
||||
<span>********</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
QQ:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.UserModel.QQ??"--")
|
||||
</div>
|
||||
<div class="item">
|
||||
微信号:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.UserModel.Wx??"--")
|
||||
</div>
|
||||
<div class="item">
|
||||
淘宝会员名:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.UserModel.TaoBao??"--")
|
||||
</div>
|
||||
<div class="item">
|
||||
邮箱:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.UserModel.Email??"--")
|
||||
</div>
|
||||
</div>
|
||||
<!-- 余额 -->
|
||||
<div class="accout_tit"><span class="lineBar"></span>余额 <button class="btnXq" onclick="$('#chargeBox').show()">充值</button></div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
余额:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.UserModel.RestAmount
|
||||
</div>
|
||||
</div>
|
||||
<!-- pptv账号 -->
|
||||
<div class="accout_tit"><span class="lineBar"></span>PPTV账号</div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
使用中:
|
||||
</div>
|
||||
<div class="item">
|
||||
@(Model.AccountModel.TotalCount-Model.AccountModel.ExpriedCount)
|
||||
</div>
|
||||
<div class="item">
|
||||
总个数:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.AccountModel.TotalCount
|
||||
</div>
|
||||
<div class="item">
|
||||
已过期:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.AccountModel.ExpriedCount
|
||||
</div>
|
||||
</div>
|
||||
<!-- 消费信息 -->
|
||||
<div class="accout_tit"><span class="lineBar"></span>消费信息</div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
今日消费:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.TodayExpend
|
||||
</div>
|
||||
<div class="item">
|
||||
今日退款:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.TodayRefund
|
||||
</div>
|
||||
<div class="item">
|
||||
今日充值:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.TodayCharege
|
||||
</div>
|
||||
<div class="item">
|
||||
当月消费:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.MonthExpend
|
||||
</div>
|
||||
<div class="item">
|
||||
当月退款:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.MonthRefund
|
||||
</div>
|
||||
<div class="item">
|
||||
当月充值:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.MonthCharege
|
||||
</div>
|
||||
<div class="item">
|
||||
本年消费:
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.Statistic.YearExpend
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 修改个人详情 -->
|
||||
<div class="layerTable" id="infoBox">
|
||||
<form asp-action="UpdateInfo" asp-controller="User" method="post">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>QQ:</td>
|
||||
<td><input type="text" name="QQ" value="@(Model.UserModel.QQ)" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>微信号:</td>
|
||||
<td><input type="text" name="Wx" value="@(Model.UserModel.Wx)" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>淘宝会员名:</td>
|
||||
<td><input type="text" name="TaoBao" value="@(Model.UserModel.TaoBao)" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>邮箱:</td>
|
||||
<td><input type="text" name="Email" value="@(Model.UserModel.Email)" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="" style="text-align:center;">
|
||||
<button type="button" class="btnXq" onclick="$('#infoBox').hide()">返回</button>
|
||||
<button type="submit" class="btnXq">确定</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 修改密码 -->
|
||||
<div class="layerTable" id="pwdBox">
|
||||
<form id="pwdForm">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>原密码:</td>
|
||||
<td><input type="text" class="inputBox" name="OldPwd" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>新密码:</td>
|
||||
<td><input type="text" class="inputBox" name="NewPwd" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>确认新密码:</td>
|
||||
<td><input type="text" class="inputBox" name="ConfirmPwd" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="" style="text-align:center;">
|
||||
<button type="button" class="btnXq" onclick="$('#pwdBox').hide()">返回</button>
|
||||
<button type="button" class="btnXq" onclick="updatePwd()">确定</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 充值 -->
|
||||
<div class="layerTable" id="chargeBox">
|
||||
<form id="pwdForm">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>充值金额:</td>
|
||||
<td><input type="number" class="inputBox" id="orderAmount" value="100" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式:</td>
|
||||
<td>
|
||||
<input type="radio" name="PayChannel" value="40" checked> <img src="~/img/zfb.png">支付宝支付<br />
|
||||
<input type="radio" name="PayChannel" value="10"> <img src="~/img/wx.png">微信支付
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="" style="text-align:center;">
|
||||
<button type="button" class="btnXq" onclick="$('#chargeBox').hide()">返回</button>
|
||||
<button type="button" class="btnXq" onclick="charge()">确定</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 支付弹窗 -->
|
||||
<div id="aliPayBox" style="display:none"></div>
|
||||
|
||||
<script>
|
||||
/** 表单序列化成json字符串的方法 */
|
||||
function form2JsonString(formId) {
|
||||
var paramArray = $('#' + formId).serializeArray();
|
||||
var jsonObj = {};
|
||||
$(paramArray).each(function () {
|
||||
jsonObj[this.name] = this.value;
|
||||
});
|
||||
console.log(jsonObj);
|
||||
return JSON.stringify(jsonObj);
|
||||
}
|
||||
function updatePwd() {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/UpdatePwd',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: form2JsonString("pwdForm"),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
$("#pwdBox").hide();
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function h5WxPay(payData) {
|
||||
window.location.href = payData;
|
||||
}
|
||||
function jsWxPay(payData) {
|
||||
WeixinJSBridge.invoke(
|
||||
'getBrandWCPayRequest',
|
||||
JSON.parse(payData),
|
||||
function (res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
window.location.href = "/User/indexInfo";
|
||||
} else if (res.err_msg == "get_brand_wcpay_request:cancel") {
|
||||
|
||||
} else {
|
||||
alert("支付失败" + res.err_msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
function aliPay(payData) {
|
||||
$("#aliPayBox").html(payData);
|
||||
}
|
||||
function payCallback(data) {
|
||||
var orderInfo = data.OrderInfo;
|
||||
if (!data.PayData) { alert("下单失败"); return; }
|
||||
var payChannel = orderInfo.PayChannel;
|
||||
if (payChannel == 10) {
|
||||
h5WxPay(data.PayData)
|
||||
} else if (payChannel == 20) {
|
||||
jsWxPay(data.PayData);
|
||||
} else if (payChannel == 40) {
|
||||
aliPay(data.PayData);
|
||||
}
|
||||
}
|
||||
function charge() {
|
||||
var chargeData = {
|
||||
ChargeAmount: $('#orderAmount').val(),
|
||||
PayChannel: $('input[name="PayChannel"]:checked').val()
|
||||
}
|
||||
if (isWeiXin()) {
|
||||
chargeData.PayChannel = 20;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/CreateOrder',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(chargeData),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
payCallback(res.Data)
|
||||
} else {
|
||||
alert(res.Message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
73
Host/Views.Mobile/User/Login.cshtml
Normal file
73
Host/Views.Mobile/User/Login.cshtml
Normal file
@@ -0,0 +1,73 @@
|
||||
@using Home.Models
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@inject IConfiguration m_Configuration
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
var BaseUrl = m_Configuration["Service_BaseUrl"];
|
||||
var WxAppId = m_Configuration["WxApps:AppID"];
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="loginArea">
|
||||
<div class="loginTop">
|
||||
<p> <img src="~/m/img/logoBlue.png"></p>
|
||||
<p class="logoTit">用户登录</p>
|
||||
<p><span class="xinyonghu">新用户免费赠送3次测试机会</span></p>
|
||||
</div>
|
||||
|
||||
<div class="loginCenter">
|
||||
<p><img src="~/m/img/phone.png"><input type="text" name="" id="rLogin_Name" value="" placeholder="会员手机号" /></p>
|
||||
<p><img src="~/m/img/password.png"><input type="password" name="" id="rLogin_Pwd" value="" placeholder="密码" /></p>
|
||||
|
||||
</div>
|
||||
<p>@*<span><input type="checkbox" name="" id="" value="" />自动登录</span>*@<span class="pull-right"><a asp-action="FindPwd" asp-controller="User">忘记密码?</a></span></p>
|
||||
<p class="denglu"><button type="button" class="btnLogin" onclick="login()">登录</button></p>
|
||||
<p class="tixing">*手机号不是PPTP账号,请登录后开通PPTP账号*</p>
|
||||
<p class="bianjie">还没有账号?<a asp-action="Regist" asp-controller="User">立即注册</a></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var redirect = "@ViewBag.redirect" || "/user/index";
|
||||
function isWeiXin() {
|
||||
var ua = window.navigator.userAgent.toLowerCase();
|
||||
if (ua.match(/micromessenger/i) == 'micromessenger') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function login() {
|
||||
var name = $("#rLogin_Name").val()
|
||||
var pwd = $("#rLogin_Pwd").val()
|
||||
var data = { Logincode: name, Password: pwd, Code: 1 };
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/login',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
loginSuccess(res.Data.User)
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function loginSuccess(user) {
|
||||
if (!isWeiXin()) {
|
||||
window.location.href = redirect;
|
||||
return;
|
||||
}
|
||||
window.location.href = "@(BaseUrl)User/MP_GetUserInfo?appid=@WxAppId&callbakUrl=" + redirect + "&state=" + user.Id;
|
||||
//if (!user.OpenId) {
|
||||
|
||||
//} else {
|
||||
// window.location.href = "/User/Index";
|
||||
//}
|
||||
}
|
||||
</script>
|
||||
518
Host/Views.Mobile/User/MyAccounts.cshtml
Normal file
518
Host/Views.Mobile/User/MyAccounts.cshtml
Normal file
@@ -0,0 +1,518 @@
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using ViewComponents
|
||||
@model List<ProductAccountEntity>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
}
|
||||
<div id="app">
|
||||
@*<div class="qq">
|
||||
<img src="~/m/img/smile.png"> 为给您带来更好的服务体验,请完善QQ号和微信号
|
||||
</div>*@
|
||||
<div class="chaxun2">
|
||||
<input type="text" v-model="searchModel.Keyword" placeholder="账号" /><button type="button" class="btnOrange" v-on:click="search">查询</button>
|
||||
</div>
|
||||
<div class="row riqi">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
日期查询:
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="start_date" id="start_date" placeholder="选择开通日期" readonly="readonly" v-model="searchModel.BTime" />
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="end_date" id="end_date" placeholder="选择到期日期" readonly="readonly" v-model="searchModel.ETime" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row shaixuan">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.ProductId">
|
||||
<option value="0">全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.PackageId">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<button type="button" class="btnRenzheng"><img src="~/m/img/renzheng.png">老账号认证</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="orderTable">
|
||||
<tr>
|
||||
<th><input type="checkbox" name="" id="checkAll" value="" style="width: 0.4rem;height: 0.4rem;" /></th>
|
||||
<th>套餐</th>
|
||||
<th>账号</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-pid="@(item.ProductId)" a-connectCount="@item.ConnectCount" a-aType="@item.AccountType" style="width: 0.4rem;height: 0.4rem;" /></td>
|
||||
<td>@item.ProductName/@item.PackageName</td>
|
||||
<td>@item.Account</td>
|
||||
<td>
|
||||
<button type="button" class="btnXq toDetail"
|
||||
a-UserCode="@item.UserCode"
|
||||
a-ProductName="@item.ProductName"
|
||||
a-PackageName="@item.PackageName"
|
||||
a-Account="@item.Account"
|
||||
a-Pwd="@item.Pwd"
|
||||
a-ConnectCount="@item.ConnectCount"
|
||||
a-StartTime="@item.StartTime"
|
||||
a-EndTime="@item.EndTime"
|
||||
a-RestTime="@item.RestTime">
|
||||
详情
|
||||
</button>
|
||||
<a class="btnXq" asp-action="OnLine" asp-controller="User" asp-route-productId="@item.ProductId" asp-route-account="@item.Account">
|
||||
<button type="button" class="btnXq" style="margin-top:3px">查看</button>
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
@*<div class="fenye" style="margin-top: -210px;margin-bottom: 200px;">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>*@
|
||||
|
||||
<div class="bottomBar">
|
||||
<button type="button" class="btnXu btn-rebuy"><img src="~/m/img/xufei.png">续费</button><button type="button" class="btnTui btn-refund"><img src="~/m/img/tui.png">退货</button>
|
||||
</div>
|
||||
|
||||
<!-- 认证弹窗 -->
|
||||
<div class="renzhengMask">
|
||||
<div class="renzhenKuang">
|
||||
<img src="~/m/img/close.png" class="renzhengClose">
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs renzhengTab" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">单个认证</a></li>
|
||||
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">批量认证</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="home">
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
选择产品
|
||||
</div>
|
||||
<div class="item chooseCp">
|
||||
<select v-model="oneAuthModel.ProductId">
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
输入账号
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="text" v-model="oneAuthModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
验证密码
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="text" v-model="oneAuthModel.Pwd" />
|
||||
</div>
|
||||
</div>
|
||||
<p class="btnRz" v-on:click="accountOneAuth">认证账号</p>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="profile">
|
||||
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
选择产品
|
||||
</div>
|
||||
<div class="item chooseCp">
|
||||
<select v-model="mutilAuthModel.ProductId">
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
账号前缀
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="text" v-model="mutilAuthModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
开始数
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="number" v-model="mutilAuthModel.StartNum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
认证个数
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="number" v-model="mutilAuthModel.Count" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="renzhengModel">
|
||||
<div class="item">
|
||||
验证密码
|
||||
</div>
|
||||
<div class="item renzhengInput">
|
||||
<input type="text" v-model="mutilAuthModel.Pwd" />
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="mutilAuthLoading" style="margin:8px;color:red;text-align:center">认证中,请耐心等待...</p>
|
||||
<p class="btnRz" v-on:click="accountMutilAuth">认证账号</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗详情 -->
|
||||
<div class="layerTable">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>用户:</td>
|
||||
<td>{{currentAccount.UserCode}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>产品:</td>
|
||||
<td>{{currentAccount.ProductName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>套餐:</td>
|
||||
<td>{{currentAccount.PackageName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号:</td>
|
||||
<td>{{currentAccount.Account}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>密码:</td>
|
||||
<td>{{currentAccount.Pwd}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>连接数:</td>
|
||||
<td>{{currentAccount.ConnectCount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>开通时间:</td>
|
||||
<td>{{currentAccount.StartTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>到期时间:</td>
|
||||
<td>{{currentAccount.EndTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>剩余时间:</td>
|
||||
<td>{{currentAccount.RestTime}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="back">
|
||||
<img src="~/m/img/arrowback.png"> 返回列表
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/m/js/LCalendar.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
mutilAuthLoading: false,
|
||||
productWithPackage: [],
|
||||
packages: [],
|
||||
searchModel: {
|
||||
ExpiredDay:-1,
|
||||
ProductId:@this.Context.Request.GetInt("ProductId"),
|
||||
PackageId:@this.Context.Request.GetInt("PackageId"),
|
||||
Keyword:'@this.Context.Request.Get("Keyword")',
|
||||
BTime: '@this.Context.Request.Get("BTime")',
|
||||
ETime: '@this.Context.Request.Get("ETime")',
|
||||
},
|
||||
oneAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd:""
|
||||
},
|
||||
mutilAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd: "",
|
||||
StartNum: 0,
|
||||
Count:0
|
||||
},
|
||||
currentAccount: {
|
||||
UserCode: "",
|
||||
ProductName: "",
|
||||
PackageName: "",
|
||||
Account: "",
|
||||
Pwd: "",
|
||||
ConnectCount: "",
|
||||
StartTime: "",
|
||||
EndTime: "",
|
||||
RestTime: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
'searchModel.ProductId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
for (var i = 0; i < this.productWithPackage.length; i++) {
|
||||
var item = this.productWithPackage[i];
|
||||
if (item.Product.Id == newValue) {
|
||||
this.packages = item.Packages
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.getProducts();
|
||||
},
|
||||
methods: {
|
||||
initPackages: function () {
|
||||
var productId = this.searchModel.ProductId;
|
||||
if (productId == 0) return;
|
||||
for (var i = 0; i < this.productWithPackage.length; i++) {
|
||||
var item = this.productWithPackage[i];
|
||||
if (item.Product.Id == productId) {
|
||||
this.packages = item.Packages
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
getProducts() {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/product/ProductWithPackage',
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
that.productWithPackage = res.Data;
|
||||
that.initPackages();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
search() {
|
||||
var ps = [];
|
||||
for (var item in this.searchModel) {
|
||||
var p = item + "=" + this.searchModel[item];
|
||||
ps.push(p);
|
||||
}
|
||||
window.location.href = "?" + ps.join("&");
|
||||
},
|
||||
accountOneAuth() {
|
||||
if (this.oneAuthModel.ProductId ==0) {
|
||||
alert('请选择产品')
|
||||
return;
|
||||
}
|
||||
if (this.oneAuthModel.Account == '' || this.oneAuthModel.Pwd == '') {
|
||||
alert('账号和密码不能为空')
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/OrginAccountAuth',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.oneAuthModel),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
alert('认证成功')
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
accountMutilAuth() {
|
||||
if (this.mutilAuthModel.ProductId == 0) {
|
||||
alert('请选择产品')
|
||||
return;
|
||||
}
|
||||
if (this.mutilAuthModel.Account == '' || this.mutilAuthModel.Pwd == '') {
|
||||
alert('账号和密码不能为空')
|
||||
return;
|
||||
}
|
||||
if (this.mutilAuthLoading) return;
|
||||
this.mutilAuthLoading = true;
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/OrginAccountAuth',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.mutilAuthModel),
|
||||
success: function (res) {
|
||||
that.mutilAuthLoading = false;
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
alert('认证成功')
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
setAccountInfo(info) {
|
||||
this.currentAccount = info;
|
||||
}
|
||||
}
|
||||
})
|
||||
function showDetail(_self) {
|
||||
var currentOrder = {
|
||||
UserCode: $(_self).attr('a-UserCode'),
|
||||
ProductName: $(_self).attr('a-ProductName'),
|
||||
PackageName: $(_self).attr('a-PackageName'),
|
||||
Account: $(_self).attr('a-Account'),
|
||||
Pwd: $(_self).attr('a-Pwd'),
|
||||
ConnectCount: $(_self).attr('a-ConnectCount'),
|
||||
StartTime: $(_self).attr('a-StartTime'),
|
||||
EndTime: $(_self).attr('a-EndTime'),
|
||||
RestTime: $(_self).attr('a-RestTime'),
|
||||
}
|
||||
app.setAccountInfo(currentOrder);
|
||||
$(_self).show();
|
||||
}
|
||||
$(function () {
|
||||
//退款
|
||||
function caclRefund(account,refundFun) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/order/CaclRefund?account=' + account,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
var msg ="剩余:"+res.Data.RefundRestTime+",还需退款:"+ res.Data.RefundAmount+",确定要退款吗?"
|
||||
if (!confirm(msg)) { return; }
|
||||
refundFun(account);
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function refund(account) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/order/Refund?account=' +account,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
alert('退款成功')
|
||||
window.location.reload()
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".btn-refund").on('click', function () {
|
||||
var accounts = [];
|
||||
$.each($('input:checkbox:checked'), function () {
|
||||
accounts.push($(this).val())
|
||||
});
|
||||
if (accounts.length >1) { alert('一次只能退款一个账号'); return; }
|
||||
if (accounts.length == 0) { alert('请选择账号'); return; }
|
||||
caclRefund(accounts[0],refund)
|
||||
})
|
||||
|
||||
function isSame(data, property) {
|
||||
if (data.length == 0) return true;
|
||||
var first = data[0];
|
||||
for (var i = 1; i < data.length; i++) {
|
||||
var item = data[i];
|
||||
if (first[property] != item[property])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//续费
|
||||
$(".btn-rebuy").on('click', function () {
|
||||
var accounts = [];
|
||||
var accountModels = [];
|
||||
var isTest = false
|
||||
$.each($('input:checkbox:checked'), function () {
|
||||
var account = $(this).val();
|
||||
if (account) {
|
||||
var accountItem = {
|
||||
account: account,
|
||||
pid: $(this).attr('a-pid'),
|
||||
connectCount: $(this).attr('a-connectCount'),
|
||||
isTest: $(this).attr('a-aType') == 200
|
||||
}
|
||||
accountModels.push(accountItem)
|
||||
accounts.push(account)
|
||||
if (accountItem.isTest) isTest = true;
|
||||
}
|
||||
|
||||
});
|
||||
if (accountModels.length == 0) { alert('请选择账号'); return; }
|
||||
if (!isSame(accountModels, 'pid')) { alert('必须选择相同的产品'); return; }
|
||||
if (!isSame(accountModels, 'connectCount')) { alert('必须选择相同的连接数'); return; }
|
||||
if (isTest) { alert('测试账号暂不支持续费,请新开正式账号'); return; }
|
||||
window.location.href = "/product/rebuyindex?productId=" + accountModels[0].pid + "&accounts=" + accounts.join(",");
|
||||
})
|
||||
|
||||
|
||||
$(".toDetail").click(function () {
|
||||
showDetail($(this))
|
||||
$(".layerTable").show();
|
||||
});
|
||||
$(".back").click(function () {
|
||||
$(".layerTable").hide();
|
||||
})
|
||||
$(".btnRenzheng").click(function () {
|
||||
$(".renzhengMask").show();
|
||||
});
|
||||
$(".renzhengClose").click(function () {
|
||||
$(".renzhengMask").hide();
|
||||
});
|
||||
$("#checkAll").on('click', function () {
|
||||
console.log($(this).prop("checked"), "check")
|
||||
$("td > input:checkbox").prop("checked", $(this).prop("checked"))
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#start_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#end_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
|
||||
</script>
|
||||
68
Host/Views.Mobile/User/MyCoupons.cshtml
Normal file
68
Host/Views.Mobile/User/MyCoupons.cshtml
Normal file
@@ -0,0 +1,68 @@
|
||||
@using Hncore.Pass.Sells.Model
|
||||
@model List<UserCouponModel>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
Func<UserCouponModel, string> format = (item) =>
|
||||
{
|
||||
if (item.IsExpired) return "已过期";
|
||||
if (item.IsUsed) return "已使用";
|
||||
return "可使用";
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
<div class="kong">
|
||||
|
||||
</div>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
|
||||
<div class="yhq">
|
||||
@if (item.Coupon.CouponType == ECouponType.Discount)
|
||||
{
|
||||
<div class="item">
|
||||
<span class="jiage">@(item.Coupon.CouponValue)折</span> <span class="zhuangtai">@format(item)</span>
|
||||
</div>
|
||||
}
|
||||
@if (item.Coupon.CouponType == ECouponType.Minus)
|
||||
{
|
||||
<div class="item">
|
||||
<span class="jiage">¥@(item.Coupon.CouponValue)</span><span class="zhuangtai">@format(item)</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="item">
|
||||
<p>@item.Coupon.Name</p>
|
||||
<p>使用规则:<span>@(item.Coupon.AllowMinAmount > 0 ? $"满{item.Coupon.AllowMinAmount}元可用" : "无限制")</span></p>
|
||||
<p>有效时间:<span>@(item.Orgin.StartTime.Value.ToString("yyyy.MM.dd"))至@(item.Orgin.EndTime.Value.ToString("yyyy.MM.dd"))</span></p>
|
||||
<p>获取途径:<span>@(item.Orgin.Remark)</span></p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@*<div class="yhq">
|
||||
<div class="item">
|
||||
<span class="jiage">¥6</span><span class="zhuangtai">可使用</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>优惠券名称</p>
|
||||
<p>使用规则:<span>无限制</span></p>
|
||||
<p>有效时间:<span>2020.1.1至2020.3.1</span></p>
|
||||
<p>获取途径:<span>淘宝下单赠送</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="yhq gray">
|
||||
<div class="item">
|
||||
<span class="jiage">¥6</span><span class="zhuangtai">已使用</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<p>优惠券名称</p>
|
||||
<p>使用规则:<span>无限制</span></p>
|
||||
<p>有效时间:<span>2020.1.1至2020.3.1</span></p>
|
||||
<p>获取途径:<span>淘宝下单赠送</span></p>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
281
Host/Views.Mobile/User/MyOrders.cshtml
Normal file
281
Host/Views.Mobile/User/MyOrders.cshtml
Normal file
@@ -0,0 +1,281 @@
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using ViewComponents
|
||||
@model PageData<ProductOrderEntity>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
Func<string, string> cut = word =>
|
||||
{
|
||||
if (word.Length > 15)
|
||||
return word.Substring(0, 15) + "...";
|
||||
return word;
|
||||
};
|
||||
}
|
||||
|
||||
<div id="app">
|
||||
<form asp-action="myorders" asp-controller="user" method="get">
|
||||
<div class="chaxun2">
|
||||
<input type="text" v-model="searchModel.KeyWord" /><button type="button" class="btnOrange" v-on:click="search">查询</button>
|
||||
</div>
|
||||
<div class="row riqi">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
日期查询:
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="start_date" id="start_date" v-model="searchModel.BTime" placeholder="选择开始日期" readonly="readonly" />
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="end_date" id="end_date" v-model="searchModel.ETime" placeholder="选择结束日期" readonly="readonly" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row shaixuan">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.OrderType">
|
||||
<option value="0">全部类型</option>
|
||||
<option value="1">新开</option>
|
||||
<option value="2">续费</option>
|
||||
<option value="3">批量新开</option>
|
||||
<option value="4">批量续费</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.ProductId">
|
||||
<option value="0">全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.PackageId">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="orderTable">
|
||||
<tr><th>类型</th><th>产品</th><th>套餐</th><th>详情</th></tr>
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.OrderType.GetEnumDisplayName()</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>
|
||||
<button type="button" class="btnXq toDetail" onclick="showDetail(this)"
|
||||
a-date="@item.CreateTime.ToString("yyyy.MM.dd")"
|
||||
a-orderno="@item.OrderNo"
|
||||
a-ordertype="@item.OrderType.GetEnumDisplayName()"
|
||||
a-product="@item.ProductName"
|
||||
a-package="@item.PackageName"
|
||||
a-price="@item.DayPrice"
|
||||
a-conncount="@(item.AccountCount*item.ConnectCount)"
|
||||
a-account="@item.Accounts"
|
||||
a-orderamount="@item.OrderAmount"
|
||||
a-couponamount="@item.CouponAmount"
|
||||
a-payamount="@item.PaymentAmount">
|
||||
详情
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>
|
||||
<!-- 弹窗详情 -->
|
||||
<div class="layerTable">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>日期:</td>
|
||||
<td>{{currentOrder.date}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单编号:</td>
|
||||
<td>{{currentOrder.orderno}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型:</td>
|
||||
<td>{{currentOrder.ordertype}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>产品:</td>
|
||||
<td>{{currentOrder.product}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>套餐:</td>
|
||||
<td>{{currentOrder.package}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>单价:</td>
|
||||
<td>{{currentOrder.price}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总连接数:</td>
|
||||
<td>{{currentOrder.conncount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号:</td>
|
||||
<td>{{currentOrder.account}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单金额:</td>
|
||||
<td>{{currentOrder.orderamount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>优惠金额:</td>
|
||||
<td>{{currentOrder.couponamount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实付金额:</td>
|
||||
<td>{{currentOrder.payamount}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="back">
|
||||
<img src="~/m/img/arrowback.png"> 返回列表
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/m/js/LCalendar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
productWithPackage: [],
|
||||
packages: [],
|
||||
searchModel: {
|
||||
OrderType:0,
|
||||
ProductId:@this.Context.Request.GetInt("ProductId"),
|
||||
PackageId:@this.Context.Request.GetInt("PackageId"),
|
||||
KeyWord:'',
|
||||
BTime: '@this.Context.Request.Get("BTime")',
|
||||
ETime: '@this.Context.Request.Get("ETime")',
|
||||
},
|
||||
oneAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd:""
|
||||
},
|
||||
mutilAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd: "",
|
||||
StartNum: 0,
|
||||
Count:0
|
||||
},
|
||||
currentOrder: {
|
||||
date:"",
|
||||
orderno:"",
|
||||
ordertype:"",
|
||||
product:"",
|
||||
package:"",
|
||||
price:"",
|
||||
conncount:"",
|
||||
account:"",
|
||||
orderamount:"",
|
||||
couponamount:"",
|
||||
payamount:""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
'searchModel.ProductId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
for (var i = 0; i < this.productWithPackage.length; i++) {
|
||||
var item = this.productWithPackage[i];
|
||||
if (item.Product.Id == newValue) {
|
||||
this.packages = item.Packages
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.getProducts();
|
||||
},
|
||||
methods: {
|
||||
getProducts() {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/product/ProductWithPackage',
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
that.productWithPackage = res.Data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
search() {
|
||||
var ps = [];
|
||||
this.searchModel.BTime = $("#BTime").val();
|
||||
this.searchModel.ETime = $("#ETime").val();
|
||||
for (var item in this.searchModel) {
|
||||
var p = item + "=" + this.searchModel[item];
|
||||
ps.push(p);
|
||||
}
|
||||
window.location.href = "?" + ps.join("&");
|
||||
},
|
||||
setOrderInfo(info) {
|
||||
this.currentOrder = info;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function showDetail(_self) {
|
||||
var currentOrder = {
|
||||
date: $(_self).attr('a-date'),
|
||||
orderno: $(_self).attr('a-orderno'),
|
||||
ordertype: $(_self).attr('a-ordertype'),
|
||||
product: $(_self).attr('a-product'),
|
||||
package: $(_self).attr('a-package'),
|
||||
price: $(_self).attr('a-price'),
|
||||
conncount: $(_self).attr('a-conncount'),
|
||||
account: $(_self).attr('a-account'),
|
||||
orderamount: $(_self).attr('a-orderamount'),
|
||||
couponamount: $(_self).attr('a-couponamount'),
|
||||
payamount: $(_self).attr('a-payamount'),
|
||||
}
|
||||
app.setOrderInfo(currentOrder);
|
||||
$(_self).show();
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#start_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#end_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
$(".toDetail").click(function () {
|
||||
showDetail($(this))
|
||||
$(".layerTable").show();
|
||||
});
|
||||
$(".back").click(function () {
|
||||
$(".layerTable").hide();
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
271
Host/Views.Mobile/User/MyRefundOrders.cshtml
Normal file
271
Host/Views.Mobile/User/MyRefundOrders.cshtml
Normal file
@@ -0,0 +1,271 @@
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using ViewComponents
|
||||
@model PageData<ProductOrderEntity>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
}
|
||||
|
||||
<div id="app">
|
||||
<form asp-action="myorders" asp-controller="user" method="get">
|
||||
<div class="chaxun2">
|
||||
<input type="text" v-model="searchModel.KeyWord" /><button type="button" class="btnOrange" v-on:click="search">查询</button>
|
||||
</div>
|
||||
<div class="row riqi">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
日期查询:
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="start_date" id="start_date" v-model="searchModel.BTime" placeholder="选择开始日期" readonly="readonly" />
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<input type="text" name="end_date" id="end_date" v-model="searchModel.ETime" placeholder="选择结束日期" readonly="readonly" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row shaixuan">
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.OrderType">
|
||||
<option value="0">全部类型</option>
|
||||
<option value="1">新开</option>
|
||||
<option value="2">续费</option>
|
||||
<option value="3">批量新开</option>
|
||||
<option value="4">批量续费</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.ProductId">
|
||||
<option value="0">全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-4 col-xs-4">
|
||||
<select v-model="searchModel.PackageId">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table border="0" cellspacing="0" cellpadding="0" class="orderTable">
|
||||
<tr><th>类型</th><th>产品</th><th>套餐</th><th>详情</th></tr>
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.OrderType.GetEnumDisplayName()</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>
|
||||
<button type="button" class="btnXq toDetail" onclick="showDetail(this)"
|
||||
a-date="@item.CreateTime.ToString("yyyy.MM.dd")"
|
||||
a-orderno="@item.OrderNo"
|
||||
a-ordertype="@item.OrderType.GetEnumDisplayName()"
|
||||
a-product="@item.ProductName"
|
||||
a-package="@item.PackageName"
|
||||
a-price="@item.DayPrice"
|
||||
a-dayprice="@item.DayPrice"
|
||||
a-conncount="@(item.AccountCount*item.ConnectCount)"
|
||||
a-account="@item.Accounts"
|
||||
a-orderamount="@item.OrderAmount"
|
||||
a-refundamount="@item.RefundAmount"
|
||||
a-payamount="@item.PaymentAmount"
|
||||
a-refundresttime="@item.RefundRestTime">
|
||||
详情
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>
|
||||
<!-- 弹窗详情 -->
|
||||
<div class="layerTable">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>日期:</td>
|
||||
<td>{{currentOrder.date}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单编号:</td>
|
||||
<td>{{currentOrder.orderno}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型:</td>
|
||||
<td>{{currentOrder.ordertype}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>产品:</td>
|
||||
<td>{{currentOrder.product}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>套餐:</td>
|
||||
<td>{{currentOrder.package}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>总连接数:</td>
|
||||
<td>{{currentOrder.conncount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>账号:</td>
|
||||
<td>{{currentOrder.account}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>退款单价:</td>
|
||||
<td>{{currentOrder.dayprice}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>退款时长:</td>
|
||||
<td>{{currentOrder.refundresttime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>实付金额:</td>
|
||||
<td>{{currentOrder.paymentamount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>退款金额:</td>
|
||||
<td>{{currentOrder.refundamount}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="back">
|
||||
<img src="~/m/img/arrowback.png"> 返回列表
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/m/js/LCalendar.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
productWithPackage: [],
|
||||
packages: [],
|
||||
searchModel: {
|
||||
OrderType:0,
|
||||
ProductId:@this.Context.Request.GetInt("ProductId"),
|
||||
PackageId:@this.Context.Request.GetInt("PackageId"),
|
||||
KeyWord:'',
|
||||
BTime: '@this.Context.Request.Get("BTime")',
|
||||
ETime: '@this.Context.Request.Get("ETime")',
|
||||
},
|
||||
oneAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd:""
|
||||
},
|
||||
mutilAuthModel: {
|
||||
ProductId: 0,
|
||||
Account: "",
|
||||
Pwd: "",
|
||||
StartNum: 0,
|
||||
Count:0
|
||||
},
|
||||
currentOrder: {
|
||||
date:"",
|
||||
orderno:"",
|
||||
ordertype:"",
|
||||
product:"",
|
||||
package:"",
|
||||
price:"",
|
||||
conncount:"",
|
||||
account:"",
|
||||
orderamount:"",
|
||||
couponamount:"",
|
||||
payamount:""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
watch: {
|
||||
'searchModel.ProductId': { //加引号监听对象里的属性
|
||||
handler: function (newValue, oldValue) {
|
||||
for (var i = 0; i < this.productWithPackage.length; i++) {
|
||||
var item = this.productWithPackage[i];
|
||||
if (item.Product.Id == newValue) {
|
||||
this.packages = item.Packages
|
||||
return;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
this.getProducts();
|
||||
},
|
||||
methods: {
|
||||
getProducts() {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/product/ProductWithPackage',
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
that.productWithPackage = res.Data;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
search() {
|
||||
var ps = [];
|
||||
this.searchModel.BTime = $("#BTime").val();
|
||||
this.searchModel.ETime = $("#ETime").val();
|
||||
for (var item in this.searchModel) {
|
||||
var p = item + "=" + this.searchModel[item];
|
||||
ps.push(p);
|
||||
}
|
||||
window.location.href = "?" + ps.join("&");
|
||||
},
|
||||
setOrderInfo(info) {
|
||||
this.currentOrder = info;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function showDetail(_self) {
|
||||
var currentOrder = {
|
||||
date: $(_self).attr('a-date'),
|
||||
orderno: $(_self).attr('a-orderno'),
|
||||
ordertype: $(_self).attr('a-ordertype'),
|
||||
product: $(_self).attr('a-product'),
|
||||
package: $(_self).attr('a-package'),
|
||||
dayprice: $(_self).attr('a-dayprice'),
|
||||
conncount: $(_self).attr('a-conncount'),
|
||||
account: $(_self).attr('a-account'),
|
||||
orderamount: $(_self).attr('a-orderamount'),
|
||||
couponamount: $(_self).attr('a-couponamount'),
|
||||
payamount: $(_self).attr('a-payamount'),
|
||||
refundresttime: $(_self).attr('a-refundresttime'),
|
||||
payamount: $(_self).attr('a-payamount'),
|
||||
}
|
||||
app.setOrderInfo(currentOrder);
|
||||
$(_self).show();
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#start_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
var calendar = new LCalendar();
|
||||
calendar.init({
|
||||
'trigger': '#end_date', //标签id
|
||||
'type': 'date', //date 调出日期选择 datetime 调出日期时间选择 time 调出时间选择 ym 调出年月选择,
|
||||
'minDate': (new Date().getFullYear() - 3) + '-' + 1 + '-' + 1, //最小日期
|
||||
'maxDate': (new Date().getFullYear() + 3) + '-' + 12 + '-' + 31 //最大日期
|
||||
});
|
||||
$(".toDetail").click(function () {
|
||||
showDetail($(this))
|
||||
$(".layerTable").show();
|
||||
});
|
||||
$(".back").click(function () {
|
||||
$(".layerTable").hide();
|
||||
})
|
||||
</script>
|
||||
|
||||
149
Host/Views.Mobile/User/Online.cshtml
Normal file
149
Host/Views.Mobile/User/Online.cshtml
Normal file
@@ -0,0 +1,149 @@
|
||||
@using Home.Models
|
||||
@using Hncore.Pass.BaseInfo.Response
|
||||
@using Hncore.Pass.Vpn.Model
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model List<OriginAccountOnlineModel>
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
var productId = this.Context.Request.GetInt("productId");
|
||||
}
|
||||
<style type="text/css">
|
||||
|
||||
body {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.msg {
|
||||
margin-top: 1.466666rem;
|
||||
}
|
||||
|
||||
.lineBar {
|
||||
background: #3c5eb5;
|
||||
width: 5px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.accout_tit {
|
||||
height: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.model {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 0.933333rem;
|
||||
line-height: 0.933333rem;
|
||||
background: #fff;
|
||||
flex-wrap: wrap;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.model .item {
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
height: 0.933333rem;
|
||||
line-height: 0.933333rem;
|
||||
}
|
||||
|
||||
.model .item:nth-child(odd) {
|
||||
width: 30%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.model .item:nth-child(even) {
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: red;
|
||||
}
|
||||
.inputBox {
|
||||
width: 330px;
|
||||
}
|
||||
</style>
|
||||
<vc:redirecct-login></vc:redirecct-login>
|
||||
<div class="container msg">
|
||||
@if (Model.Count == 0)
|
||||
{
|
||||
<div class="red" style="text-align:center">暂无数据</div>
|
||||
}
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="accout_tit"><span class="lineBar"></span>#@(Model.IndexOf(item)+1) <button class="btnXq" onclick="killout(@item.Id)">强制离线</button> </div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
账号:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.Account
|
||||
</div>
|
||||
<div class="item">
|
||||
登录时间:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.LoginTime
|
||||
</div>
|
||||
<div class="item">
|
||||
在线时间:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.OnlineTime
|
||||
</div>
|
||||
<div class="item">
|
||||
服务器Ip:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.ServerIP
|
||||
</div>
|
||||
<div class="item">
|
||||
登录ip:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.LoginIP
|
||||
</div>
|
||||
<div class="item">
|
||||
上/下行:
|
||||
</div>
|
||||
<div class="item">
|
||||
@item.UpStream / @item.UpStream
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<script>
|
||||
/** 表单序列化成json字符串的方法 */
|
||||
function form2JsonString(formId) {
|
||||
var paramArray = $('#' + formId).serializeArray();
|
||||
var jsonObj = {};
|
||||
$(paramArray).each(function () {
|
||||
jsonObj[this.name] = this.value;
|
||||
});
|
||||
console.log(jsonObj);
|
||||
return JSON.stringify(jsonObj);
|
||||
}
|
||||
function killout(productId,id) {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/productaccount/KillOut?productId=@productId&id=' + id,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
alert("操作成功");
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
97
Host/Views.Mobile/User/Regist.cshtml
Normal file
97
Host/Views.Mobile/User/Regist.cshtml
Normal file
@@ -0,0 +1,97 @@
|
||||
@using Home.Models
|
||||
@using Microsoft.Extensions.Configuration
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@inject IConfiguration m_Configuration
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
var BaseUrl = m_Configuration["Service_BaseUrl"];
|
||||
var WxAppId = m_Configuration["WxApps:AppID"];
|
||||
}
|
||||
|
||||
|
||||
<div class="loginArea">
|
||||
<div class="loginTop">
|
||||
<p> <img src="~/m/img/logoBlue.png"></p>
|
||||
<p class="logoTit">用户注册</p>
|
||||
<p><span class="xinyonghu">新用户免费赠送3次测试机会</span></p>
|
||||
</div>
|
||||
|
||||
<div class="loginCenter">
|
||||
<p><img src="~/m/img/phone.png"><input type="text" name="" id="username" value="" placeholder="手机号" /></p>
|
||||
<p><img src="~/m/img/password.png"><input type="password" name="" id="password" value="" placeholder="密码" /></p>
|
||||
<p class="yzm"><img src="~/m/img/yanzhengma.png"><input type="text" name="" id="yanzhengma" value="" placeholder="验证码" /><button type="button" class="btnBlue" onclick="getCode(this)">获取验证码</button></p>
|
||||
<p><img src="~/m/img/phone.png"><input type="text" name="" id="wxhao" value="" placeholder="微信号" /></p>
|
||||
<p><img src="~/m/img/phone.png"><input type="text" name="" id="wxhao" value="" placeholder="QQ号" /></p>
|
||||
</div>
|
||||
<p class="xieyi"><input type="checkbox" name="" id="" value="" />我同意<span>《聚IP JUIP.COM用户注册协议》</span></p>
|
||||
<p><button type="button" class="btnLogin" onclick="reg()">注册</button></p>
|
||||
<p class="tixing">*手机号不是PPTP账号,请登录后开通PPTP账号*</p>
|
||||
<p class="bianjie">已有账号?<a href="#">立即登录</a></p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var redirect = "@ViewBag.redirect" || "/user/index";
|
||||
var time = 60;
|
||||
function getCode(_self) {
|
||||
var name = $("#username").val()
|
||||
if(name == '') { alert('手机号不能为空'); return; }
|
||||
if (!timing(_self)) return;
|
||||
var url = '/user/SendPhoneCode?key=User_Code&phone=' + name;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
alert(res.Message)
|
||||
}
|
||||
});
|
||||
}
|
||||
function timing(_self) {
|
||||
if (time != 60) return false
|
||||
var timerHandler = setInterval(function () {
|
||||
time--;
|
||||
if (time <= 1) {
|
||||
clearInterval(timerHandler);
|
||||
time = 60;
|
||||
$(_self).text("获取验证码")
|
||||
} else {
|
||||
$(_self).text(time + "s");
|
||||
}
|
||||
|
||||
}, 1000)
|
||||
return true;
|
||||
}
|
||||
function reg() {
|
||||
var name = $("#username").val()
|
||||
var pwd = $("#password").val()
|
||||
var code = $("#yanzhengma").val()
|
||||
if (name == '') { alert('手机号不能为空'); return; }
|
||||
if (code == '') { alert('验证码不能为空'); return; }
|
||||
var wx = $("#wxhao").val()
|
||||
var qq = $("#qqhao").val()
|
||||
var data = { Phone: name, Pwd: pwd, Code: code, Wx: wx, QQ: qq };
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/Regist',
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
loginSuccess(res.Data.User)
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function loginSuccess(user) {
|
||||
if (!isWeiXin()) {
|
||||
window.location.href = redirect;
|
||||
return;
|
||||
}
|
||||
if (!user.OpenId) {
|
||||
window.location.href = "@(BaseUrl)User/MP_GetUserInfo?appid=@WxAppId&callbakUrl="+redirect+"&state="+user.Id;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
4
Host/Views.Mobile/_ViewImports.cshtml
Normal file
4
Host/Views.Mobile/_ViewImports.cshtml
Normal file
@@ -0,0 +1,4 @@
|
||||
@using Home
|
||||
@using Home.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Host
|
||||
3
Host/Views.Mobile/_ViewStart.cshtml
Normal file
3
Host/Views.Mobile/_ViewStart.cshtml
Normal file
@@ -0,0 +1,3 @@
|
||||
@{
|
||||
Layout = "_Layout";
|
||||
}
|
||||
Reference in New Issue
Block a user