1491 lines
65 KiB
Plaintext
1491 lines
65 KiB
Plaintext
@using Hncore.Infrastructure.Data
|
||
@using Hncore.Pass.Vpn.Domain
|
||
@using Hncore.Infrastructure.Extension
|
||
@using ViewComponents
|
||
@using Newtonsoft.Json;
|
||
@using Newtonsoft.Json.Linq;
|
||
@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;
|
||
}
|
||
.citylabel {
|
||
font-weight: normal;
|
||
width: 160px;
|
||
height: 35px;
|
||
padding-left: 5px;
|
||
padding-top: 5px;
|
||
text-align: left;
|
||
border: solid 1px #ccc;
|
||
}
|
||
.province{
|
||
margin-bottom: 10px;
|
||
}
|
||
.bg_blue {
|
||
background-color: #2955b3;
|
||
color:white;
|
||
}
|
||
|
||
.online {
|
||
position: fixed;
|
||
left: 350px;
|
||
width: 1000px;
|
||
height: 710px;
|
||
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: 260px;
|
||
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%;
|
||
}
|
||
|
||
#update_many_passwd {
|
||
position: fixed;
|
||
width: 400px;
|
||
height: 260px;
|
||
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;
|
||
}
|
||
|
||
#update_many_passwd 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()" />
|
||
<p style="color: #FF6666;font-size:20px;" id="online_status"></p>
|
||
<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>上行</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.UpStream}}</td>
|
||
<td>{{item.DownStream}}</td>
|
||
<td class="blueT" @@click="killout(item)"> 强制离线</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
@* 指定地区 *@
|
||
<div class="online" style="overflow: hidden;display:none;" v-cloak id="showAddress">
|
||
<img src="~/img/close.png" class="btnOnlineClose" style="position: absolute;top:10px;cursor:pointer" v-on:click="closeOnline()" />
|
||
<div id="jike">
|
||
<h4 v-if="productId==13">请点击☞<a style="cursor:pointer" v-on:click="checkLine(1)">入口一</a> <a style="cursor:pointer" v-on:click="checkLine(2)">入口二</a></h4>
|
||
<h4><span style="color:#FF6666">{{line_text}}</span>统一服务器地址为:<span style="color:#FF6666">{{address_url}}</span> 换地区时无需在设备上更换服务器,只需在此页面选择需要的地区即可,可实现任意城市组合的混拨。<span style="color: red;">标红</span>为此线路正在维护中,最多可选择20个线路</h4>
|
||
<div style="overflow-y: auto;width:950px;height:530px;">
|
||
|
||
<div class="checkboxs">
|
||
<label style="width: 25%;" v-for="(item,index) in assign_add_list">
|
||
<input type="checkbox" v-model="assign_list" :value="item.name+'-'+item.id"/><span v-if="item.status ==2">{{item.name}}</span><span v-if="item.status ==1" style="color: red;">123{{item.name}}</span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="huohu" style="overflow-y: auto;width:950px;height:580px;">
|
||
请稍后,加载中...
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" v-on:click="closeOnline()">取消</button>
|
||
<button type="button" class="btn btn-primary" v-on:click="selectAddAssign()">确定选择</button>
|
||
</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="button" class="btn btn-danger quxiao" style="margin-left:20px;">取消</button></p>
|
||
</form>
|
||
</div>
|
||
|
||
<div id="update_many_passwd">
|
||
<form>
|
||
<div class="form-group">
|
||
<label>账户:</label>
|
||
<input type="text" class="form-control" placeholder="" id="update_many_account">
|
||
<input type="hidden" class="form-control" placeholder="" id="update_many_proid">
|
||
</div>
|
||
<div class="form-group">
|
||
<label>新密码:</label>
|
||
<input type="text" class="form-control" placeholder="" id="update_many_pwd">
|
||
</div>
|
||
<p class="text-center"><button type="button" id="update_many_submit" class="btn btn-primary">提交</button><button type="button" class="btn btn-danger quxiao_update_many" 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>
|
||
<p style="text-align:center;">筛选功能已优化完成,可正常使用,更加便捷。</p>
|
||
<div class="toolsBar">
|
||
<div class="item" style="width:20%;">
|
||
<div class="btn-group">
|
||
<select v-model="searchModel.ExpiredDay" @@change="search" style="height:35px;width:200%;">
|
||
<option disabled :value="0">选择过期时间</option>
|
||
<option :value="-100">全部</option>
|
||
<option :value="1">1天内到期</option>
|
||
<option :value="3">3天内到期</option>
|
||
<option :value="7">一周内到期</option>
|
||
<option :value="10">10天内到期</option>
|
||
<option :value="-1">已经到期1天内</option>
|
||
<option :value="-3">已经到期3天内</option>
|
||
<option :value="-4">已经到期3天以上</option>
|
||
<option :value="-5">全部未过期</option>
|
||
<option :value="-6">全部已过期</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="item">
|
||
<div class="btn-group">
|
||
<select v-model="searchModel.ProductId" @@change="search" 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" @@change="search" style="height:35px;">
|
||
<option value="0">全部套餐</option>
|
||
<option v-for="item in packages" v-if="item.Status == 1" :value="item.Name">{{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>
|
||
<button type="button" class="btn btn-warning btn-update-passwd">批量修改密码</button>
|
||
<a style="color:red"> *批量续费可通过筛选和搜索功能精准定位账号</a>
|
||
</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>ip地址</th>
|
||
<th>服务器</th>
|
||
<th>连接数</th>
|
||
<th>到期时间</th>
|
||
<th>剩余时间</th>
|
||
<th>在线及踢线</th>
|
||
<!-- <th>选择地区</th> -->
|
||
<th>操作</th>
|
||
<th>软件下载</th>
|
||
</tr>
|
||
@foreach (var item in Model)
|
||
{
|
||
@if(item.Status==AccountStatus.Refund || item.RestTime=="已过期") {
|
||
<tr style="color:red;">
|
||
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-package="@(item.PackageName)" a-status="@(item.Status)" 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 <a style="cursor:pointer;" v-on:click="copyText('@item.Account')">复制</a></td>
|
||
<td>@item.Pwd <a style="cursor:pointer;" v-on:click="copyText('@item.Pwd')">复制</a><img src="~/img/change.png" class="change" v-on:click="showAccountBox(@item.Id,'@item.Account','@item.Pwd')" /></td>
|
||
<td class="blueT"><span v-if="@item.ProductId==28">@(item.Remark)<a v-on:click="change_ip('@item.Id','@item.PackageName','@item.Account','@item.Remark')" data-toggle="modal" data-target="#change_ip_city">切换</a></span></td>
|
||
<td class="blueT" v-if="@item.ProductId==28">@(item.Raw) <a style="cursor:pointer;" v-on:click="copyText('@(item.Raw)')">复制</a></td>
|
||
<td class="blueT" v-if="@item.ProductId!=28"><a asp-action="Index" asp-controller="LineList" asp-route-ProductId="@item.ProductId" target="_blank">查看</a> </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 v-if="@item.ProductId==19||@item.ProductId==13||@item.ProductId==17||@item.ProductId==1" @@click="assign_address(@item.ProductId,'@item.Account','@item.Pwd')">切换地区</a> </td> -->
|
||
|
||
<td class="blueT" ><a v-on:click="deleteacct(@item.Id)">删除</a> </td>
|
||
<td class="blueT"><a href="/product/soft">下载</a></td>
|
||
</tr>
|
||
} else {
|
||
<tr>
|
||
<td><input type="checkbox" class="selectAccount" value="@item.Account" a-package="@(item.PackageName)" a-status="@(item.Status)" 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 <a style="cursor:pointer;" v-on:click="copyText('@item.Account')">复制</a></td>
|
||
<td>@item.Pwd <a style="cursor:pointer;" v-on:click="copyText('@item.Pwd')">复制</a><img src="~/img/change.png" class="change" v-on:click="showAccountBox(@item.Id,'@item.Account','@item.Pwd')" /></td>
|
||
<td class="blueT"><span v-if="@item.ProductId==28">@(item.Remark)<a v-on:click="change_ip('@item.Id','@item.PackageName','@item.Account','@item.Remark')" data-toggle="modal" data-target="#change_ip_city">切换</a></span></td>
|
||
<td class="blueT" v-if="@item.ProductId==28">@(item.Raw) <a style="cursor:pointer;" v-on:click="copyText('@(item.Raw)')">复制</a></td>
|
||
<td class="blueT" v-if="@item.ProductId!=28"><a asp-action="Index" asp-controller="LineList" asp-route-ProductId="@item.ProductId" target="_blank">查看</a> </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 v-if="@item.ProductId==19||@item.ProductId==13||@item.ProductId==17||@item.ProductId==1" @@click="assign_address(@item.ProductId,'@item.Account','@item.Pwd')">切换地区</a> </td> -->
|
||
|
||
<td class="blueT" ><a v-on:click="deleteacct('@item.Id')">删除</a></td>
|
||
<td class="blueT"><a href="/product/soft">下载</a></td>
|
||
</tr>
|
||
}
|
||
}
|
||
|
||
</table>
|
||
<!-- /切换地区 -->
|
||
<div class="modal fade" id="change_ip_city" tabindex="-1" role="dialog">
|
||
<div class="modal-dialog" role="document" style="width:50%">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||
<h4 class="modal-title">水滴切换地区和ip</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
|
||
<ul id="myTab" class="nav nav-tabs">
|
||
<li class="active">
|
||
<a href="#city" data-toggle="tab">
|
||
切换地区
|
||
</a>
|
||
</li>
|
||
<li><a href="#ip" v-on:click="selsect_ip()" data-toggle="tab">切换IP</a></li>
|
||
</ul>
|
||
|
||
<div id="myTabContent" class="tab-content" style="padding-top:30px;">
|
||
<div class="tab-pane fade in active" id="city">
|
||
<div class="row ">
|
||
<div class="col-sm-3 text-center" style="height:470px;overflow:auto;overflow-x: hidden;">
|
||
<label style="border:1px solid #00a63f;padding:3px;width:100%;margin:2px;"><input name="allprovince" @@change="select_all_province()" type="checkbox"> 全部</label>
|
||
<label v-for="(item,index) in province_city.province_surplus_outs" :key="index" style="border:1px solid #00a63f;padding:3px;width:100%;margin:2px"><input v-model="province" name="province" :value="index" type="checkbox" @@change="select_province()">{{item.en_name}}({{item.total}})</label>
|
||
</div>
|
||
<div class="col-sm-9" style="font-size:13px;height:453px;overflow:auto;">
|
||
<div class="col-sm-4 diqu" v-for="(item,index) in citys" :key="index" :class="'select_addr'+index" v-on:click="selsect_adddr_num(item.province+'-'+item.rid+'-100',index)" style="padding:5px;">
|
||
<div style="border:1px solid #ddd;padding:5px;">
|
||
<p v-if="item.isp_class == 0" style="padding:0;margin:0;white-space: nowrap;overflow:hidden;"><span class="glyphicon glyphicon-asterisk " style="color:#00a63f;overflow:hidden;"></span>[多线]{{item.name}}</p>
|
||
<p v-else-if="item.isp_class == 1" style="padding:0;margin:0;white-space: nowrap;overflow:hidden;"><span class="glyphicon glyphicon-asterisk " style="color:#00a63f;overflow:hidden;"></span>[电信]{{item.name}}</p>
|
||
<p v-else-if="item.isp_class == 2" style="padding:0;margin:0;white-space: nowrap;overflow:hidden;"><span class="glyphicon glyphicon-asterisk " style="color:#00a63f;overflow:hidden;"></span>[联通]{{item.name}}</p>
|
||
<p v-else-if="item.isp_class == 3" style="padding:0;margin:0;white-space: nowrap;overflow:hidden;"><span class="glyphicon glyphicon-asterisk " style="color:#00a63f;overflow:hidden;"></span>[移动]{{item.name}}</p>
|
||
<p v-else style="padding:0;margin:0;white-space: nowrap;overflow:hidden;"><span class="glyphicon glyphicon-asterisk " style="color:#00a63f;overflow:hidden;"></span>[未知]{{item.name}}</p>
|
||
<hr style="margin:0;">
|
||
<p style="padding:0;margin:0;">余量:{{item.total}} 延迟:{{item.ping}}ms</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="ip" >
|
||
<p style="font-weight:bold;">当前IP:{{old_ip}}</p>
|
||
<p style="font-weight:bold;">
|
||
<select class="form-control " v-model="change_info.chinge_ip.ip_id" style="height:30px;font-size:15px;width:30%;">
|
||
<option value="0">-请选择-</option>
|
||
<option v-for="item in ip_list" :value="item.id">{{item.address}}</option>
|
||
</select>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||
<button type="button" v-on:click="change_submit()" class="btn btn-primary">确定</button>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal-dialog -->
|
||
</div><!-- /.modal -->
|
||
@*<div class="fenye">
|
||
@await Component.InvokeAsync("Pager", new PagerModel() { Total = Model.RowCount, PageIndex = this.Context.Request.GetInt("PageIndex") })
|
||
</div>*@
|
||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog">
|
||
<div class="modal-content" style="width: 70%;">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h4 class="modal-title" id="myModalLabel">温馨提示:请选择退款原因</h4>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason('连接不上')" class="btn btn-info btn-lg">连接不上</button>
|
||
</div>
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason('网速慢')" class="btn btn-info btn-lg">网速慢</button>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
<div class="row">
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason('稳定性差')" class="btn btn-info btn-lg">稳定性差</button>
|
||
</div>
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason('IP太少')" class="btn btn-info btn-lg">IP太少</button>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
<div class="row">
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason('想换用其他产品')" class="btn btn-info btn-lg">想换用其他产品</button>
|
||
</div>
|
||
<div class="col-md-6 text-center">
|
||
<button type="button" style="width:160px;" v-on:click="refund_reason(false)" class="btn btn-info btn-lg">暂时用不到了</button>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
<div>
|
||
<p style="color: red;display:none;" class="refund-info"> * 此类问题可联系专业售后客服帮助解决,解决率为95%,点击联系售后客服。</p>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||
<button type="button" class="btn btn-primary confirm-refund" disabled="disabled">确定退款</button>
|
||
</div>
|
||
</div><!-- /.modal-content -->
|
||
</div><!-- /.modal -->
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
|
||
function getQueryVariable(variable)
|
||
{
|
||
var query = window.location.search.substring(1);
|
||
var vars = query.split("&");
|
||
for (var i=0;i<vars.length;i++) {
|
||
var pair = vars[i].split("=");
|
||
if(pair[0] == variable){return pair[1];}
|
||
}
|
||
return(false);
|
||
}
|
||
|
||
var reason = '';
|
||
|
||
var app = new Vue({
|
||
el: '#app',
|
||
data: {
|
||
productWithPackage: [],
|
||
packages: [],
|
||
mutilAuthLoading: false,
|
||
oneAuthLoading: false,
|
||
showOnline: false,
|
||
assign_add_list:[],
|
||
assign_list:[],
|
||
line_text:'入口一',
|
||
assign_account:'',
|
||
assign_pass:'',
|
||
productId:'',
|
||
address_url:'',
|
||
searchModel: {
|
||
ExpiredDay:@this.Context.Request.GetInt("ExpiredDay"),
|
||
ProductId:@this.Context.Request.GetInt("ProductId"),
|
||
PackageId:'0',
|
||
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:[],
|
||
citys:[],
|
||
shuidi:{
|
||
'is_unshar':0, // 0 游戏独享 1 线路独享
|
||
'game_id':0,
|
||
'product_id':1,//1静态 2固态
|
||
},
|
||
province_city:[],
|
||
province:[],
|
||
change_info:{
|
||
chinge_addr:{
|
||
type:0,
|
||
province_id:0,
|
||
rid:0,
|
||
account:'',
|
||
},
|
||
chinge_ip:{
|
||
type:0,
|
||
ip_id:0,
|
||
account:'',
|
||
},
|
||
},
|
||
old_ip:'',
|
||
ip_list:[]
|
||
},
|
||
computed: {
|
||
|
||
},
|
||
watch: {
|
||
|
||
},
|
||
created: function () {
|
||
},
|
||
mounted: function () {
|
||
this.getProducts();
|
||
},
|
||
methods: {
|
||
copyText(text) {
|
||
// 检查浏览器是否支持 Clipboard API
|
||
if (!navigator.clipboard) {
|
||
// 如果不支持,则使用传统的 document.execCommand("copy") 方式
|
||
const textArea = document.createElement("textarea");
|
||
textArea.value = text;
|
||
textArea.style.position = "fixed";
|
||
document.body.appendChild(textArea);
|
||
textArea.focus();
|
||
textArea.select();
|
||
document.execCommand("copy");
|
||
document.body.removeChild(textArea);
|
||
return;
|
||
}
|
||
|
||
// 使用 Clipboard API 复制内容到剪切板
|
||
navigator.clipboard.writeText(text).then(
|
||
function() {
|
||
console.log("复制成功");
|
||
},
|
||
function() {
|
||
console.log("复制失败");
|
||
}
|
||
);
|
||
},
|
||
deleteacct(Id) {
|
||
|
||
let data = {
|
||
cookie:document.cookie,
|
||
id: Id
|
||
}
|
||
|
||
if (confirm("您确定要删除该账号吗?")) {
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/manager/account/delete',
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
data: JSON.stringify(data),
|
||
beforeSend: function(xhr) {
|
||
xhr.withCredentials = true;
|
||
},
|
||
crossDomain: true,
|
||
success: function (res) {
|
||
alert('删除成功');
|
||
location.reload();
|
||
}
|
||
});
|
||
}
|
||
},
|
||
change_ip(account_id,package,account,old_ip){
|
||
this.province_city = [];
|
||
let data = {
|
||
cookie:document.cookie,
|
||
data: account_id
|
||
}
|
||
|
||
this.old_ip = old_ip
|
||
|
||
var pack = package.split('-');
|
||
if (pack[0] == '静态') {
|
||
this.shuidi.product_id = 0;
|
||
} else {
|
||
this.shuidi.product_id = 1;
|
||
}
|
||
|
||
this.change_info.chinge_addr.account = account;
|
||
this.change_info.chinge_ip.account = account;
|
||
this.change_info.chinge_addr.type = this.shuidi.product_id;
|
||
this.change_info.chinge_addr.province_id = 0;
|
||
this.change_info.chinge_addr.rid = 0;
|
||
this.change_info.chinge_ip.type = this.shuidi.product_id;
|
||
this.change_info.chinge_ip.ip_id = 0;
|
||
|
||
var that = this
|
||
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/jinyou/jinyoujt/address_margin',
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
data: JSON.stringify(data),
|
||
beforeSend: function(xhr) {
|
||
xhr.withCredentials = true;
|
||
},
|
||
crossDomain: true,
|
||
success: function (res) {
|
||
that.province_city = res.data.region
|
||
}
|
||
});
|
||
|
||
|
||
for (var i in this.province_city.province_surplus_outs) {
|
||
this.province.push(i);
|
||
this.citys = this.citys.concat(this.province_city.province_surplus_outs[i].citys);
|
||
}
|
||
},
|
||
selsect_ip(){
|
||
let data = {
|
||
cookie:document.cookie,
|
||
data: this.change_info.chinge_ip
|
||
}
|
||
|
||
var that = this
|
||
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/jinyou/jinyoujt/change_ip_list',
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
data: JSON.stringify(data),
|
||
beforeSend: function(xhr) {
|
||
xhr.withCredentials = true;
|
||
},
|
||
crossDomain: true,
|
||
success: function (res) {
|
||
that.ip_list = res.data
|
||
}
|
||
});
|
||
|
||
},
|
||
select_province() {
|
||
this.citys = [];
|
||
for (var i in this.province_city.province_surplus_outs) {
|
||
if (this.province.includes(i)) {
|
||
this.citys = this.citys.concat(this.province_city.province_surplus_outs[i].citys);
|
||
}
|
||
}
|
||
},
|
||
select_all_province() {
|
||
var checkboxes = document.querySelector('input[name="allprovince"]');
|
||
|
||
if (checkboxes.checked) {
|
||
for (var i in this.province_city.province_surplus_outs) {
|
||
this.province.push(i);
|
||
this.citys = this.citys.concat(this.province_city.province_surplus_outs[i].citys);
|
||
}
|
||
} else {
|
||
this.province = [];
|
||
this.citys = [];
|
||
}
|
||
},
|
||
|
||
selsect_adddr_num(addr_id,index) {
|
||
|
||
for(it in this.citys) {
|
||
$(".select_addr"+it).removeClass("bg_blue");
|
||
}
|
||
var addr = addr_id.split('-');
|
||
|
||
this.change_info.chinge_addr.province_id = addr[0];
|
||
this.change_info.chinge_addr.rid = addr[1];
|
||
$(".select_addr"+index).addClass("bg_blue");
|
||
},
|
||
change_submit() {
|
||
let data = {
|
||
cookie:document.cookie,
|
||
data: this.change_info
|
||
}
|
||
|
||
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/jinyou/jinyoujt/change_ip',
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
data: JSON.stringify(data),
|
||
beforeSend: function(xhr) {
|
||
xhr.withCredentials = true;
|
||
},
|
||
crossDomain: true,
|
||
success: function (res) {
|
||
alert('切换成功');
|
||
$('#change_ip_city').modal('hide')
|
||
}
|
||
});
|
||
},
|
||
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() {
|
||
if(decodeURIComponent(getQueryVariable('PackageId'))!='false'){
|
||
this.searchModel.PackageId = decodeURIComponent(getQueryVariable('PackageId'))
|
||
} else {
|
||
this.searchModel.PackageId = '0'
|
||
}
|
||
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) {
|
||
if (this.searchModel[item]!=0 && this.searchModel[item] != 'false' && this.searchModel[item]!=null){
|
||
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;
|
||
}
|
||
}
|
||
}
|
||
});
|
||
},
|
||
assign_address(productId, account,pass) {
|
||
if(productId != 13 && productId != 19 && productId != 17 && productId != 1){
|
||
alert('目前仅支持强子、极客、火狐、西瓜产品!');
|
||
return;
|
||
}
|
||
$("#showAddress").show();
|
||
var that = this;
|
||
|
||
this.assign_account = account;
|
||
this.assign_pass = pass;
|
||
this.productId = productId;
|
||
if(productId == 13){
|
||
$("#jike").show();
|
||
$("#huohu").hide();
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/index?user='+account+'&password='+pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
that.assign_add_list = res.data;
|
||
that.assign_list =res.list;
|
||
that.address_url = 'a.jkip.com'
|
||
that.line_text = '入口一'
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
}
|
||
if(productId == 17){
|
||
$("#jike").show();
|
||
$("#huohu").hide();
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/indexXigua?user='+account+'&password='+pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
that.assign_add_list = res.data;
|
||
that.assign_list =res.list;
|
||
that.address_url = 'a.xxxx'
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
}
|
||
if(productId == 1){
|
||
$("#huohu").show();
|
||
$("#jike").hide();
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/qiangzi_address?user='+account+'&password='+pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
$("#huohu").html('<p style="font-size:30px;">服务器地址是混拨服务器,不选择任何地区,则为全国随机</p>');
|
||
$("#huohu").append(res);
|
||
|
||
}
|
||
});
|
||
}
|
||
if(productId == 19){
|
||
$("#huohu").show();
|
||
$("#jike").hide();
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/getList?user='+account+'&password='+pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
$("#huohu").html('<p style="font-size:30px;">统一服务器地址:1.hhip.vip <span style="color:red;">请不要选择剩余为0的地区</span></p><p>换地区时无需在设备上更换服务器,只需在此页面选择需要的地区即可,可实现任意城市组合的混拨。</p>');
|
||
$("#huohu").append(res.ipmodel);
|
||
$("#huohu").append("<hr>");
|
||
$("#huohu").append(res.city);
|
||
|
||
}
|
||
});
|
||
}
|
||
},
|
||
checkLine(n) {
|
||
var that = this;
|
||
if (n==1){
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/index?user='+this.assign_account+'&password='+this.assign_pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
that.assign_add_list = res.data;
|
||
that.assign_list =res.list;
|
||
that.address_url = 'a.jkip.com'
|
||
that.line_text = '入口一'
|
||
}
|
||
});
|
||
}
|
||
if (n==2){
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/index2?user='+this.assign_account+'&password='+this.assign_pass,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
that.assign_add_list = res.data;
|
||
that.assign_list =res.list;
|
||
that.address_url = 'b.jkip.com'
|
||
that.line_text = '入口二'
|
||
}
|
||
});
|
||
}
|
||
},
|
||
selectAddAssign() {
|
||
if(this.productId == 19){
|
||
let address_checked = [];
|
||
$("input[name='citys[]']:checked").each(function(i){
|
||
address_checked.push($(this).val());
|
||
});
|
||
let ipmode = $("select[name='ipmode']").val();
|
||
console.log(address_checked)
|
||
console.log(ipmode)
|
||
|
||
let data = {
|
||
list:address_checked,
|
||
account:this.assign_account,
|
||
password:this.assign_pass,
|
||
ipmode:ipmode,
|
||
}
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/setAddress',
|
||
dataType: "json",
|
||
data:JSON.stringify(data),
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
if(res.code == 1){
|
||
alert('选择成功');
|
||
} else {
|
||
alert('选择失败');
|
||
}
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
}
|
||
if(this.productId == 1){
|
||
let address_checked = [];
|
||
$("input[name='poolids[]']:checked").each(function(i){
|
||
address_checked.push($(this).val());
|
||
});
|
||
|
||
let data = {
|
||
list:address_checked,
|
||
account:this.assign_account,
|
||
password:this.assign_pass,
|
||
}
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/qiangzi',
|
||
dataType: "json",
|
||
data:JSON.stringify(data),
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
if(res.code == 1){
|
||
alert('选择成功');
|
||
} else {
|
||
alert('选择失败');
|
||
}
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
}
|
||
if(this.productId == 17){
|
||
if(this.assign_list.length>20||this.assign_list.length==0){
|
||
alert('最多选择20个,至少选择一个!');
|
||
return;
|
||
}
|
||
let data = {
|
||
list:this.assign_list,
|
||
account:this.assign_account,
|
||
password:this.assign_pass,
|
||
}
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/selectXigua',
|
||
dataType: "json",
|
||
data:JSON.stringify(data),
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
if(res.code == 1){
|
||
alert('选择成功');
|
||
} else {
|
||
alert('选择失败');
|
||
}
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
}
|
||
if(this.productId == 13){
|
||
if(this.assign_list.length>20||this.assign_list.length==0){
|
||
alert('最多选择20个,至少选择一个!');
|
||
return;
|
||
}
|
||
let data = {
|
||
list:this.assign_list,
|
||
account:this.assign_account,
|
||
password:this.assign_pass,
|
||
}
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/product/AccountAddress/select',
|
||
dataType: "json",
|
||
data:JSON.stringify(data),
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
if(res.code == 1){
|
||
alert('选择成功');
|
||
} else {
|
||
alert('选择失败');
|
||
}
|
||
//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;
|
||
$("#showAddress").hide();
|
||
this.line_text = '';
|
||
this.onLineData = [];
|
||
},
|
||
killout: function (item) {
|
||
$("#online_status").text("正在踢线......");
|
||
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) {
|
||
$("#online_status").text("断开成功!");
|
||
that.online(item.ProductId, item.Account);
|
||
} else {
|
||
$("#online_status").text("断开失败!");
|
||
}
|
||
}
|
||
});
|
||
},
|
||
refund_reason(reason_info){
|
||
if(reason_info){
|
||
$(".refund-info").show();
|
||
reason = reason_info;
|
||
} else {
|
||
$(".refund-info").hide();
|
||
reason = '暂时用不到了';
|
||
}
|
||
$(".confirm-refund").removeAttr('disabled');
|
||
}
|
||
}
|
||
})
|
||
|
||
$(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 + "-" + reason,
|
||
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; }
|
||
$('#myModal').modal('show');
|
||
})
|
||
$(".confirm-refund").on('click', function () {
|
||
var accounts = [];
|
||
$.each($('input:checkbox:checked'), function () {
|
||
accounts.push($(this).val())
|
||
});
|
||
|
||
$('#myModal').modal('hide');
|
||
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-update-passwd").on('click', function () {
|
||
var accounts = [];
|
||
var accountModels = [];
|
||
var isrefund = false;
|
||
var product_flag = false;
|
||
|
||
var product_id = 0;
|
||
$.each($('input:checkbox:checked'), function () {
|
||
var ppip = $(this).attr('a-pid');
|
||
|
||
product_id = ppip;
|
||
|
||
var account = $(this).val();
|
||
if (account) {
|
||
var accountItem = {
|
||
account: account,
|
||
pid: $(this).attr('a-pid')
|
||
}
|
||
accountModels.push(accountItem)
|
||
accounts.push($(this).val())
|
||
var status = $(this).attr('a-status');
|
||
if (status == 'Refund') {
|
||
isrefund = true;
|
||
return;
|
||
}
|
||
}
|
||
|
||
if (ppip != '3' && ppip != '29' && ppip != '18' && ppip != '26' && (typeof ppip != 'undefined')) {
|
||
product_flag = true;
|
||
return;
|
||
}
|
||
});
|
||
|
||
if (product_flag) {alert('仅支持极狐、蘑菇、极光、猎豹');return;}
|
||
if (accountModels.length == 0) { alert('请选择账号'); return; }
|
||
if (!isSame(accountModels, 'pid')) { alert('必须选择相同的产品'); return; }
|
||
if (isrefund) { alert('退款账号暂不支持该操作'); return; }
|
||
|
||
$("#update_many_account").val(accounts.join(','));
|
||
$("#update_many_proid").val(product_id);
|
||
$("#update_many_passwd").show();
|
||
|
||
})
|
||
|
||
$(".quxiao_update_many").on('click', function () {
|
||
$("#update_many_passwd").hide();
|
||
})
|
||
|
||
$("#update_many_submit").on('click', function () {
|
||
$("#update_many_passwd").hide();
|
||
let data = {
|
||
cookie:document.cookie,
|
||
accounts:$("#update_many_account").val(),
|
||
pwd:$("#update_many_pwd").val(),
|
||
productId:$("#update_many_proid").val()
|
||
}
|
||
$.ajax({
|
||
type: 'POST',
|
||
url: 'https://php-api.juip.com/product/account/updatePasswd',
|
||
dataType: "json",
|
||
data:JSON.stringify(data),
|
||
contentType: "application/json",
|
||
success: function (res) {
|
||
if(res.Code == 10000){
|
||
alert('修改成功');
|
||
window.location.reload();
|
||
} else {
|
||
alert('修改失败');
|
||
}
|
||
//if (res.Code == 10000) {
|
||
// that.onLineData = res.Data;
|
||
// for (var i = 0; i < that.onLineData.length; i++) {
|
||
// that.onLineData[i].ProductId = productId;
|
||
// }
|
||
//}
|
||
}
|
||
});
|
||
})
|
||
|
||
//续费
|
||
$(".btn-rebuy").on('click', function () {
|
||
var accounts = [];
|
||
var accountModels = [];
|
||
var isTest = false
|
||
var isrefund = false;
|
||
var product_type_shuidi = '';//0:静态 1:固态
|
||
var flag = 0;
|
||
$.each($('input:checkbox:checked'), function () {
|
||
var ppip = $(this).attr('a-pid');
|
||
if (ppip == '28') {
|
||
var type = $(this).attr('a-package').split('-')[0];
|
||
if (product_type_shuidi != '') {
|
||
if (product_type_shuidi != type) {
|
||
flag = 1;
|
||
}
|
||
} else {
|
||
product_type_shuidi = type;
|
||
}
|
||
}
|
||
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;
|
||
var status = $(this).attr('a-status');
|
||
if (status == 'Refund') {
|
||
isrefund = true;
|
||
return;
|
||
}
|
||
}
|
||
});
|
||
if (flag) {
|
||
alert('静态、固态不同类型无法续费!');
|
||
return;
|
||
}
|
||
if (accountModels.length == 0) { alert('请选择账号'); return; }
|
||
if (!isSame(accountModels, 'pid')) { alert('必须选择相同的产品'); return; }
|
||
if (!isSame(accountModels, 'connectCount')) { alert('必须选择相同的连接数'); return; }
|
||
if (isTest) { alert('测试账号暂不支持续费,请新开正式账号'); return; }
|
||
if (isrefund) { 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>
|