无极独享
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div class="cpList">
|
<div class="cpList">
|
||||||
<ul>
|
<ul>
|
||||||
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9))
|
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9&& m.Id != 20))
|
||||||
{
|
{
|
||||||
<li v-on:click="select_product(@item.Id)" id="product-@item.Id" class="item @(item.Id==pid?"cpActive":"")" a-pid="@item.Id" a-name="@item.Name">@item.Name</li>
|
<li v-on:click="select_product(@item.Id)" id="product-@item.Id" class="item @(item.Id==pid?"cpActive":"")" a-pid="@item.Id" a-name="@item.Name">@item.Name</li>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,6 +110,17 @@
|
|||||||
<button type="button" onclick="ttgaoji()" class="btn btn-default btn-lg" style="background-color: #FF9900;">高级版</button>
|
<button type="button" onclick="ttgaoji()" class="btn btn-default btn-lg" style="background-color: #FF9900;">高级版</button>
|
||||||
<button type="button" onclick="ttputong()" class="btn btn-default btn-lg" style="background-color: #FF9900;">普通版</button>
|
<button type="button" onclick="ttputong()" class="btn btn-default btn-lg" style="background-color: #FF9900;">普通版</button>
|
||||||
</div>
|
</div>
|
||||||
|
@if (item.Product.Id == 20) {
|
||||||
|
<div>
|
||||||
|
<button type="button" onclick="wjdxphone()" class="btn btn-default btn-lg" style="background-color: #FF9900;">安卓/苹果</button>
|
||||||
|
<button type="button" onclick="wjdxpc()" class="btn btn-default btn-lg" style="background-color: #FF9900;">电脑</button>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div>
|
||||||
|
<button type="button" onclick="wjdxpt()" class="btn btn-default btn-lg" style="background-color: #FF9900;">普通版-5兆</button>
|
||||||
|
<button type="button" onclick="wjdxgj()" class="btn btn-default btn-lg" style="background-color: #FF9900;">高端版-10兆</button>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(".p_type").hide();
|
$(".p_type").hide();
|
||||||
@@ -158,6 +169,73 @@
|
|||||||
$("#package-"+i).hide();
|
$("#package-"+i).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var wjdxtype = 1;
|
||||||
|
function wjdxphone() {
|
||||||
|
wjdxtype = 1;
|
||||||
|
for (var i=1048;i<1051;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
for (var i=1051;i<1060;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wjdxphone();
|
||||||
|
|
||||||
|
function wjdxpc() {
|
||||||
|
wjdxtype = 2;
|
||||||
|
for (var i=1048;i<1054;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1057;i<1060;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1054;i<1057;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function wjdxpt() {
|
||||||
|
if (wjdxtype == 1) {
|
||||||
|
for (var i=1051;i<1060;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1048;i<1051;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
} else if (wjdxtype == 2) {
|
||||||
|
for (var i=1048;i<1054;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1054;i<1057;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i=1057;i<1060;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function wjdxgj() {
|
||||||
|
if (wjdxtype == 1) {
|
||||||
|
for (var i=1048;i<1051;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1051;i<1054;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i=1054;i<1060;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
} else if (wjdxtype == 2) {
|
||||||
|
for (var i=1048;i<1057;i++){
|
||||||
|
$("#package-"+i).hide();
|
||||||
|
}
|
||||||
|
for (var i=1057;i<1060;i++){
|
||||||
|
$("#package-"+i).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<p style="color: #ec6e58;font-size:30px;font-weight: bold;background-color:#FFFF00">
|
<p style="color: #ec6e58;font-size:30px;font-weight: bold;background-color:#FFFF00">
|
||||||
需求5个以上,可以联系客服设置优惠价;
|
需求5个以上,可以联系客服设置优惠价;
|
||||||
|
|||||||
@@ -30,10 +30,16 @@
|
|||||||
<div class="item">
|
<div class="item">
|
||||||
@*<p><img src="@P(item.Image)"></p>*@
|
@*<p><img src="@P(item.Image)"></p>*@
|
||||||
<p>@item.Name</p>
|
<p>@item.Name</p>
|
||||||
<p><a href="@item.SimulatorDownloadUrl"> <button type="button" class="btnBlue">SSTP客户端下载</button></a></p>
|
@if (item.Id != 20){
|
||||||
|
<p><a href="@item.SimulatorDownloadUrl"> <button type="button" class="btnBlue">SSTP客户端下载</button></a></p>
|
||||||
|
}
|
||||||
@if (!string.IsNullOrEmpty(item.DroidDownloadUrl)){
|
@if (!string.IsNullOrEmpty(item.DroidDownloadUrl)){
|
||||||
<p><a href="@item.DroidDownloadUrl"> <button type="button" class="btnBlue">安卓APP</button></a></p>
|
<p><a href="@item.DroidDownloadUrl"> <button type="button" class="btnBlue">安卓APP</button></a></p>
|
||||||
<br>
|
<br>
|
||||||
|
} else if (item.Id == 20) {
|
||||||
|
<p><a href="http://wuxinxikehuduan.image.qiangzipptp.top/%E6%97%A0%E6%9E%81%E5%AE%89%E5%8D%93-%E5%85%B1%E4%BA%AB%E7%8B%AC%E4%BA%AB%E9%80%9A%E7%94%A8.apk"> <button type="button" class="btnBlue">无极安卓共享独享通用</button></a></p>
|
||||||
|
|
||||||
|
<p><a href="https://apps.apple.com/cn/app/jie-zou-da-shi/id1448657437"> <button type="button" class="btnBlue">ios客户端</button></a></p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
<span class="lineBar"></span>余额
|
<span class="lineBar"></span>余额
|
||||||
<button class="btnXq" onclick="$('#chargeBox').show()">充值</button>
|
<button class="btnXq" onclick="$('#chargeBox').show()">充值</button>
|
||||||
<button class="btnXq" id="cash_out_confirm" onclick="tixian()">提现</button>
|
<button class="btnXq" id="cash_out_confirm" onclick="tixian()">提现</button>
|
||||||
<button class="btnXq" onclick="$('#money-change').show()">资金转移</button>
|
@* <button class="btnXq" onclick="$('#money-change').show()">资金转移</button> *@
|
||||||
</div>
|
</div>
|
||||||
<div class="model">
|
<div class="model">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<p style="text-align: center;font-size: 20px;">*聚IP商城全线服务器都已更新,可显示实时维护状态及服务器负载情况*</p>
|
<p style="text-align: center;font-size: 20px;">*聚IP商城全线服务器都已更新,可显示实时维护状态及服务器负载情况*</p>
|
||||||
<p class="xianluIntro" style="text-align: center;font-size: 25px;">*线路表和账号必须为同一产品才能使用。</p>
|
<p class="xianluIntro" style="text-align: center;font-size: 25px;">*线路表和账号必须为同一产品才能使用。</p>
|
||||||
<div class="xianlu">
|
<div class="xianlu">
|
||||||
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9))
|
@foreach (var item in product.Where(m => m.Id != 3 && m.Id != 7 && m.Id != 9&& m.Id != 20))
|
||||||
{
|
{
|
||||||
<div v-on:click="select_product(@item.Id)" id="product-@item.Id" class="item @(item.Id==pid?"blueLine":"")" a-pid="@item.Id" a-name="@item.Name">
|
<div v-on:click="select_product(@item.Id)" id="product-@item.Id" class="item @(item.Id==pid?"blueLine":"")" a-pid="@item.Id" a-name="@item.Name">
|
||||||
<span>@item.Name</span><img src="~/img/check.png">
|
<span>@item.Name</span><img src="~/img/check.png">
|
||||||
|
|||||||
@@ -393,7 +393,7 @@
|
|||||||
}
|
}
|
||||||
else if(item.Product.Id == 20) {
|
else if(item.Product.Id == 20) {
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button type="button" class="btn dropdown-toggle" style="width: 99%;height:100%;background:white;padding:0;" id="dropdownMenu2" data-toggle="dropdown"><div style="font-size: 18px;" class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;"></span></div>
|
<button type="button" class="btn dropdown-toggle" style="width: 99%;height:100%;background:white;padding:0;" id="dropdownMenu2" data-toggle="dropdown"><div style="font-size: 18px;" class="productItem" id="@("p"+item.Product.Id)" a-pid="@item.Product.Id"><span style="color: #f64e3d;font-weight:bold;padding-right: 5px;">新</span>@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;"></span></div>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
|
||||||
<li role="presentation">
|
<li role="presentation">
|
||||||
@@ -539,10 +539,11 @@
|
|||||||
|
|
||||||
|
|
||||||
@if(item.Product.Id == 20){
|
@if(item.Product.Id == 20){
|
||||||
|
<p class="youhuiNew" style="color: #0066CC;">购买后请联系客服授权登录</p>
|
||||||
<div style="padding-top:10px;">
|
<div style="padding-top:10px;">
|
||||||
<ul class="nav nav-tabs nav-justified" style="margin-top:0;">
|
<ul class="nav nav-tabs nav-justified" style="margin-top:0;">
|
||||||
<li class="active"><a style="width: 500px;" onclick="wjdxpt()">普通版</a></li>
|
<li id="wjdxpt" class="active"><a style="width: 500px;" onclick="wjdxpt()">普通版-5兆</a></li>
|
||||||
<li><a style="width: 500px;" onclick="wjdxgj()">高端版</a></li>
|
<li id="wjdxgd"><a style="width: 500px;" onclick="wjdxgj()">高端版-10兆</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -865,6 +866,8 @@
|
|||||||
//1 安卓、苹果 2 pc
|
//1 安卓、苹果 2 pc
|
||||||
var wjdxtype = 1;
|
var wjdxtype = 1;
|
||||||
function wjdxphone() {
|
function wjdxphone() {
|
||||||
|
$("#wjdxgd").removeClass("active");
|
||||||
|
$("#wjdxpt").addClass("active");
|
||||||
wjdxtype = 1;
|
wjdxtype = 1;
|
||||||
for (var i=1048;i<1051;i++){
|
for (var i=1048;i<1051;i++){
|
||||||
$("#pkg"+i).show();
|
$("#pkg"+i).show();
|
||||||
@@ -875,6 +878,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wjdxpc() {
|
function wjdxpc() {
|
||||||
|
$("#wjdxgd").removeClass("active");
|
||||||
|
$("#wjdxpt").addClass("active");
|
||||||
wjdxtype = 2;
|
wjdxtype = 2;
|
||||||
for (var i=1048;i<1054;i++){
|
for (var i=1048;i<1054;i++){
|
||||||
$("#pkg"+i).hide();
|
$("#pkg"+i).hide();
|
||||||
@@ -887,6 +892,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function wjdxpt() {
|
function wjdxpt() {
|
||||||
|
$("#wjdxgd").removeClass("active");
|
||||||
|
$("#wjdxpt").addClass("active");
|
||||||
if (wjdxtype == 1) {
|
if (wjdxtype == 1) {
|
||||||
for (var i=1051;i<1060;i++){
|
for (var i=1051;i<1060;i++){
|
||||||
$("#pkg"+i).hide();
|
$("#pkg"+i).hide();
|
||||||
@@ -908,6 +915,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function wjdxgj() {
|
function wjdxgj() {
|
||||||
|
$("#wjdxgd").addClass("active");
|
||||||
|
$("#wjdxpt").removeClass("active");
|
||||||
if (wjdxtype == 1) {
|
if (wjdxtype == 1) {
|
||||||
for (var i=1048;i<1051;i++){
|
for (var i=1048;i<1051;i++){
|
||||||
$("#pkg"+i).hide();
|
$("#pkg"+i).hide();
|
||||||
|
|||||||
@@ -29,13 +29,21 @@
|
|||||||
{
|
{
|
||||||
<div class="sitem">
|
<div class="sitem">
|
||||||
<div class="smodel">
|
<div class="smodel">
|
||||||
<div class="softName" style="width:200px;text-align:center;height:50px;">
|
|
||||||
@item.Name
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="item">
|
@if (item.Id == 20)
|
||||||
<a href="@item.PcClientDownloadUrl"> <button type="button" class="btn btn-sdefault">Windows</button></a>
|
{
|
||||||
</div>
|
<div class="softName" style="width:200px;text-align:center;height:50px;">
|
||||||
|
无极-共享独享通用
|
||||||
|
</div>
|
||||||
|
} else {
|
||||||
|
<div class="softName" style="width:200px;text-align:center;height:50px;">
|
||||||
|
@item.Name
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<a href="@item.PcClientDownloadUrl"> <button type="button" class="btn btn-sdefault">Windows</button></a>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(item.DroidDownloadUrl))
|
@if (!string.IsNullOrEmpty(item.DroidDownloadUrl))
|
||||||
{
|
{
|
||||||
<div class="item" >
|
<div class="item" >
|
||||||
@@ -43,12 +51,32 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
}
|
}
|
||||||
@if (item.Id != 3 && item.Id != 7 && item.Id != 9 && item.Id != 12)
|
@if (item.Id != 3 && item.Id != 7 && item.Id != 9 && item.Id != 12 && item.Id != 20)
|
||||||
{
|
{
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<a href="@item.SimulatorDownloadUrl"> <button type="button" class="btn btn-sdefault">SSTP客户端</button></a>
|
<a href="@item.SimulatorDownloadUrl"> <button type="button" class="btn btn-sdefault">SSTP客户端</button></a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (item.Id == 20)
|
||||||
|
{
|
||||||
|
<div class="item">
|
||||||
|
<a href="http://wuxinxikehuduan.image.qiangzipptp.top/%E6%97%A0%E6%9E%81%E5%AE%89%E5%8D%93-%E5%85%B1%E4%BA%AB%E7%8B%AC%E4%BA%AB%E9%80%9A%E7%94%A8.apk"> <button type="button" class="btn btn-sdefault">无极安卓<br>共享独享通用</button></a>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<a href="http://wuxinxikehuduan.image.qiangzipptp.top/%E6%97%A0%E6%9E%81%E7%94%B5%E8%84%91-%E5%85%B1%E4%BA%AB%E7%8B%AC%E4%BA%AB%E9%80%9A%E7%94%A8.exe"> <button type="button" class="btn btn-sdefault">无极电脑<br>共享独享通用</button></a>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="item">
|
||||||
|
<a id="ios_cc"> <button type="button" class="btn btn-sdefault">扫描下载<br>苹果客户端</button></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="qrcode_s">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<p>免安装,下载后直接打开</p>
|
<p>免安装,下载后直接打开</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -115,3 +143,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
$("#ios_cc").hover(function(){
|
||||||
|
$("#qrcode_s").html('');
|
||||||
|
new QRCode(document.getElementById("qrcode_s"), {
|
||||||
|
text: 'https://apps.apple.com/cn/app/jie-zou-da-shi/id1448657437',
|
||||||
|
width : 500,
|
||||||
|
height : 500
|
||||||
|
});
|
||||||
|
},function(){
|
||||||
|
$("#qrcode_s").html('');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -489,7 +489,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-3">
|
<div class="col-lg-3">
|
||||||
<div class="zhanghu">
|
<div class="zhanghu">
|
||||||
<div class="accout_tit"><span class="lineBar"></span>余额<span onclick="$('.money-change').show()" style="float: right;color:blue;cursor:pointer;">资金转移</span></div>
|
<div class="accout_tit"><span class="lineBar"></span>余额</div>
|
||||||
<p class="charge" onclick="tixian()" style="float:left;font-size:25px;"><a>提现</a></p>
|
<p class="charge" onclick="tixian()" style="float:left;font-size:25px;"><a>提现</a></p>
|
||||||
<p class="charge" onclick="$('.chargeList').show()" style="font-size:25px;"><a>充值</a></p>
|
<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>
|
<div class="money" style="padding: 20px 30px;">¥<span>@Model.UserModel.RestAmount</span></div>
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ namespace Hncore.Pass.BaseInfo.Service
|
|||||||
return new ApiResult(ResultCode.C_SUCCESS,"重置成功");
|
return new ApiResult(ResultCode.C_SUCCESS,"重置成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<ApiResult> UpdateAmount(UpdateAmountRequest request)
|
public async Task<ApiResult> UpdateAmount(UpdateAmountRequest request,String product="",String package="",String account="")
|
||||||
{
|
{
|
||||||
using (await _mutex1.LockAsync())
|
using (await _mutex1.LockAsync())
|
||||||
{
|
{
|
||||||
@@ -258,7 +258,10 @@ namespace Hncore.Pass.BaseInfo.Service
|
|||||||
if (request.Amount <= 0)
|
if (request.Amount <= 0)
|
||||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "金额必须大于0");
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "金额必须大于0");
|
||||||
|
|
||||||
|
var remark = request.AttchInfo;
|
||||||
|
if (product != "") {
|
||||||
|
remark = product+"-"+package+"-"+account;
|
||||||
|
}
|
||||||
|
|
||||||
var userScore = new UserScore()
|
var userScore = new UserScore()
|
||||||
{
|
{
|
||||||
@@ -267,7 +270,7 @@ namespace Hncore.Pass.BaseInfo.Service
|
|||||||
ScoreType = request.OpAmountType,
|
ScoreType = request.OpAmountType,
|
||||||
ScoreValue = request.Amount,
|
ScoreValue = request.Amount,
|
||||||
ScoreTypeName = request.OpAmountType.GetEnumDisplayName(),
|
ScoreTypeName = request.OpAmountType.GetEnumDisplayName(),
|
||||||
Remark = request.AttchInfo,
|
Remark = remark,
|
||||||
OperateUserName = request.OperateUserName
|
OperateUserName = request.OperateUserName
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
534
Services/Hncore.Pass.Vpn/Service/AgentClient15Service.cs
Normal file
534
Services/Hncore.Pass.Vpn/Service/AgentClient15Service.cs
Normal file
@@ -0,0 +1,534 @@
|
|||||||
|
using AngleSharp.Html.Parser;
|
||||||
|
using Hncore.Infrastructure.Common;
|
||||||
|
using Hncore.Infrastructure.Extension;
|
||||||
|
using Hncore.Infrastructure.Serializer;
|
||||||
|
using Hncore.Infrastructure.WebApi;
|
||||||
|
using Hncore.Pass.Vpn.Model;
|
||||||
|
using Hncore.Pass.Vpn.Request.Product;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Text;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
namespace Hncore.Pass.Vpn.Service
|
||||||
|
{
|
||||||
|
public class AgentClient15Service:AgentClientBaseService
|
||||||
|
{
|
||||||
|
string LoginUrl { get; set; } = "api/login";
|
||||||
|
string LoginCodeUrl { get; set; } = "main/imgcode.html";
|
||||||
|
string RefrushTokenUrl { get; set; } = "agent/index.html";
|
||||||
|
string SingleAddUrl { get; set; } = "api/number";
|
||||||
|
string SingleReAddUrl { get; set; } = "api/number/renew";
|
||||||
|
string MuiltAddUrl { get; set; } = "agent/memberMuiltAdd.html";
|
||||||
|
string RefundUrl { get; set; } = "api/number/refund";
|
||||||
|
string UpdateUrl = "api/number/";//agent/memberUpdate/id/1155709.html
|
||||||
|
string OnlineUrl { get; set; } = "api/numberLine/";
|
||||||
|
string KIllUrl { get; set; } = "api/numberOffline";
|
||||||
|
string searchAccountUrl = "api/numberSingle/";
|
||||||
|
string searchTestAccountUrl = "api/numberSingle/";
|
||||||
|
string DeleteUrl { get; set; } = "api/number/refund";//1160862.html";
|
||||||
|
IHttpClientFactory m_HttpClientFactory;
|
||||||
|
public AgentClient15Service(IHttpClientFactory httpClientFactory):base(httpClientFactory)
|
||||||
|
{
|
||||||
|
m_HttpClientFactory = httpClientFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task<int> RefrushStatus()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
public override async Task<(byte[], string)> GetCode()
|
||||||
|
{
|
||||||
|
var client = CreateHttpClient(false);
|
||||||
|
if (this.LoginUrl.NotHas()) return (null, "");
|
||||||
|
var getResp = await client.GetAsync(this.LoginUrl);
|
||||||
|
var cookie = this.GetCookie(getResp, "PHPSESSID");
|
||||||
|
if (cookie.Has())
|
||||||
|
{
|
||||||
|
client.DefaultRequestHeaders.Add("Cookie", cookie);
|
||||||
|
var ret = await client.GetByteArrayAsync(this.LoginCodeUrl + "?t=" + DateTime.Now.Millisecond);
|
||||||
|
return (ret, cookie);
|
||||||
|
}
|
||||||
|
return (null, "");
|
||||||
|
}
|
||||||
|
public override async Task<ApiResult> Login(AgentLoginRequest request)
|
||||||
|
{
|
||||||
|
return new ApiResult(request.Key);
|
||||||
|
}
|
||||||
|
public override bool CheckAccount(int productId,List<string> accounts)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新开
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="packageId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <param name="pwd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult> NewAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1, int payCount = 1)
|
||||||
|
{
|
||||||
|
string[] arrStr = packageKey.Split('.');
|
||||||
|
var time =arrStr[0];
|
||||||
|
var type =arrStr[1];
|
||||||
|
var speed =arrStr[2];
|
||||||
|
|
||||||
|
|
||||||
|
// 获取token
|
||||||
|
var url = "api/auth/access_token";
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var map = new Dictionary<string, string>(){
|
||||||
|
{"app_id","416" },
|
||||||
|
{"app_key","882453f7cdb7525a4362d1776e937086" },
|
||||||
|
};
|
||||||
|
var resp = await client.PostAsForm(url, map);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var token = jo["data"]["access_token"];
|
||||||
|
//正式请求
|
||||||
|
var url_p = "api/user/user_add_rand";
|
||||||
|
var client_p = CreateHttpClient();
|
||||||
|
var map_p = new Dictionary<string, string>(){
|
||||||
|
{"access_token",token.ToString() },
|
||||||
|
{"username",account},
|
||||||
|
{"userpass",pwd},
|
||||||
|
{"qq","123456789"},
|
||||||
|
{"time",time},
|
||||||
|
{"num","1"},
|
||||||
|
{"type",type},
|
||||||
|
{"ip","1"},
|
||||||
|
{"remark","api开通"},
|
||||||
|
{"speed",speed},
|
||||||
|
};
|
||||||
|
var resp_p = await client_p.PostAsForm(url_p, map_p);
|
||||||
|
var content_p = await resp_p.Content.ReadAsStringAsync();
|
||||||
|
JObject jo_p = (JObject)JsonConvert.DeserializeObject(content_p);
|
||||||
|
Console.WriteLine("========================================开号============================================");
|
||||||
|
Console.WriteLine(content_p);
|
||||||
|
Console.WriteLine(jo_p);
|
||||||
|
Console.WriteLine("=====================================================================================");
|
||||||
|
var status = jo_p["data"]["addnew"].ToString();
|
||||||
|
if (status =="1")
|
||||||
|
{
|
||||||
|
return new ApiResult(ResultCode.C_SUCCESS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新开
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="packageId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <param name="pwd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult> NewMuiltAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1,int startNum=0, int endNum=1 )
|
||||||
|
{
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var map = new Dictionary<string, string>(){
|
||||||
|
{"group","single" },
|
||||||
|
{"number",account },
|
||||||
|
{"password",pwd },
|
||||||
|
{"connect",connCount.ToString()},
|
||||||
|
{"interval","1"},
|
||||||
|
{"type",packageKey},
|
||||||
|
{"body","api"},
|
||||||
|
{"mobile","13073735878"}
|
||||||
|
};
|
||||||
|
var title = GetOpTitle("NewAccount", account);
|
||||||
|
LogHelper.Info(title, map.ToJson());
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var resp = await client.PostAsForm(this.SingleAddUrl, map);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["status"].ToString();
|
||||||
|
if (status =="400")
|
||||||
|
{
|
||||||
|
return new ApiResult(ResultCode.C_SUCCESS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.Error(title, content);
|
||||||
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Error(title, ex.Message);
|
||||||
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 续费
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <param name="pwd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult> NewReAccount(string packageKey, string account, int connCount, int payCount = 1)
|
||||||
|
{
|
||||||
|
|
||||||
|
string[] arrStr = packageKey.Split('.');
|
||||||
|
var time =arrStr[0];
|
||||||
|
var type =arrStr[1];
|
||||||
|
var speed =arrStr[2];
|
||||||
|
|
||||||
|
// 获取token
|
||||||
|
var url = "api/auth/access_token";
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var map = new Dictionary<string, string>(){
|
||||||
|
{"app_id","416" },
|
||||||
|
{"app_key","882453f7cdb7525a4362d1776e937086" },
|
||||||
|
};
|
||||||
|
var resp = await client.PostAsForm(url, map);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var token = jo["data"]["access_token"];
|
||||||
|
//正式请求
|
||||||
|
var url_p = "api/user/user_renew_vpn";
|
||||||
|
var client_p = CreateHttpClient();
|
||||||
|
var map_p = new Dictionary<string, string>(){
|
||||||
|
{"access_token",token.ToString() },
|
||||||
|
{"username[]",account},
|
||||||
|
{"days",time},
|
||||||
|
};
|
||||||
|
var resp_p = await client_p.PostAsForm(url_p, map_p);
|
||||||
|
var content_p = await resp_p.Content.ReadAsStringAsync();
|
||||||
|
JObject jo_p = (JObject)JsonConvert.DeserializeObject(content_p);
|
||||||
|
Console.WriteLine("========================================开号============================================");
|
||||||
|
Console.WriteLine(content_p);
|
||||||
|
Console.WriteLine(jo_p);
|
||||||
|
Console.WriteLine("=====================================================================================");
|
||||||
|
var status = jo_p["data"]["renew"].ToString();
|
||||||
|
if (status =="1")
|
||||||
|
{
|
||||||
|
return new ApiResult(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "续费失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 删除账号
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<bool> DeleteAccount(string account)
|
||||||
|
{
|
||||||
|
Random rd = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
int i = rd.Next();
|
||||||
|
|
||||||
|
var time_s = DateTime.Now.GetUnixTimeStamp();
|
||||||
|
var agentid = "admin1";
|
||||||
|
var nonce = MD5(time_s.ToString()) + i.ToString();
|
||||||
|
var apikey = "b220b83508db57f44e5ce86a7b34cae9";
|
||||||
|
var sign = MD5(time_s+nonce+apikey);
|
||||||
|
|
||||||
|
|
||||||
|
var url = "/api/raduserRefund?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account;
|
||||||
|
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
|
||||||
|
var resp = await client.GetAsync(url);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
Console.WriteLine("==============================================================");
|
||||||
|
Console.WriteLine(content);
|
||||||
|
Console.WriteLine("==============================================================");
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["errcode"].ToString();
|
||||||
|
|
||||||
|
if (status =="0")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 得到账号信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult<OriginAccountModel>> GetAccountInfo(string account,bool isTest=false)
|
||||||
|
{
|
||||||
|
|
||||||
|
Random rd = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
int i = rd.Next();
|
||||||
|
|
||||||
|
var time_s = DateTime.Now.GetUnixTimeStamp();
|
||||||
|
var agentid = "admin1";
|
||||||
|
var nonce = MD5(time_s.ToString()) + i.ToString();
|
||||||
|
var apikey = "b220b83508db57f44e5ce86a7b34cae9";
|
||||||
|
var sign = MD5(time_s+nonce+apikey);
|
||||||
|
|
||||||
|
var url = "/api/raduserInfo?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account;
|
||||||
|
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
|
||||||
|
var resp = await client.GetAsync(url);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["errcode"].ToString();
|
||||||
|
var data = jo["data"];
|
||||||
|
if (status =="0")
|
||||||
|
{
|
||||||
|
var trData = new OriginAccountModel
|
||||||
|
{
|
||||||
|
Id = "",
|
||||||
|
Account = data["username"].ToString(),
|
||||||
|
Pwd = data["password"].ToString(),
|
||||||
|
AccountType = "",
|
||||||
|
Package = "",
|
||||||
|
ConnectCount = "",
|
||||||
|
RegistTime = data["createtime"].ToString(),
|
||||||
|
EndTime = data["expiretime"].ToString(),
|
||||||
|
RestTime = "",
|
||||||
|
Amount = "",
|
||||||
|
Remark = "",
|
||||||
|
};
|
||||||
|
return new ApiResult<OriginAccountModel>(trData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ApiResult<OriginAccountModel>(ResultCode.C_INVALID_ERROR, "没有查询到信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 修改账号密码
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <param name="pwd"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<bool> UpdateAccountPwd(string account, string pwd)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 获取token
|
||||||
|
var url = "api/auth/access_token";
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var map = new Dictionary<string, string>(){
|
||||||
|
{"app_id","416" },
|
||||||
|
{"app_key","882453f7cdb7525a4362d1776e937086" },
|
||||||
|
};
|
||||||
|
var resp = await client.PostAsForm(url, map);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var token = jo["data"]["access_token"];
|
||||||
|
//正式请求
|
||||||
|
var url_p = "api/user/user_repass";
|
||||||
|
var client_p = CreateHttpClient();
|
||||||
|
var map_p = new Dictionary<string, string>(){
|
||||||
|
{"access_token",token.ToString() },
|
||||||
|
{"username",account},
|
||||||
|
{"newpass",pwd},
|
||||||
|
};
|
||||||
|
var resp_p = await client_p.PostAsForm(url_p, map_p);
|
||||||
|
var content_p = await resp_p.Content.ReadAsStringAsync();
|
||||||
|
JObject jo_p = (JObject)JsonConvert.DeserializeObject(content_p);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 退款
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="packageId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult> Refund(string account, string packageKey, int days)
|
||||||
|
{
|
||||||
|
Random rd = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
int i = rd.Next();
|
||||||
|
|
||||||
|
var time_s = DateTime.Now.GetUnixTimeStamp();
|
||||||
|
var agentid = "admin1";
|
||||||
|
var nonce = MD5(time_s.ToString()) + i.ToString();
|
||||||
|
var apikey = "b220b83508db57f44e5ce86a7b34cae9";
|
||||||
|
var sign = MD5(time_s+nonce+apikey);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var url = "/api/raduserRefund?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account;
|
||||||
|
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
|
||||||
|
var resp = await client.GetAsync(url);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
Console.WriteLine("==============================================================");
|
||||||
|
Console.WriteLine(content);
|
||||||
|
Console.WriteLine("==============================================================");
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["errcode"].ToString();
|
||||||
|
|
||||||
|
if (status =="0")
|
||||||
|
{
|
||||||
|
return new ApiResult(1);
|
||||||
|
}
|
||||||
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "退款失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 是否在线
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<ApiResult<List<OriginAccountOnlineModel>>> OnLine(string account)
|
||||||
|
{
|
||||||
|
|
||||||
|
Random rd = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
int i = rd.Next();
|
||||||
|
|
||||||
|
var time_s = DateTime.Now.GetUnixTimeStamp();
|
||||||
|
var agentid = "admin1";
|
||||||
|
var nonce = MD5(time_s.ToString()) + i.ToString();
|
||||||
|
var apikey = "b220b83508db57f44e5ce86a7b34cae9";
|
||||||
|
var sign = MD5(time_s+nonce+apikey);
|
||||||
|
|
||||||
|
var url = "/api/raduserAcct?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account;
|
||||||
|
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
|
||||||
|
var resp = await client.GetAsync(url);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["errcode"].ToString();
|
||||||
|
var retData = new List<OriginAccountOnlineModel>();
|
||||||
|
if (status =="0")
|
||||||
|
{
|
||||||
|
if(jo.ContainsKey("data")){
|
||||||
|
foreach (var tr in jo["data"])
|
||||||
|
{
|
||||||
|
JObject jsondata = (JObject)JsonConvert.DeserializeObject(tr.ToJson());
|
||||||
|
|
||||||
|
var trData = new OriginAccountOnlineModel
|
||||||
|
{
|
||||||
|
Account = account,
|
||||||
|
ServerIP = jsondata["serverip"].ToString(),
|
||||||
|
LoginTime = jsondata["starttime"].ToString(),
|
||||||
|
OnlineTime = "",
|
||||||
|
LoginIP = jsondata["framedip"].ToString(),
|
||||||
|
UpStream = "",
|
||||||
|
DownStream = "",
|
||||||
|
Id= "{account:\""+account+"\",radacctid:\""+jsondata["radacctid"].ToString()+"\"}",
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
retData.Add(trData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ApiResult<List<OriginAccountOnlineModel>>(retData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new ApiResult<List<OriginAccountOnlineModel>>(ResultCode.C_INVALID_ERROR, "查询失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 踢号
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="productId"></param>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<bool> KillOut( string id)
|
||||||
|
{
|
||||||
|
|
||||||
|
Random rd = new Random(Guid.NewGuid().GetHashCode());
|
||||||
|
int i = rd.Next();
|
||||||
|
|
||||||
|
var time_s = DateTime.Now.GetUnixTimeStamp();
|
||||||
|
var agentid = "admin1";
|
||||||
|
var nonce = MD5(time_s.ToString()) + i.ToString();
|
||||||
|
var apikey = "b220b83508db57f44e5ce86a7b34cae9";
|
||||||
|
var sign = MD5(time_s+nonce+apikey);
|
||||||
|
|
||||||
|
JObject userinfo = (JObject)JsonConvert.DeserializeObject(id);
|
||||||
|
|
||||||
|
var url = "/api/raduserDisconnect?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+userinfo["account"]+"&radacctid="+userinfo["radacctid"];
|
||||||
|
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var title = GetOpTitle("KillOut", id);
|
||||||
|
var info = "";
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
var resp = await client.GetAsync(url);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var status = jo["errcode"].ToString();
|
||||||
|
if (status =="0")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.Error(title, ex.Message + "-->info:" + info);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否存在
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="account"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override async Task<bool> Exist(string account)
|
||||||
|
{
|
||||||
|
|
||||||
|
// 获取token
|
||||||
|
var url = "api/auth/access_token";
|
||||||
|
var client = CreateHttpClient();
|
||||||
|
var map = new Dictionary<string, string>(){
|
||||||
|
{"app_id","416" },
|
||||||
|
{"app_key","882453f7cdb7525a4362d1776e937086" },
|
||||||
|
};
|
||||||
|
var resp = await client.PostAsForm(url, map);
|
||||||
|
var content = await resp.Content.ReadAsStringAsync();
|
||||||
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
|
var token = jo["data"]["access_token"];
|
||||||
|
Console.WriteLine("========================================12321=============================================");
|
||||||
|
Console.WriteLine(token);
|
||||||
|
Console.WriteLine("=====================================================================================");
|
||||||
|
return true;
|
||||||
|
//正式请求
|
||||||
|
var url_p = "api/auth/check_user";
|
||||||
|
var client_p = CreateHttpClient();
|
||||||
|
var map_p = new Dictionary<string, string>(){
|
||||||
|
{"access_token",token.ToString() },
|
||||||
|
{"username",account},
|
||||||
|
};
|
||||||
|
var resp_p = await client_p.PostAsForm(url_p, map_p);
|
||||||
|
var content_p = await resp_p.Content.ReadAsStringAsync();
|
||||||
|
JObject jo_p = (JObject)JsonConvert.DeserializeObject(content_p);
|
||||||
|
var is_exit = jo_p["data"]["check"];
|
||||||
|
if (is_exit.ToString() =="1")
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -71,6 +71,8 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
agent = new AgentClient13Service(m_HttpClientFactory) { ClientName = product.GroupNO };
|
agent = new AgentClient13Service(m_HttpClientFactory) { ClientName = product.GroupNO };
|
||||||
if (product.GroupNO == "g14")
|
if (product.GroupNO == "g14")
|
||||||
agent = new AgentClient14Service(m_HttpClientFactory) { ClientName = product.GroupNO };
|
agent = new AgentClient14Service(m_HttpClientFactory) { ClientName = product.GroupNO };
|
||||||
|
if (product.GroupNO == "g15")
|
||||||
|
agent = new AgentClient15Service(m_HttpClientFactory) { ClientName = product.GroupNO };
|
||||||
agent.Product = product;
|
agent.Product = product;
|
||||||
return agent;
|
return agent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user