初始提交
This commit is contained in:
429
Host/Views/User/Index.cshtml
Normal file
429
Host/Views/User/Index.cshtml
Normal file
@@ -0,0 +1,429 @@
|
||||
@using Home.Models
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@model UserHomeModel
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
var e = this.Context.Request.GetInt("e");
|
||||
}
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
|
||||
<script>
|
||||
var edit =@(e)> 0;
|
||||
$(function () {
|
||||
$(".edit").click(function () {
|
||||
$(".editList").show();
|
||||
});
|
||||
$(".quxiao").click(function () {
|
||||
$(".editList").hide();
|
||||
});
|
||||
$(".changePwd").click(function () {
|
||||
$(".pwdList").show();
|
||||
});
|
||||
$(".quxiaoPwd").click(function () {
|
||||
$(".pwdList").hide();
|
||||
})
|
||||
if(edit) $(".editList").show();
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.editList {
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
height: 420px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -200px;
|
||||
margin-top: -210px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.editList form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.edit a, .changePwd,.charge a{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.charge {
|
||||
text-align: right;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.pwdList {
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
height: 320px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -200px;
|
||||
margin-top: -160px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pwdList form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.chargeList {
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
height: 320px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -200px;
|
||||
margin-top: -160px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.chargeList form {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="editList">
|
||||
<form asp-action="UpdateInfo" asp-controller="User" method="post">
|
||||
<div class="form-group">
|
||||
<label>QQ号:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="QQ" value="@Model.UserModel.QQ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>微信号:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="Wx" value="@Model.UserModel.Wx">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>淘宝会员号:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="TaoBao" value="@Model.UserModel.TaoBao">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>邮箱:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="Email" value="@Model.UserModel.Email">
|
||||
</div>
|
||||
<p class="text-center">
|
||||
<button type="submit" class="btn btn-primary">提交</button>
|
||||
<button type="reset" class="btn btn-danger quxiao" style="margin-left:20px;">取消</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="pwdList">
|
||||
<form id="pwdForm">
|
||||
<div class="form-group">
|
||||
<label>原密码:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="OldPwd">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>新密码:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="NewPwd">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>确认新密码:</label>
|
||||
<input type="text" class="form-control" placeholder="" name="ConfirmPwd">
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<button type="button" class="btn btn-primary" onclick="updatePwd()">提交</button>
|
||||
<button type="reset" class="btn btn-danger quxiaoPwd" style="margin-left:20px;">取消</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@*充值*@
|
||||
<div class="chargeList">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>充值金额:</label>
|
||||
<input type="number" id="orderAmount" class="form-control" placeholder="" value="100">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>支付方式:</label>
|
||||
<input type="radio" name="PayChannel" value="50" checked> <img src="~/img/zfb.png">支付宝支付
|
||||
<input type="radio" name="PayChannel" value="30"> <img src="~/img/wx.png">微信支付
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<button type="button" class="btn btn-primary" onclick="charge()">充值</button>
|
||||
<button type="button" class="btn btn-danger quxiao" style="margin-left:20px;" onclick="$('.chargeList').hide()">取消</button>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-5">
|
||||
<div class="zhanghu">
|
||||
<div class="accout_tit"><span class="lineBar"></span>账户信息</div>
|
||||
<p class="edit"><a>编辑</a></p>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 accoutLeft">
|
||||
<div class="row">
|
||||
<div class="col-lg-4 text-center">
|
||||
<img src="~/img/bandPhone.png">
|
||||
</div>
|
||||
<div class="col-lg-8 xinxi">
|
||||
<div class="item">
|
||||
手机号/用户名:
|
||||
</div>
|
||||
<div class="item myPhone">
|
||||
@(Model.UserModel.Phone??Model.UserModel.LoginCode)
|
||||
</div>
|
||||
<div class="item">
|
||||
密码:
|
||||
</div>
|
||||
<div class="item myPwd">
|
||||
<span>********</span>
|
||||
@*<img src="~/img/closePwd.png">*@
|
||||
</div>
|
||||
<div class="item text-right">
|
||||
<img src="~/img/fix.png"><a class="changePwd">修改密码</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="xinxi2">
|
||||
<div class="item">
|
||||
QQ号:<span>@(Model.UserModel.QQ??"--")</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
微信号:<span>@(Model.UserModel.Wx??"--")</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
淘宝会员名:<span>@(Model.UserModel.TaoBao??"--")</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
邮箱:<span>@(Model.UserModel.Email??"--")</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<div class="zhanghu">
|
||||
<div class="accout_tit"><span class="lineBar"></span>余额</div>
|
||||
<p class="charge" onclick="$('.chargeList').show()" style="font-size:25px;"><a>充值</a></p>
|
||||
<div class="money" style="padding: 20px 30px;">¥<span>@Model.UserModel.RestAmount</span></div>
|
||||
<p class="grayText text-center">可通过淘宝充值,或联系管理员充值</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="zhanghu">
|
||||
<div class="accout_tit"><span class="lineBar"></span>PPTP账号</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="useCon">
|
||||
<p><span>@(Model.AccountModel.TotalCount-Model.AccountModel.ExpriedCount)</span></p>
|
||||
<p>使用中</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="zhanghao">
|
||||
<div class="item">
|
||||
@Model.AccountModel.TotalCount
|
||||
</div>
|
||||
<div class="item">
|
||||
总个数
|
||||
</div>
|
||||
<div class="item">
|
||||
@Model.AccountModel.ExpriedCount
|
||||
</div>
|
||||
<div class="item">
|
||||
已过期
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<div class="zhanghu2">
|
||||
<div class="accout_tit"><span class="lineBar"></span>消费信息</div>
|
||||
<div class="row xiaofeiArea">
|
||||
<div class="col-lg-8">
|
||||
<div class="xiaofei">
|
||||
<div class="item x1">
|
||||
<p>@Model.Statistic.TodayExpend</p>
|
||||
<p>今日消费</p>
|
||||
</div>
|
||||
<div class="item x2">
|
||||
<p>@Model.Statistic.TodayRefund</p>
|
||||
<p>今日退款</p>
|
||||
</div>
|
||||
<div class="item x3">
|
||||
<p>@Model.Statistic.TodayCharege</p>
|
||||
<p>今日充值</p>
|
||||
</div>
|
||||
<div class="item x1">
|
||||
<p>@Model.Statistic.MonthExpend</p>
|
||||
<p>当月消费</p>
|
||||
</div>
|
||||
<div class="item x2">
|
||||
<p>@Model.Statistic.MonthRefund</p>
|
||||
<p>当月退款</p>
|
||||
</div>
|
||||
<div class="item x3">
|
||||
<p>@Model.Statistic.MonthCharege</p>
|
||||
<p>当月充值</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="bennian">
|
||||
<div class="bennianxiaofei">
|
||||
<p>@Model.Statistic.YearExpend</p>
|
||||
<p>本年消费</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<div class="zhanghu2">
|
||||
<div class="accout_tit"><span class="lineBar"></span>聚IP头条</div>
|
||||
<ul class="toutiao">
|
||||
@foreach (var item in Model.TopNewsModel)
|
||||
{
|
||||
<li><a asp-action="info" asp-controller="article" asp-route-id="@item.Id">@item.Title</a><span class="newTIme">@item.CreateTime.ToString("yyyy.MM.dd")</span></li>
|
||||
}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 支付弹窗开始 -->
|
||||
<div class="payMask">
|
||||
<div class="payCon">
|
||||
<img src="~/img/close.png" class="payClose" onclick="$('.payMask').hide()">
|
||||
<p class="payTit"><img src="~/img/wx.png">微信支付 | 收银台</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 text-center">
|
||||
<p>
|
||||
<div id="qrcode" style="width:200px;height:200px"></div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-lg-6 text-left leftBorder">
|
||||
<p>充值订单</p>
|
||||
<p class="payPrice">¥<span id="orderAmountRet"></span></p>
|
||||
<p>收款方:聚IP</p>
|
||||
<p>下单时间:<span id="orderTime"></span></p>
|
||||
<p>订单号:<span id="OrderNo"></span></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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() {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/UpdatePwd',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: form2JsonString("pwdForm"),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
$(".pwdList").hide();
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function payCallback(data) {
|
||||
var orderInfo= data.OrderInfo;
|
||||
if (orderInfo.PayChannel == 30) {
|
||||
$(".payMask").show();
|
||||
$('#qrcode').empty();
|
||||
$('#qrcode').qrcode(data.PayData);
|
||||
$('#orderAmountRet').text(orderInfo.PaymentAmount);
|
||||
$('#orderTime').text(orderInfo.CreateTime);
|
||||
$('#OrderNo').text(orderInfo.OrderNo);
|
||||
} else if (orderInfo.PayChannel == 50) {
|
||||
$("#aliPayBox").html(data.PayData);
|
||||
}
|
||||
}
|
||||
function isPay(orderNo) {
|
||||
var that = this;
|
||||
var payHandler = setInterval(function () {
|
||||
var url = '/user/IsPay?orderNo=' + orderNo;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000 && res.Data == 1) {
|
||||
clearInterval(payHandler);
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
})
|
||||
}, 3000)
|
||||
}
|
||||
function charge() {
|
||||
var chargeData = {
|
||||
ChargeAmount: $('#orderAmount').val(),
|
||||
PayChannel: $('input[name="PayChannel"]:checked').val()
|
||||
}
|
||||
$.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)
|
||||
isPay(res.Data.OrderInfo.OrderNo);
|
||||
} else {
|
||||
alert(res.Message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
15
Host/Views/User/Login.cshtml
Normal file
15
Host/Views/User/Login.cshtml
Normal file
@@ -0,0 +1,15 @@
|
||||
@{
|
||||
ViewData["Title"] = "登录";
|
||||
}
|
||||
|
||||
@section Scripts{
|
||||
<script type="text/javascript">
|
||||
loginCallback = function () {
|
||||
window.location.href="/"
|
||||
}
|
||||
$(".mask").show();
|
||||
$(".main").show();
|
||||
$(".main").addClass("animated bounceInDown");
|
||||
</script>
|
||||
}
|
||||
|
||||
693
Host/Views/User/MyAccounts.cshtml
Normal file
693
Host/Views/User/MyAccounts.cshtml
Normal file
@@ -0,0 +1,693 @@
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using ViewComponents
|
||||
@model List<ProductAccountEntity>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
|
||||
$('#myTabs a').click(function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
});
|
||||
|
||||
//$(".edit").click(function () {
|
||||
// $(".editList").show();
|
||||
//});
|
||||
$(".quxiao").click(function () {
|
||||
$(".editList").hide();
|
||||
});
|
||||
|
||||
$(".laozhanghao").click(function () {
|
||||
$(".zhanghaoCon").show();
|
||||
});
|
||||
$(".btnClose").click(function () {
|
||||
$(".zhanghaoCon").hide();
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.zhanghaoCon {
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
height: 455px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -200px;
|
||||
margin-top: -220px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.online {
|
||||
position: fixed;
|
||||
left: 300px;
|
||||
width: 950px;
|
||||
height: 700px;
|
||||
top: 100px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
padding: 30px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.editList {
|
||||
position: fixed;
|
||||
width: 400px;
|
||||
height: 240px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -200px;
|
||||
margin-top: -120px;
|
||||
z-index: 3;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 6px 8px 6px #ccc;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
padding: 30px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.editList form, .zhanghaoCon form, .tab-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.activetit {
|
||||
border-bottom: 1px solid #3157ad !important;
|
||||
}
|
||||
|
||||
.nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btnClose {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.btnOnlineClose {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
form .row {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
form .row input {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
form .row select {
|
||||
width: 160px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.btnClose {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type=checkbox] {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
.blueT{
|
||||
cursor:pointer;
|
||||
}
|
||||
[v-cloak] {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="zhanghaoCon">
|
||||
<img src="~/img/close.png" class="btnClose" />
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist" style="margin-top:20px;border-bottom:none;">
|
||||
<li role="presentation" class="activetit"><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" style="margin-top:40px;">
|
||||
<div role="tabpanel" class="tab-pane active" id="home">
|
||||
<form>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">选择产品:</div>
|
||||
<div class="col-lg-9">
|
||||
<select v-model="oneAuthModel.ProductId">
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">输入账号:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" v-model="oneAuthModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">验证密码:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" v-model="oneAuthModel.Pwd" />
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="oneAuthLoading" class="text-center" style="margin:8px;color:red;">认证中,请耐心等待...</p>
|
||||
<p class="text-center" style="margin-top:20px"><button type="button" class="btn btn-primary" v-on:click="accountOneAuth">认证账号</button></p>
|
||||
</form>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="profile">
|
||||
<form>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">选择产品:</div>
|
||||
<div class="col-lg-9">
|
||||
<select v-model="mutilAuthModel.ProductId">
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">账号前缀:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" v-model="mutilAuthModel.Account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">开始数:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="number" v-model="mutilAuthModel.StartNum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">认证个数:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="number" v-model="mutilAuthModel.Count" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3">验证密码:</div>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" v-model="mutilAuthModel.Pwd" />
|
||||
</div>
|
||||
</div>
|
||||
<p v-if="mutilAuthLoading" class="text-center" style="margin:8px;color:red;">认证中,请耐心等待...</p>
|
||||
<p class="text-center" style="margin-top:20px"><button type="button" class="btn btn-primary" v-on:click="accountMutilAuth">认证账号</button></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="online" v-cloak v-if="showOnline">
|
||||
<img src="~/img/close.png" class="btnOnlineClose" v-on:click="closeOnline()" />
|
||||
<div class="tab-content" style="margin-top:40px;">
|
||||
<table class="table table-striped table_person">
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>账号</th>
|
||||
<th>登录时间</th>
|
||||
<th>在线时间</th>
|
||||
<th>服务器Ip</th>
|
||||
<th>登录ip</th>
|
||||
<th>上行</th>
|
||||
<th>下行</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in onLineData">
|
||||
<td>#{{index+1}}</td>
|
||||
<td>{{item.Account}}</td>
|
||||
<td>{{item.LoginTime}}</td>
|
||||
<td>{{item.OnlineTime}}</td>
|
||||
<td>{{item.ServerIP}}</td>
|
||||
<td>{{item.LoginIP}}</td>
|
||||
<td>{{item.UpStream}}</td>
|
||||
<td>{{item.DownStream}}</td>
|
||||
<td class="blueT" @@click="killout(item)"> 强制离线</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editList">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label>账户:</label>
|
||||
<input type="text" class="form-control" placeholder="" v-model="UpdateAccountModel.Account">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>新密码:</label>
|
||||
<input type="text" class="form-control" placeholder="" v-model="UpdateAccountModel.Pwd">
|
||||
</div>
|
||||
<p class="text-center"><button type="button" class="btn btn-primary" v-on:click="UpdateAccountPwd">提交</button><button type="reset" class="btn btn-danger quxiao" style="margin-left:20px;">取消</button></p>
|
||||
</form>
|
||||
</div>
|
||||
<p class="wanshan"><img src="~/img/smile.png"> 为了给您带来更好的服务体验,请完善qq号和微信号。<a class="edit" asp-action="index" asp-controller="user" asp-route-e="1">立即完善》</a></p>
|
||||
<div class="toolsBar">
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.ExpiredDay" style="height:35px;">
|
||||
<option>剩余时间</option>
|
||||
<option :value="-1">全部</option>
|
||||
<option :value="0">过期</option>
|
||||
<option :value="1">1天</option>
|
||||
<option :value="3">3天</option>
|
||||
<option :value="7">一周</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" v-model="searchModel.BTime" placeholder="到期开始时间" id="BTime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker2'>
|
||||
<input type='text' class="form-control" placeholder="到期结束时间" v-model="searchModel.ETime" id="ETime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.ProductId" style="height:35px;">
|
||||
<option value="0">全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.PackageId" style="height:35px;">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" v-model="searchModel.Keyword" placeholder="账号" class="bianhao" />
|
||||
<button type="button" class="btn btn-primary" v-on:click="search">查询</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row xufeiBar">
|
||||
<div class="col-lg-6 text-left xuTui">
|
||||
<button type="button" class="btn btn-danger btn-rebuy"><img src="~/img/xufei.png"> 续费</button> <button type="button" class="btn btn-primary btn-refund"><img src="~/img/tui.png"> 退货</button><a style="color:red"> *非本系统开通账号无法退款,请联系客服处理</a>
|
||||
</div>
|
||||
<div class="col-lg-6 text-right">
|
||||
<button type="button" class="btn btn-primary laozhanghao"><img src="~/img/renzheng_gray.png"> 老账号认证</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-striped table_person">
|
||||
<tr>
|
||||
<th><input type="checkbox" name="" id="checkAll" value="" /></th>
|
||||
<th>开通时间</th>
|
||||
<th>产品</th>
|
||||
<th>套餐</th>
|
||||
<th>账号</th>
|
||||
<th>密码</th>
|
||||
<th>连接数</th>
|
||||
<th>到期时间</th>
|
||||
<th>剩余时间</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" /></td>
|
||||
<td>@item.CreateTime.ToString("yyyy.MM.dd")</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>@item.Account</td>
|
||||
<td>@item.Pwd <img src="~/img/change.png" class="change" v-on:click="showAccountBox(@item.Id,'@item.Account','@item.Pwd')" /></td>
|
||||
<td>@item.ConnectCount</td>
|
||||
<td>@item.EndTime.Value.ToString("yyyy.MM.dd")</td>
|
||||
<td class="redT">@(item.Status==AccountStatus.Refund?"已退货": item.RestTime)</td>
|
||||
@*<td class="greenT">查看</td>*@
|
||||
<td class="blueT"><a @@click="online(@item.ProductId,'@item.Account')">查看</a> </td>
|
||||
<td class="blueT"><a asp-action="Index" asp-controller="LineList" asp-route-ProductId="@item.ProductId" target="_blank">查看</a> </td>
|
||||
<td class="blueT"> <a asp-action="soft" asp-controller="product" target="_blank">下载</a></td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
@*<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>*@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
productWithPackage: [],
|
||||
packages: [],
|
||||
mutilAuthLoading: false,
|
||||
oneAuthLoading: false,
|
||||
showOnline: false,
|
||||
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
|
||||
},
|
||||
UpdateAccountModel: {
|
||||
ProductId:0,
|
||||
UserId:0,
|
||||
Account: "",
|
||||
Pwd:""
|
||||
},
|
||||
onLineData:[]
|
||||
},
|
||||
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 () {
|
||||
|
||||
},
|
||||
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 = [];
|
||||
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("&");
|
||||
},
|
||||
showAccountBox(id,account,pwd) {
|
||||
$(".editList").show();
|
||||
this.UpdateAccountModel.Id = id;
|
||||
this.UpdateAccountModel.Account = account;
|
||||
this.UpdateAccountModel.Pwd = pwd;
|
||||
},
|
||||
UpdateAccountPwd(){
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/UpdateAccountPwd',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.UpdateAccountModel),
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
if (res.Code == 10000) {
|
||||
window.location.reload();
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
accountOneAuth() {
|
||||
if (this.oneAuthModel.ProductId ==0) {
|
||||
alert('请选择产品')
|
||||
return;
|
||||
}
|
||||
if (this.oneAuthModel.Account == '' || this.oneAuthModel.Pwd == '') {
|
||||
alert('账号和密码不能为空')
|
||||
return;
|
||||
}
|
||||
var that = this;
|
||||
if (this.oneAuthLoading) return
|
||||
this.oneAuthLoading = true;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/user/OrginAccountAuth',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(this.oneAuthModel),
|
||||
success: function (res) {
|
||||
that.oneAuthLoading = false;
|
||||
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)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
online(productId, account) {
|
||||
this.showOnline = true
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/productaccount/OnLine?productId=' + productId + '&account=' + account,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
that.onLineData = res.Data;
|
||||
for (var i = 0; i < that.onLineData.length; i++) {
|
||||
that.onLineData[i].ProductId = productId;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
closeOnline() {
|
||||
this.showOnline = false;
|
||||
this.onLineData = [];
|
||||
},
|
||||
killout: function (item) {
|
||||
var that = this;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/productaccount/KillOut?productId=' + item.ProductId + '&id=' + item.Id,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
alert("操作成功");
|
||||
that.online(item.ProductId, item.Account)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
$(function () {
|
||||
var picker1 = $('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn'),
|
||||
//minDate: '2016-7-1'
|
||||
});
|
||||
var picker2 = $('#datetimepicker2').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn')
|
||||
});
|
||||
//动态设置最小值
|
||||
picker1.on('dp.change', function (e) {
|
||||
picker2.data('DateTimePicker').minDate(e.date);
|
||||
});
|
||||
//动态设置最大值
|
||||
picker2.on('dp.change', function (e) {
|
||||
picker1.data('DateTimePicker').maxDate(e.date);
|
||||
});
|
||||
|
||||
//退款
|
||||
|
||||
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.info +",确定要退款吗?"
|
||||
//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($(this).val())
|
||||
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(",");
|
||||
})
|
||||
|
||||
$("#checkAll").on('click', function () {
|
||||
console.log($(this).prop("checked"),"check")
|
||||
$("td > input:checkbox").prop("checked", $(this).prop("checked"))
|
||||
})
|
||||
});
|
||||
</script>
|
||||
53
Host/Views/User/MyCoupons.cshtml
Normal file
53
Host/Views/User/MyCoupons.cshtml
Normal file
@@ -0,0 +1,53 @@
|
||||
@using Hncore.Pass.Sells.Model
|
||||
@model List<UserCouponModel>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
}
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="col-lg-3">
|
||||
<div class="quan">
|
||||
@if (item.Coupon.CouponType == ECouponType.Discount)
|
||||
{
|
||||
<span class="couponPrice">@(item.Coupon.CouponValue)折</span><span class="couponName">@item.Coupon.Name</span>
|
||||
}
|
||||
@if (item.Coupon.CouponType == ECouponType.Minus)
|
||||
{
|
||||
<div class="item">
|
||||
¥<span class="couponPrice">@(item.Coupon.CouponValue)</span><span class="couponName">@item.Coupon.Name</span>
|
||||
</div>
|
||||
}
|
||||
<div class="item">
|
||||
使用规则:@(item.Coupon.AllowMinAmount > 0 ? $"满{item.Coupon.AllowMinAmount}元可用" : "无限制")
|
||||
</div>
|
||||
<div class="item">
|
||||
有效时间:@(item.Orgin.StartTime.Value.ToString("yyyy.MM.dd"))-@(item.Orgin.EndTime.Value.ToString("yyyy.MM.dd"))
|
||||
</div>
|
||||
<div class="item">
|
||||
获得途径: @item.Orgin.Remark
|
||||
</div>
|
||||
<div class="item">
|
||||
@(item.IsUsed?"已使用":"未使用")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@*<div class="col-lg-3">
|
||||
<div class="quan gray">
|
||||
<div class="item">
|
||||
¥<span class="couponPrice">3</span><span class="couponName">优惠券名称</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
使用规则:无限制
|
||||
</div>
|
||||
<div class="item">
|
||||
有效时间:<span>2020.1.1-2020.2.3</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
获得途径;淘宝下单赠送
|
||||
</div>
|
||||
<div class="item">
|
||||
已使用
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
234
Host/Views/User/MyOrders.cshtml
Normal file
234
Host/Views/User/MyOrders.cshtml
Normal file
@@ -0,0 +1,234 @@
|
||||
@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;
|
||||
};
|
||||
}
|
||||
<style>
|
||||
.tipBox {
|
||||
position: absolute;
|
||||
padding:10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
width: 260px;
|
||||
min-height:100px;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<form asp-action="myorders" asp-controller="user" method="get">
|
||||
<div class="toolsBar" id="app">
|
||||
|
||||
<div class="item">
|
||||
日期筛选:
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" v-model="searchModel.BTime" placeholder="选择开始时间" id="BTime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker2'>
|
||||
<input type='text' class="form-control" v-model="searchModel.ETime" placeholder="选择结束时间" id="ETime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.OrderType" style="height:35px;">
|
||||
<option value="0">全部类型</option>
|
||||
<option value="1">新开</option>
|
||||
<option value="2">续费</option>
|
||||
<option value="3">批量新开</option>
|
||||
<option value="4">批量续费</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.ProductId" style="height:35px;">
|
||||
<option value="0">全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.PackageId" style="height:35px;">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" v-model="searchModel.KeyWord" placeholder="订单编号" class="bianhao" /><button type="button" class="btn btn-primary" v-on:click="search">查询</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-striped table_person">
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>订单编号</th>
|
||||
<th>类型</th>
|
||||
<th>产品</th>
|
||||
<th>套餐</th>
|
||||
<th>单价</th>
|
||||
<th>总连接数</th>
|
||||
<th>账号</th>
|
||||
<th>订单金额</th>
|
||||
<th>优惠券</th>
|
||||
<th>实付金额</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.CreateTime.ToString("yyyy.MM.dd")</td>
|
||||
<td>@item.OrderNo</td>
|
||||
<td>@item.OrderType.GetEnumDisplayName()</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>@item.DayPrice</td>
|
||||
<td>@(item.ConnectCount*item.AccountCount)</td>
|
||||
<td class="@(item.Accounts.Length>15?"cutTip":"")">
|
||||
@cut(item.Accounts)
|
||||
<div class="tipBox">@item.Accounts</div>
|
||||
</td>
|
||||
<td>@item.OrderAmount</td>
|
||||
<td>@item.CouponAmount</td>
|
||||
<td>@item.PaymentAmount</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var picker1 = $('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn'),
|
||||
//minDate: '2016-7-1'
|
||||
});
|
||||
var picker2 = $('#datetimepicker2').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn')
|
||||
});
|
||||
//动态设置最小值
|
||||
picker1.on('dp.change', function (e) {
|
||||
picker2.data('DateTimePicker').minDate(e.date);
|
||||
});
|
||||
//动态设置最大值
|
||||
picker2.on('dp.change', function (e) {
|
||||
picker1.data('DateTimePicker').maxDate(e.date);
|
||||
});
|
||||
|
||||
$(".cutTip").mouseover(function () {
|
||||
$(this).children().last().show();
|
||||
}).mouseleave(function () {
|
||||
$(this).children().last().hide();
|
||||
})
|
||||
});</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
|
||||
}
|
||||
},
|
||||
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("&");
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
195
Host/Views/User/MyRefundOrders.cshtml
Normal file
195
Host/Views/User/MyRefundOrders.cshtml
Normal file
@@ -0,0 +1,195 @@
|
||||
@using Hncore.Infrastructure.Data
|
||||
@using Hncore.Pass.Vpn.Domain
|
||||
@using Hncore.Infrastructure.Extension
|
||||
@using ViewComponents
|
||||
@model PageData<ProductOrderEntity>
|
||||
@{
|
||||
Layout = "_UserLayout";
|
||||
}
|
||||
<div class="toolsBar" id="app">
|
||||
<div class="item">
|
||||
日期:
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="row">
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker1'>
|
||||
<input type='text' class="form-control" name="BTime" v-model="searchModel.BTime" placeholder="选择开始时间" id="BTime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
<div class="form-group">
|
||||
<!--指定 date标记-->
|
||||
<div class='input-group date' id='datetimepicker2'>
|
||||
<input type='text' class="form-control" name="ETime" v-model="searchModel.ETime" placeholder="选择结束时间" id="ETime" />
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.ProductId" style="height:35px;">
|
||||
<option value="0" selected >全部产品</option>
|
||||
<option v-for="item in productWithPackage" :value="item.Product.Id">{{item.Product.Name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="btn-group">
|
||||
<select v-model="searchModel.PackageId" style="height:35px;">
|
||||
<option value="0">全部套餐</option>
|
||||
<option v-for="item in packages" :value="item.Id">{{item.Name}}</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<input type="text" v-model="searchModel.KewWord" placeholder="订单编号" class="bianhao" />
|
||||
<button type="button" class="btn btn-primary" v-on:click="search">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table_person">
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>订单编号</th>
|
||||
<th>类型</th>
|
||||
<th>产品</th>
|
||||
<th>套餐</th>
|
||||
<th>账号</th>
|
||||
<th>连接数</th>
|
||||
<th>退款时长</th>
|
||||
<th>退款单价</th>
|
||||
<th>退款金额</th>
|
||||
</tr>
|
||||
@foreach (var item in Model.List)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.CreateTime.ToString("yyyy.MM.dd")</td>
|
||||
<td>@item.OrderNo</td>
|
||||
<td>@item.OrderType.GetEnumDisplayName()</td>
|
||||
<td>@item.ProductName</td>
|
||||
<td>@item.PackageName</td>
|
||||
<td>@item.Accounts</td>
|
||||
<td>@item.ConnectCount</td>
|
||||
<td>@item.DayCount</td>
|
||||
<td>@item.DayPrice</td>
|
||||
<td>@item.RefundAmount</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
<div class="fenye">
|
||||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
productWithPackage: [],
|
||||
packages: [],
|
||||
searchModel: {
|
||||
ProductId:@this.Context.Request.GetInt("ProductId"),
|
||||
PackageId:@this.Context.Request.GetInt("PackageId"),
|
||||
Keyword:'',
|
||||
BTime: '',
|
||||
ETime: ''
|
||||
}
|
||||
},
|
||||
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: {
|
||||
selectFn: function (e) {
|
||||
console.log(e.target.value) // 选择项的value
|
||||
},
|
||||
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("&");
|
||||
}
|
||||
}
|
||||
})
|
||||
$(function () {
|
||||
var picker1 = $('#datetimepicker1').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn'),
|
||||
//minDate: '2016-7-1'
|
||||
});
|
||||
var picker2 = $('#datetimepicker2').datetimepicker({
|
||||
format: 'YYYY-MM-DD',
|
||||
locale: moment.locale('zh-cn')
|
||||
});
|
||||
//动态设置最小值
|
||||
picker1.on('dp.change', function (e) {
|
||||
picker2.data('DateTimePicker').minDate(e.date);
|
||||
});
|
||||
//动态设置最大值
|
||||
picker2.on('dp.change', function (e) {
|
||||
picker1.data('DateTimePicker').maxDate(e.date);
|
||||
});
|
||||
//退款
|
||||
$(".btn-refund").on('click', function () {
|
||||
var accounts = [];
|
||||
$.each($('input:checkbox:checked'), function () {
|
||||
accounts.push($(this).val())
|
||||
});
|
||||
if (accounts.length == 0) { alert('请选择账号'); return; }
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/course/v1/order/Refund?account=' + accounts[0],
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
alert('退款成功')
|
||||
} else {
|
||||
alert(res.Message)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user