先锋在线状态
This commit is contained in:
@@ -385,19 +385,17 @@
|
|||||||
<div class="container bg_taocan">
|
<div class="container bg_taocan">
|
||||||
<div class="row" style="background:url(/img/products.png) no-repeat; background-size:100% 100%;">
|
<div class="row" style="background:url(/img/products.png) no-repeat; background-size:100% 100%;">
|
||||||
<div class="col-lg-4" style="height:200px;padding-top:30px;padding-left:50px;">
|
<div class="col-lg-4" style="height:200px;padding-top:30px;padding-left:50px;">
|
||||||
<p class="productName">@defaultProduct.Name</p>
|
<p class="productName">@defaultProduct.Name</p>
|
||||||
</div>
|
<a asp-action="index" asp-controller="product">
|
||||||
|
<button type="button" class="btn btn-warning">购买通道</button>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div class="col-lg-8" style="height:200px;padding-top:30px;">
|
<div class="col-lg-8" style="height:200px;padding-top:30px;">
|
||||||
<p>@defaultProduct.Name</p>
|
<p>@defaultProduct.Name</p>
|
||||||
@foreach (var str in defaultProduct.ContentLine)
|
@foreach (var str in defaultProduct.ContentLine)
|
||||||
{
|
{
|
||||||
<p style="font-size: 14px;margin:0;">@str</p>
|
<p style="font-size: 14px;margin:0;">@str</p>
|
||||||
}
|
}
|
||||||
<div class="row" style="text-align: right; position: absolute; left: -100px; bottom: 30px;">
|
|
||||||
<a asp-action="index" asp-controller="product">
|
|
||||||
<button type="button" class="btn btn-warning">购买通道</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ using System.Diagnostics;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace Hncore.Pass.Vpn.Service
|
namespace Hncore.Pass.Vpn.Service
|
||||||
{
|
{
|
||||||
//先锋
|
//先锋
|
||||||
@@ -277,9 +279,8 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public override async Task<ApiResult<List<OriginAccountOnlineModel>>> OnLine(string account)
|
public override async Task<ApiResult<List<OriginAccountOnlineModel>>> OnLine(string account)
|
||||||
{
|
{
|
||||||
var retData = new List<OriginAccountOnlineModel>();
|
|
||||||
|
|
||||||
var password = "FyEomeyZ7P8pK3QQ5RcjVw==";
|
var password = "FyEomeyZ7P8pK3QQ5RcjVw==";
|
||||||
|
|
||||||
var url = "http://webapi.shenlongip.com/searchvpn/links?username=admin1&password="+password+"&vpnAccount="+account;
|
var url = "http://webapi.shenlongip.com/searchvpn/links?username=admin1&password="+password+"&vpnAccount="+account;
|
||||||
|
|
||||||
@@ -290,33 +291,30 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||||
var status = jo["code"].ToString();
|
var status = jo["code"].ToString();
|
||||||
|
|
||||||
|
var retData = new List<OriginAccountOnlineModel>();
|
||||||
|
|
||||||
if (status =="0")
|
if (status =="0")
|
||||||
{
|
{
|
||||||
if(jo.ContainsKey("data")){
|
if(jo.ContainsKey("data")){
|
||||||
foreach (var tr in jo["data"])
|
foreach (var tr in jo["data"][0][account]["clients"])
|
||||||
{
|
{
|
||||||
JObject jsondata = (JObject)JsonConvert.DeserializeObject(tr.ToJson());
|
|
||||||
|
|
||||||
var trData = new OriginAccountOnlineModel
|
var trData = new OriginAccountOnlineModel
|
||||||
{
|
{
|
||||||
Account = account,
|
Account = account,
|
||||||
ServerIP = jsondata["clients"]["outIp"].ToString(),
|
ServerIP = "",
|
||||||
LoginTime = "",
|
LoginTime = "",
|
||||||
OnlineTime = "",
|
OnlineTime = "",
|
||||||
LoginIP = jsondata["clients"]["userIp"].ToString(),
|
LoginIP = "",
|
||||||
UpStream = "",
|
UpStream = "",
|
||||||
DownStream = "",
|
DownStream = "",
|
||||||
Id = account,
|
Id= account,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
retData.Add(trData);
|
retData.Add(trData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new ApiResult<List<OriginAccountOnlineModel>>(retData);
|
return new ApiResult<List<OriginAccountOnlineModel>>(retData);
|
||||||
} else {
|
} else {
|
||||||
return new ApiResult<List<OriginAccountOnlineModel>>();
|
return new ApiResult<List<OriginAccountOnlineModel>>(retData);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user