水滴上线

This commit is contained in:
“wanyongkang”
2024-02-01 17:43:16 +08:00
parent 481f39b9c5
commit d8031b41e3
19 changed files with 2215 additions and 235 deletions

View File

@@ -852,6 +852,8 @@ namespace Home.Controllers
if (productId > 0)
accountList = accountList.Where(m => m.ProductId == productId).ToList();
var productIds = accountList.Select(m => m.ProductId);
//获取套餐名称
var package_names = accountList.Select(m => m.PackageName);
var connectCountList = accountList.Select(m => m.ConnectCount);
if (productIds.Distinct().Count() != 1 || connectCountList.Distinct().Count() != 1)
{
@@ -860,6 +862,7 @@ namespace Home.Controllers
}
ViewBag.accounts = accounts;
var id = productIds.First().Value;
var package_name = package_names.First();
//0 无状态 1尊享 2高级 3普通
var pro_type_flag = 0;
@@ -993,7 +996,6 @@ namespace Home.Controllers
return View(model);
}
}
@@ -1010,6 +1012,16 @@ namespace Home.Controllers
if (userInfo != null)
{
if (productId == 28) {
var package_type = "";
if(package_name.Contains("-")){
string[] arrStr = package_name.Split('-');
package_type = arrStr[0] + "-" + arrStr[1] + "-" + arrStr[2];
}
respList.Packages = respList.Packages.Where(m => m.OriginName.Contains(package_type)).ToList();
}
//从user表获取用户信息
var user_Info = await m_UserService.GetById(userInfo.UserId);

View File

@@ -657,19 +657,19 @@ namespace Home.Controllers
Func<string, Task<string>> process = async (data) =>
{
var notifyOrder = data.FromJsonTo<TaoBaoNotifyModel>();
LogHelper.Info("TaoBao process");
if(notifyOrder.Payment == "10.00" && (notifyOrder.SellerNick == "聚ip商城动态ip代理" || notifyOrder.SellerNick == "老鹰动态pptp")||notifyOrder.SellerNick == "强子pptp动态"){
return "您好,"+notifyOrder.Payment+"元已充值到充值到您的会员中";
}
// if(notifyOrder.Payment == "10.00" && (notifyOrder.SellerNick == "聚ip商城动态ip代理" || notifyOrder.SellerNick == "老鹰动态pptp")||notifyOrder.SellerNick == "强子pptp动态"){
// return "您好,"+notifyOrder.Payment+"元已充值到充值到您的会员中";
// }
if (notifyOrder == null || notifyOrder.Tid.NotHas())
return "";
if (m_ScoreService.ExistTaoBaoScore(notifyOrder.Tid))
return "";
// var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.ReceiverPhone : notifyOrder.ReceiverMobile;
var phone = notifyOrder.ReceiverMobile.NotHas() ? notifyOrder.Tid : notifyOrder.ReceiverMobile;
// if (phone.NotHas()) return false;
var userEntity = await m_UserService.Query(m => m.TaoBao == notifyOrder.BuyerNick).FirstOrDefaultAsync();
var phone = notifyOrder.BuyerNick;
// var phone = notifyOrder.BuyerNick;
string pas_result = "";
Random rd = new Random(Guid.NewGuid().GetHashCode());
@@ -705,7 +705,7 @@ namespace Home.Controllers
userEntity.TaoBao= notifyOrder.BuyerNick;
await m_UserService.Update(userEntity);
}
msg = "您好,"+notifyOrder.Payment+"元已充值到充值到您的会员中,会员号为:"+userEntity.LoginCode+"打开网址juip.com登录后点击网站上方的-产品购买即可完成开通或续费。恭喜您本次获得优惠券满4元减1元满20元减3元满54元减5元满130元减15元满490元减30元各一张。欢迎您多来淘宝下单(人工客服在线时间:上午八点到晚上十一点半)";
msg = "您好,"+notifyOrder.Payment+"元已充值到充值到您的会员中,会员号为:"+userEntity.LoginCode+",打开网址:www.juip.com登录后点击网站上方的-产品购买即可完成开通或续费。恭喜您本次获得优惠券满4元减1元满20元减3元满54元减5元满130元减15元满490元减30元各一张。欢迎您多来淘宝下单(人工客服在线时间:上午八点到晚上十一点半)";
}
@@ -758,9 +758,11 @@ namespace Home.Controllers
return true;
};
long aopic = long.Parse(this.Request.Query["aopic"]);
string datainfo = this.Request.Form["json"];
var refundInfos = datainfo.FromJsonTo<TaoBaoRefundModel>();
LogHelper.Info("淘宝参数回调", $"json={datainfo.ToJson()}");
var info = "";
if (aopic == 2){
info = await m_TaoBaoService.ReceivedMsg(this.Request, process);

View File

@@ -384,6 +384,16 @@
this.search_field = '强子静态IP';
this.sstp = '4430';
break;
case 27:
this.l2tp = '123';
this.search_field = '麒麟IP';
this.sstp = '4432';
break;
case 28:
this.l2tp = '123';
this.search_field = '水滴静态IP';
this.sstp = '4432';
break;
}
$.ajax({
type: 'GET',
@@ -491,6 +501,9 @@
case 26:
self.location.href='http://php-api.juip.com/script/linedata/data/download/liebao.csv';
break;
case 27:
self.location.href='http://php-api.juip.com/script/linedata/data/download/qilin.csv';
break;
}
},
detail(r){

View File

@@ -2,14 +2,19 @@
@using Microsoft.Extensions.Configuration
@using Hncore.Pass.BaseInfo.Response
@using Hncore.Infrastructure.Serializer;
@using Hncore.Pass.BaseInfo.Service
@inject IConfiguration m_Configuration
@model List<ProductWithPackageResponse>
@inject UserService m_UserService
@inject Hncore.Pass.Vpn.Service.ProductAccountService m_AccountService
@{
ViewData["Title"] = "购买产品";
UserLoginModel user = null;
Hncore.Pass.BaseInfo.Models.User userEntity = new Hncore.Pass.BaseInfo.Models.User();
if (this.Context.Request.Cookies.TryGetValue("userInfo", out string userCookie))
{
user = userCookie.FromJsonTo<UserLoginModel>();
userEntity = await m_UserService.GetById(user.Id);
}
var pid = this.Context.Request.Query.ContainsKey("id") ? this.Context.Request.Query["id"].ToString() : "";
var defaultProduct = Model.Select(m => m.Product).FirstOrDefault();
@@ -21,6 +26,16 @@
{
defaultProduct = Model.Select(m => m.Product).FirstOrDefault(m => m.Id.ToString() == pid);
}
//设置获取余额
var restAmout = Convert.ToDecimal(0.00);
var resttime = 0;
var userid = 0;
if (user != null){
resttime = await m_AccountService.GetRestTestCount(user.Id);
restAmout = userEntity.RestAmount;
userid = userEntity.Id;
}
var defaultPackage = Model.Where(m => m.Product.Id == defaultProduct.Id).Select(m => m.Packages.FirstOrDefault()).FirstOrDefault();
var baseUrl = m_Configuration["BaseInfoUrl"];
Func<string, string> P = (path) => $"{baseUrl}{path}";
@@ -165,23 +180,23 @@
{
if(item.Product.Id == 18) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">最快</span></a>
<a href="#@item.Product.Id" class="click_product" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF"><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></a>
</li>
} else if(item.Product.Id == 14) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" id="p14" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name</a>
<a href="#@item.Product.Id" class="click_product" id="p14" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name</a>
</li>
}else if(item.Product.Id == 26) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" id="p26" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
<a href="#@item.Product.Id" class="click_product" id="p26" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
</li>
}else if(item.Product.Id == 27) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" id="p27" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
<a href="#@item.Product.Id" class="click_product" id="p27" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
</li>
}else if(item.Product.Id == 6) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" id="p6" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
<a href="#@item.Product.Id" class="click_product" id="p6" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
</li>
}
else if(item.Product.Id == 22) {
@@ -190,7 +205,7 @@
</li>
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
<a href="#@item.Product.Id" role="tab" class="click_product" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
</li>
}
else if(item.Product.Id == 21) {
@@ -199,12 +214,16 @@
<a style="color:#0098fb;border:1px solid #99CCFF"><span class="glyphicon glyphicon-arrow-down"></span>单窗口单IP<span class="glyphicon glyphicon-arrow-down"></span></a>
</li>
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
<a href="#@item.Product.Id" role="tab" class="click_product" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
</li>
} else if(item.Product.Id == 28) {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" id="p28" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name<span style="color: #f64e3d;font-weight:bold;float:right;padding-right: 5px;">新</span></a>
</li>
} else {
<li role="presentation" class="@(item.Product.Id==defaultProduct.Id?"active":"")">
<a href="#@item.Product.Id" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
<a href="#@item.Product.Id" class="click_product" role="tab" data-toggle="tab" style="font-size: 25px;border:1px solid #99CCFF">@item.Product.Name </a>
</li>
}
}
@@ -245,7 +264,7 @@
}
@if (item.Product.Id == 27){
<div class="p_type @("type"+item.Product.Id)" style="padding-top: 10px;">
<button type="button" onclick="qldt1()" class="btn btn-default btn-lg qldt1" style="background-color: #FF9900;font-size:1.3em;float:left;margin:5px;">1M</button>
<button type="button" onclick="qldt1()" class="btn btn-default btn-lg qldt1" style="background-color: #FF9900;font-size:1.3em;float:left;margin:5px;">2M</button>
<button type="button" onclick="qldt5()" class="btn btn-default btn-lg qldt5" style="background-color: white;font-size:1.3em;float:left;margin:5px;">5M</button><br>
<button type="button" onclick="qldt10()" class="btn btn-default btn-lg qldt10" style="background-color: white;font-size:1.3em;float:left;margin:5px;">10M</button><br>
<button type="button" onclick="qldt20()" class="btn btn-default btn-lg qldt20" style="background-color: white;font-size:1.3em;float:left;margin:5px;">20M</button>
@@ -281,7 +300,7 @@
<button type="button" onclick="wjgxgj()" id="gxgj" class="btn btn-default btn-lg" style="background-color: white;font-size:1.5em;">极速版</button>
</div>
}
@if(item.Product.Id != 28){
@foreach (var package in item.Packages.Where(m => m.Status == 1&&(m.TenantId==1157||m.TenantId==9999||m.TenantId==10000)).OrderBy(m => m.TenantId))
{
if (package.IsTest == 1 &&package.Id != 89&&package.Id != 1034&&package.Id != 1040&&package.Id != 1094&&package.Id != 1097&&package.Id != 60&&package.Id != 1114)
@@ -351,20 +370,679 @@
}
}
}
}
</div>
</div>
}
<div id="app" class="qilinjingtai" style="display:none;">
<div class="col-sm-10 col-md-6 margin-top-30">
<div class="panel panel-info relative">
<div class="panel-heading">
<h3 class="text-center">拨号线路(静态)</h3>
</div>
<div class="row text-center" style="margin:0;">
<div class="col-sm-6" style="padding:10px 0;margin:0;">
<h4 style="padding:10px;color:#00a63f;">静态专线介绍</h4>
<p>运营商专线宽带,自营机房<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>大出口流量,直播/游戏首选<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>全新vpn隧道,安全可靠<span class="glyphicon glyphicon-ok " style=" color:#00a63f; float:right;"></span></p>
<p>全局代理不易发现<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>IP周期性变化<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>精选超20000条不同线路<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>Ros/爱快/路由器/手机/电脑<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>华为级维护专员7*24小时服务<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
</div>
<div class="col-sm-6" style="background:#ccc;padding:10px 0;">
<h4 style="padding:10px;color:#00a63f;">传统socks5</h4>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span> 天翼云,各种云线路</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>低带宽出口,共享严重,线路拥挤</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>传统协议,波动大,延迟大</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>系统局部代理,易发现,易封号</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>-</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>容量一般只有2-3000线路</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>电脑/手机</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>售后困难,处理时间漫长</p>
</div>
</div>
<div v-on:click="qilinjt()" class="panel-footer text-center " style="background-color:#00a63f;color:white;padding:20px;font-size:20px;cursor: pointer">
立即购买
</div>
</div>
</div>
<div class="col-sm-10 col-md-6 margin-top-30">
<div class="panel panel-info relative">
<div class="panel-heading">
<h3 class="text-center">水滴专线(固态)</h3>
</div>
<div class="row text-center" style="padding:0;margin:0;">
<div class="col-sm-6" style="padding:10px 0 0 0;">
<h4 style="padding:10px;color:#00a63f;">固态专线介绍</h4>
<p>运营商专线宽带,更稳定<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>全新vpn隧道,安全可靠<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>全局代理,为游戏而生<span class="glyphicon glyphicon-ok " style=" color:#00a63f; float:right;"></span></p>
<p>IP永久固定不变<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>精选超10000条不同线路<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>Ros/爱快/路由器/手机/电脑<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>华为级维护专员7*24小时服务<span class="glyphicon glyphicon-ok" style=" color:#00a63f; float:right;"></span></p>
<p>&nbsp;</p>
</div>
<div class="col-sm-6" style="background:#ccc;padding:10px 0 0 0;">
<h4 style="padding:10px;color:#00a63f;">传统socks5</h4>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span> 天翼云,各种云线路</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>传统socks5协议,波动大,延迟大</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>系统局部代理,易发现,易封号</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>-</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>容量一般只有2-3000线路</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>电脑/手机</p>
<p><span class="glyphicon glyphicon-remove" style=" color:red; float:left;"></span>售后困难,处理时间漫长</p>
<p>&nbsp;</p>
</div>
</div>
<div v-on:click="qilingt()" class="panel-footer text-center " style="background-color:#00a63f;color:white;padding:20px;font-size:20px;cursor: pointer">
立即购买
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="pay_qilin" data-backdrop="static" style="z-index:10000;margin-top:30%" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title text-center" id="myModalLabel">水滴-购买支付</h4>
</div>
<div class="modal-body text-center">
<p>购买账号数量:{{order_info.buy_num}}&nbsp;待支付金额:¥{{order_info.price}}</p>
<p>我的余额:¥ @(restAmout)&nbsp;<a href="/User/Index">前往充值</a></p>
<p>
<input id="balance_s1" type="radio" v-model="order_info.pay_type" name="OPayType" value="10" > <label for="balance_s1">余额支付</label>&nbsp;&nbsp;<br>
<input id="zhifubaopay_s1" type="radio" v-model="order_info.pay_type" name="OPayType" value="100" checked ><label for="zhifubaopay_s1"> <img src="~/img/zfb.png">支付宝支付</label>&nbsp;&nbsp;<br>
<input id="weixinpay_s1" type="radio" v-model="order_info.pay_type" name="OPayType" value="70" > <label for="weixinpay_s1"><img src="~/img/wx.png">微信支付</label>
</p>
<p><button class="btn btn-success btn-lg" v-on:click="pay()">确认支付</button></p>
</div>
</div>
</div>
</div>
<div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="staticBackdropLabel">微信扫码支付</h5>
</div>
<div class="modal-body" id="qrcode_s" style="margin: 0 auto;">
</div>
<div class="modal-footer">
<button type="button" v-on:click="verifyed" class="btn btn-success btn-lg">我已付款</button>
</div>
</div>
</div>
</div>
<div id="alipay"></div>
<div class="modal fade" id="qilinbuy" style="margin:10px;" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" style="width:100%;" role="document">
<div class="modal-content" style="width:100%">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title text-center" id="myModalLabel">{{qilin.title}}</h4>
</div>
<div class="modal-body ">
<div class="row">
<div class="col-sm-12 col-md-4" style="border:1px solid #ccc;line-height:200%;">
<div class="row" style="padding:5px;">
<div class="col-sm-3">
套餐类型:
</div>
<div class="col-sm-9">
<div class="btn-group" role="group" aria-label="...">
<button type="button" id="jinyougame" v-on:click="game()" class="btn btn-success btn-lg">游戏独享</button>
<button type="button" id="jinyouline" v-on:click="line()" class="btn btn-default btn-lg">线路独享</button>
</div>
</div>
</div>
<div class="row " style="padding:5px;">
<div class="col-sm-3">
游戏选择:
</div>
<div class="col-sm-9">
<select class="form-control " v-model="qilin.game_id" id="gameselect" @@change="select_game" style="height:50px;font-size:15px;">
<option value="0">-请选择游戏-</option>
<option v-for="item in game_list" :value="item.id">{{item.name}}</option>
</select>
</div>
</div>
<div class="row" style="padding:5px;">
<div class="col-sm-3">
线路品质:
</div>
<div class="col-sm-9">
优质尊享
</div>
</div>
<div class="row" style="padding:5px;">
<div class="col-sm-3">
购买数量:
</div>
<div class="col-sm-9">
<div class="col-sm-10">
<input type="number" v-model="order_info.buy_num" @@change="change_num()" min=1 class="form-control" value="1">
</div>
<div class="col-sm-2" title="1.这里输入的数量可以大于等于右侧指定地区输入框中的数量总和
例如左侧输入100条右侧只选中了一个地区并设定了20条那么剩余80条将平均分配至未选择的区域。
2.右侧地区不是必填的,用户不手动分配地区,那么将由系统自动分配。">
<span class="glyphicon glyphicon-question-sign"></span>
</div>
</div>
</div>
<div class="row" style="padding:5px;">
<div class="col-sm-3">
账户余额:
</div>
<div class="col-sm-9">
¥@restAmout
</div>
</div>
<div class="row" style="padding:5px;">
<div class="col-sm-3">
账号:
</div>
<div class="col-sm-9">
<div class="col-sm-10">
<input type="text" v-model="order_info.account" class="form-control" placeholder="请输入账号">
</div>
<div class="col-sm-2" title="
1.若购买数量大于1则系统将根据用户所填账户内容生成批量账户
2.示例:填写 zhangsan购买数量20则会生成zhangsan1-zhangsan20">
<span class="glyphicon glyphicon-question-sign"></span>
</div>
</div>
</div>
<div class="row" style="padding:5px;">
<div class="col-sm-3">
密码:
</div>
<div class="col-sm-9">
<div class="col-sm-10">
<input type="text" v-model="order_info.password" class="form-control" placeholder="请输入密码">
</div>
</div>
</div>
</div>
<div class="col-sm-12 col-md-8" >
<div style="border:1px solid #ccc;margin-left:3px;">
<div class="row" >
<div class="input-group col-sm-12" style="float:left;margin-left:15px;margin-top:5px;">
可用节点总数:{{province_city.surplus_out_total}}
</div>
</div>
<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 checked 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:15px;height:453px;overflow:auto;">
<div class="col-sm-4 diqu" v-for="item in citys" 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>
<p style="padding:0;margin:0;">分配数量:<input type="number" min=0 value="0" :class="item.province+'-'+item.city+'-'+item.rid+'-100'" @@change="selsect_adddr_num(item.province+'-'+item.city+'-'+item.rid+'-100',item.total)" :max="item.total" style="width:50%;color:black;background:white;"></p>
</div>
</div>
</div>
</div>
</div>
<div style="border:1px solid #ccc;margin-left:3px;margin-top:5px;">
<div class="row " style="padding:5px;">
<div class="col-sm-3">
带宽选择:
</div>
<div class="col-sm-9">
<div v-if="this.qilin.is_unshar == 0" class="btn-group" role="group" aria-label="...">
<button v-for="(item,index) in package_list.game" :key="index" :class="'package-type-game-'+index" v-on:click="package_click('package-type-game-'+index,'game')" type="button" class="btn btn-default btn-lg">
<span v-if="index == 'test'">测试</span>
<span v-else>{{index}}</span>
</button>
</div>
<div v-if="this.qilin.is_unshar == 1" class="btn-group" role="group" aria-label="...">
<button v-for="(item,index) in package_list.line" :key="index" :class="'package-type-line-'+index" v-on:click="package_click('package-type-line-'+index,'line')" type="button" class="btn btn-default btn-lg">
<span v-if="index == 'test'">测试</span>
<span v-else>{{index}}</span>
</button>
</div>
</div>
</div>
<div class="row " style="padding:5px;">
<div class="col-sm-3">
时长选择:
</div>
<div class="col-sm-9">
<div class="btn-group" role="group" aria-label="...">
<button v-for="item in package_info_list" type="button" :class="'package-name-'+item.Id" v-on:click="package_name_click('package-name-'+item.Id,item.Id)" class="btn btn-default btn-lg">{{item.package_name}}</button>
</div>
</div>
</div>
<div class="row " style="padding:5px;">
<div class="col-sm-3">
应付金额:
</div>
<div class="col-sm-9">
<span>¥{{order_info.price}}</span>
<button style="float:right;margin-right:50px;" v-on:click="pay_page()" class="btn btn-success btn-lg">购买</button>
</div>
</div>
<div class="row" v-if="qilin.product_id == 2">
<div class="col-sm-12" style="background-color:rgb(209 236 241);padding:10px;margin:10px 0">
<p>专享专线稳定、安全上下行同速告别游戏延迟、卡顿。IP将长久有效<span style="color:red;">IP不变化</span>。</p>
<p>线路品质:尊享 > 砖石 > 白金 > 黄金 > 青铜,线路等级越高线路质量越好</p>
</div>
<div class="col-sm-12" style="background-color:rgb(209 236 241);padding:10px;margin:10px 0">
<p>游戏独享:单个游戏所用IP保证在IP池内不会出现同款游戏使用相同IP,游戏真实独享。</p>
<p>线路独享:个人独享整个线路,真实独享,永远不重复。</p>
<p style="color:red;">线路切换单日限制为20次</p>
<p style="color:red;">如果没有自己想用的地区线路或线路余量不足,请联系客服上架</p>
</div>
</div>
<div class="row" v-if="qilin.product_id == 1">
<div class="col-sm-12" style="background-color:rgb(209 236 241);padding:10px;margin:10px 0">
<p>静态线路稳定、安全高带宽出口游戏、直播全搞定。IP<span style="color:red;">3-7</span>天周期性变化。</p>
<p>线路品质:尊享 > 砖石 > 白金 > 黄金 > 青铜,线路等级越高线路质量越好</p>
</div>
<div class="col-sm-12" style="background-color:rgb(209 236 241);padding:10px;margin:10px 0">
<p>游戏独享:单个游戏所用IP保证在IP池内不会出现同款游戏使用相同IP,游戏真实独享。</p>
<p>线路独享:个人独享整个线路,真实独享,永远不重复。</p>
<p style="color:red;">线路切换单日限制为20次</p>
<p style="color:red;">如果没有自己想用的地区线路或线路余量不足,请联系客服上架</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="~/js/vue.js"></script>
<script type="text/javascript">
var app = new Vue({
el: '#app',
data: {
qilin:{
'title':'购买水滴专线-固态',
'is_unshar':0, // 0 游戏独享 1 线路独享
'game_id':0,
'product_id':1,//1静态 2固态
},
game_list:[],
province_city:{},
province:[],
citys:[],
package_list:[],
package_info_list:[],
order_info:{
pay_type:10,
type:0,//类型,0:静态;1:专线;
package_id:'',
game_id:'',
buy_num:1,
price:'',
account:'',
password:'',
product_info:[]
},
},
computed: {
},
watch: {
},
created: function () {
this.order_info.account = this.randomString(2) + (Math.floor(Math.random() * 1000) + 1);
this.order_info.password = (Math.floor(Math.random() * 1000) + 1);
},
methods: {
randomString(len) {
len = len || 32;
var $chars = 'abcdefhijkmnprstwxy';
var maxPos = $chars.length;
var pwd = '';
for (i = 0; i < len; i++) {
pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
}
return pwd;
},
qilinjt() {
$('#qilinbuy').modal('show');
this.qilin.title = "购买拨号线路-静态"
this.qilin.product_id = 1
this.order_info.type = 0;
this.order_info.package_id = '';
this.order_info.product_info = [];
this.game();
this.get_package();
},
qilingt() {
$('#qilinbuy').modal('show');
this.qilin.title = "购买水滴专线-固态"
this.qilin.product_id = 2
this.order_info.type = 1;
this.order_info.package_id = '';
this.order_info.product_info = [];
this.game();
this.get_package();
},
get_package(){
let data = {
cookie:document.cookie,
}
var url = 'http://php-api.juip.com/jinyou/api/getPackage?type=';
if ( @(userid) != 0 ) {
url = 'http://php-api.juip.com/jinyou/Jinyoujt/getPackage?type=';
}
var that = this;
$.ajax({
type: 'POST',
url: url+this.qilin.product_id,
dataType: "json",
data: JSON.stringify(data),
beforeSend: function(xhr) {
xhr.withCredentials = true;
},
crossDomain: true,
success: function (res) {
that.package_list = res.data;
}
});
},
package_click(cls,type) {
this.package_info_list = [];
this.order_info.package_id = '';
var package_name = cls.split('-');
if (type == 'game') {
for (var i in this.package_list.game) {
if ( @(resttime) < 1) {
this.package_list.game.test[0].Price = 1;
}
$('.package-type-game-'+i).addClass('btn-default');
$('.package-type-game-'+i).removeClass(' btn-success');
if (i == package_name[3]) {
this.package_info_list = this.package_list.game[i];
}
}
}
if (type == 'line') {
if ( @(resttime) < 1) {
this.package_list.line.test[0].Price = 1;
}
for (var i in this.package_list.line) {
$('.package-type-line-'+i).addClass('btn-default');
$('.package-type-line-'+i).removeClass(' btn-success');
if (i == package_name[3]) {
this.package_info_list = this.package_list.line[i];
}
}
}
$("."+cls).addClass(' btn-success');
$("."+cls).removeClass("btn-default");
},
package_name_click(package_name,package_id) {
this.order_info.package_id = package_id;
for (var i in this.package_info_list) {
$('.package-name-'+this.package_info_list[i].Id).addClass('btn-default');
$('.package-name-'+this.package_info_list[i].Id).removeClass(' btn-success');
if (this.package_info_list[i].Id == package_id) {
this.order_info.price = this.package_info_list[i].Price * this.order_info.buy_num;
}
}
$("."+package_name).addClass(' btn-success');
$("."+package_name).removeClass("btn-default");
},
change_num() {
for (var i in this.package_info_list) {
if (this.package_info_list[i].Id == this.order_info.package_id) {
this.order_info.price = this.package_info_list[i].Price * this.order_info.buy_num;
}
}
},
selsect_adddr_num(addr_id,total) {
var num = $("."+addr_id).val();
if (num>total) {
num =total;
$("."+addr_id).val(num)
}
this.order_info.product_info[addr_id] = num;
this.order_info.product_info = {...this.order_info.product_info};
let all_add_num = 0;
for (var i in this.order_info.product_info) {
all_add_num += parseInt(this.order_info.product_info[i]);
}
if (this.order_info.buy_num<all_add_num) {
this.order_info.buy_num = all_add_num;
}
for (var i in this.package_info_list) {
if (this.package_info_list[i].Id == this.order_info.package_id) {
this.order_info.price = this.package_info_list[i].Price * this.order_info.buy_num;
}
}
},
game() {
this.qilin.is_unshar = 0;
$("#jinyougame").removeClass("btn-default");
$("#jinyougame").addClass(" btn-success");
$("#jinyouline").removeClass(" btn-success");
$("#gameselect").removeAttr('disabled');
this.order_info.product_info = [];
this.order_info.package_id = '';
this.package_info_list = [];
var that = this;
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/jinyou/api/gameList',
dataType: "json",
async:false,
success: function (res) {
that.game_list = res.data;
}
});
this.select_game()
},
line() {
this.order_info.product_info = [];
this.qilin.is_unshar = 1;
this.qilin.game_id = '';
this.order_info.package_id = '';
this.package_info_list = [];
$("#jinyouline").removeClass("btn-default");
$("#jinyouline").addClass(" btn-success");
$("#jinyougame").removeClass(" btn-success");
$("#gameselect").attr('disabled',"true");
this.select_game()
},
select_game() {
this.citys = [];
var that = this;
$.ajax({
type: 'GET',
url: 'http://php-api.juip.com/jinyou/api/regionSurplusOuts?product_id='+this.qilin.product_id+'&is_unshar='+this.qilin.is_unshar+'&game_id='+this.qilin.game_id,
dataType: "json",
async:false,
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);
}
this.order_info.game_id = this.qilin.game_id
},
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 = [];
}
},
pay_page(){
if (this.order_info.package_id == '') {
alert('请选择套餐!');
return;
}
if (this.order_info.game_id == '' && this.qilin.is_unshar == 0) {
alert('请选择游戏!');
return;
}
if (this.order_info.account.length < 5 && this.hasNumAndChar(this.order_info.account)) {
alert('账号长度至少5位');
return;
}
if (this.order_info.password.length < 3 && this.hasNumAndChar(this.order_info.password)) {
alert('密码长度至少3位');
return;
}
if (this.order_info.price == 0) {
this.order_info.pay_type = 10;
this.pay()
} else {
$('#pay_qilin').modal('show');
}
},
pay(){
let data = {
cookie:document.cookie,
order_info: this.order_info
}
console.log(data.order_info);
console.log(JSON.stringify(data));
$.ajax({
type: 'POST',
url: 'http://php-api.juip.com/jinyou/jinyoujt/create_order',
dataType: "json",
contentType: "application/json",
data: JSON.stringify(data),
beforeSend: function(xhr) {
xhr.withCredentials = true;
},
crossDomain: true,
success: function (res) {
if (res.code == 1) {
$('#pay_qilin').modal('hide');
alert(res.msg);
window.location.href = "/user/myaccounts";
} else if (res.code == 2) {
document.getElementById("alipay").innerHTML=res.data;
document.forms['alipaysubmit'].submit();
$('#pay_qilin').modal('hide');
} else if (res.code == 3) {
$("#qrcode_s").html('');
new QRCode(document.getElementById("qrcode_s"), {
text: res.data,
width : 300,
height : 300
});
$('#staticBackdrop').modal('show');
$('#pay_qilin').modal('hide');
} else {
$('#pay_qilin').modal('hide');
alert(res.msg);
}
}
});
},
verifyed() {
$('#staticBackdrop').modal('hide');
window.location.href = "/user/myaccounts";
},
hasNumAndChar(str) {
var zg = /^[0-9a-zA-Z]*$/;
if (!zg.test(str)) {
return false;
} else {
return true;
}
},
}
})
</script>
<script>
$(function(){
setTimeout(function(){
$("#loading").hide();
},500);
});
$("#p28").click(function () {
$(".qilinjingtai").show();
for (var i=1;i<30;i++){
$("#p"+i).removeClass("on");
}
});
$(".click_product").click(function () {
$(".qilinjingtai").hide();
});
$(".p_type").hide();
$("#p14").click(function () {

View File

@@ -195,7 +195,7 @@
<script src="~/js/vue.js"></script>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script type="text/javascript">
var app = new Vue({

View File

@@ -26,7 +26,7 @@
var randomAccountMutil = ValidateCodeHelper.MakeCharCode(3).ToLower();
var product_id = Model.Product.Id;
if (product_id == 20 ||product_id == 21||product_id == 27) {
if (product_id == 20 ||product_id == 21||product_id == 26||product_id == 27) {
randomAccount1 = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(5).ToLower();
randomAccountMutil = ValidateCodeHelper.MakeCharCode(6).ToLower();
randomPwd = ValidateCodeHelper.MakeNumCode(6).ToLower();
@@ -669,7 +669,7 @@
},
checkOneAccount() {
if (productId == 20||productId == 21) {
if (productId == 20||productId == 21||productId == 27) {
if (this.OneBuyModel.Account.length > 10 || this.OneBuyModel.Account.length < 7 || !this.hasNumAndChar(this.OneBuyModel.Account)) {
alert("此产品账号必须在7-10位");
this.OneChecker.AccountOk = false;
@@ -698,7 +698,7 @@
},
checkMoreAccount() {
if (productId == 20||productId == 21) {
if (productId == 20||productId == 21||productId == 27) {
if (this.MoreBuyModel.Account.length < 6 || this.MoreBuyModel.Account.length > 8 || !this.hasNumAndChar(this.MoreBuyModel.Account)) {
alert("此产品账号必须在7-10位");
this.MoreChecker.AccountOk = false;

View File

@@ -396,7 +396,7 @@
<!-- 支付弹窗 -->
<div id="aliPayBox" style="display:none"></div>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
$(function () {
if (@Model.UserModel.is_verify == 0) {

View File

@@ -32,6 +32,13 @@
});
})
</script>
<style>
.bg_blue {
background-color: #2955b3;
color:white;
}
</style>
</script>
<div id="app">
@*<div class="qq">
@@ -105,6 +112,7 @@
<td>@item.Account</td>
<td>
<button type="button" class="btnXq toDetail"
a-Id="@item.Id"
a-UserCode="@item.UserCode"
a-ProductName="@item.ProductName"
a-PackageName="@item.PackageName"
@@ -113,7 +121,9 @@
a-ConnectCount="@item.ConnectCount"
a-StartTime='@item.StartTime.Value.ToString("yyyy.M.dd H:m")'
a-EndTime='@item.EndTime.Value.ToString("yyyy.M.dd H:m")'
a-RestTime="@item.RestTime">
a-RestTime="@item.RestTime"
a-Remark="@item.Remark"
a-Raw="@item.Raw">
详情
</button>
<a class="btnXq" asp-action="OnLine" asp-controller="User" asp-route-productId="@item.ProductId" asp-route-account="@item.Account">
@@ -251,6 +261,14 @@
<td>密码:</td>
<td>{{currentAccount.Pwd}}</td>
</tr>
<tr>
<td>ip地址:</td>
<td>{{currentAccount.Remark}}<a v-on:click="change_ip(currentAccount.Id,currentAccount.PackageName,currentAccount.Account,currentAccount.Remark)" data-toggle="modal" data-target="#change_ip_city">切换</a></td>
</tr>
<tr>
<td>服务器:</td>
<td>{{currentAccount.Raw}}</td>
</tr>
<tr>
<td>连接数:</td>
<td>{{currentAccount.ConnectCount}}</td>
@@ -273,6 +291,68 @@
</div>
</div>
<!-- /切换地区 -->
<div class="modal fade" id="change_ip_city" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document" style="width:80%">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</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:50px;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="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
@@ -367,6 +447,7 @@
Count:0
},
currentAccount: {
Id: "",
UserCode: "",
ProductName: "",
PackageName: "",
@@ -376,7 +457,32 @@
StartTime: "",
EndTime: "",
RestTime: "",
}
Remark: "",
Raw: "",
},
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: {
@@ -388,6 +494,133 @@
this.getProducts();
},
methods: {
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: 'http://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: 'http://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: 'http://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;
@@ -501,6 +734,7 @@
})
function showDetail(_self) {
var currentOrder = {
Id: $(_self).attr('a-Id'),
UserCode: $(_self).attr('a-UserCode'),
ProductName: $(_self).attr('a-ProductName'),
PackageName: $(_self).attr('a-PackageName'),
@@ -510,6 +744,8 @@
StartTime: $(_self).attr('a-StartTime'),
EndTime: $(_self).attr('a-EndTime'),
RestTime: $(_self).attr('a-RestTime'),
Remark: $(_self).attr('a-Remark'),
Raw: $(_self).attr('a-Raw'),
}
app.setAccountInfo(currentOrder);
$(_self).show();

View File

@@ -289,6 +289,16 @@
<td>1234</td>
<td>4430</td>
</tr>
<tr>
<td>麒麟</td>
<td>123</td>
<td>4432</td>
</tr>
<tr>
<td>水滴静态</td>
<td>123</td>
<td>4432</td>
</tr>
<tr>
<td>强子</td>
<td>888888</td>
@@ -452,6 +462,16 @@
this.search_field = '强子静态IP';
this.sstp = '1500';
break;
case 27:
this.l2tp = '123';
this.search_field = '麒麟IP';
this.sstp = '4432';
break;
case 28:
this.l2tp = '123';
this.search_field = '水滴静态IP';
this.sstp = '4432';
break;
}
$.ajax({
type: 'GET',
@@ -580,6 +600,12 @@
case 26:
self.location.href='http://php-api.juip.com/script/linedata/data/download/liebao.csv';
break;
case 27:
self.location.href='http://php-api.juip.com/script/linedata/data/download/qilin.csv';
break;
case 28:
self.location.href='http://php-api.juip.com/script/linedata/data/download/qilinjt.csv';
break;
}
}
}

View File

@@ -696,7 +696,7 @@
<script src="/http/js/jquery.slicknav.min.js"></script>
<script src="/http/js/jquery.parallax-1.1.3.js"></script>
<script src="/http/js/jquery-ui.js"></script>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script src="~/js/vue.js"></script>

File diff suppressed because it is too large Load Diff

View File

@@ -204,7 +204,7 @@
<script src="~/js/vue.js"></script>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script type="text/javascript">
var app = new Vue({

View File

@@ -158,7 +158,7 @@
</div>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>

View File

@@ -28,7 +28,7 @@
var randomAccountMutil = ValidateCodeHelper.MakeCharCode(3).ToLower();
var product_id = Model.Product.Id;
if (product_id == 20 ||product_id == 21||product_id == 27) {
if (product_id == 20 ||product_id == 21||product_id == 26||product_id == 27) {
randomAccount1 = ValidateCodeHelper.MakeCharCode(2).ToLower() + ValidateCodeHelper.MakeNumCode(5).ToLower();
randomAccountMutil = ValidateCodeHelper.MakeCharCode(6).ToLower();
randomPwd = ValidateCodeHelper.MakeNumCode(6).ToLower();
@@ -170,10 +170,18 @@
</div>
<div class="col-lg-4 regDan">
<input type="text" name="Pwd" v-model="OneBuyModel.Pwd" v-on:blur="checkOnePwd" />
<p class="jinggao" v-if="!OneChecker.PwdOk">1至10位字母或数字或组合</p>
@if (Model.Package.ProductId !=27) {
<p class="jinggao" v-if="!OneChecker.PwdOk">1至10位字母或数字或组合</p>
} else {
<p class="jinggao" v-if="!OneChecker.PwdOk">7至10位字母或数字或组合</p>
}
</div>
<div class="col-lg-4 text-left">
<span class="grayText">1至10位字母或数字或组合</span>
@if (Model.Package.ProductId !=27) {
<sapn class="grayText">1至10位字母或数字或组合</sapn>
} else {
<sapn class="grayText">7至10位字母或数字或组合</sapn>
}
</div>
</div>
@if (Model.Package.IsTest == 0) {
@@ -346,10 +354,18 @@
</div>
<div class="col-lg-4 regDan">
<input type="text" name="Pwd" id="" value="" v-model="MoreBuyModel.Pwd" />
<p class="jinggao" v-if="!MoreChecker.PwdOk">1至10位字母或数字或组合</p>
@if ( Model.Package.ProductId !=27) {
<p class="jinggao" v-if="!OneChecker.AccountOk">1至10位字母或数字或组合</p>
} else {
<p class="jinggao" v-if="!OneChecker.AccountOk">7至10位字母或数字或组合</p>
}
</div>
<div class="col-lg-4 text-left">
<span style="color:#ccc">1至10位字母或数字或组合</span>
@if (Model.Package.ProductId !=27) {
<sapn class="grayText">1至10位字母或数字或组合</sapn>
} else {
<sapn class="grayText">7至10位字母或数字或组合</sapn>
}
</div>
</div>
<div class="row">
@@ -776,6 +792,14 @@
return true;
},
checkOnePwd() {
if (productId == 27) {
if (this.OneBuyModel.Pwd.length < 7 || this.OneBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
this.OneChecker.PwdOk = false;
return false;
}
this.OneChecker.PwdOk = true;
return true;
}
if (this.OneBuyModel.Pwd.length < 1 || this.OneBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.OneBuyModel.Pwd)) {
this.OneChecker.PwdOk = false;
return false;
@@ -802,6 +826,15 @@
return true;
},
checkMorePwd() {
if (productId == 27) {
if (this.MoreBuyModel.Pwd.length < 7 || this.MoreBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
alert("此产品密码必须大于6位");
this.MoreChecker.PwdOk = false;
return false;
}
this.MoreChecker.PwdOk = true;
return true;
}
if (this.MoreBuyModel.Pwd.length < 1 || this.MoreBuyModel.Pwd.length > 10 || !this.hasNumAndChar(this.MoreBuyModel.Pwd)) {
this.MoreChecker.PwdOk = false;
return false;

View File

@@ -665,7 +665,7 @@
<!-- 支付弹窗结束 -->
<div id="aliPayBox" style="display:none"></div>
<script type="text/javascript" src="https://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script type="text/javascript" src="https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/qrcodejs/1.0.0/qrcode.min.js"></script>
<script>
var t1 = null;

View File

@@ -2,9 +2,12 @@
@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 () {
@@ -63,6 +66,10 @@
.province{
margin-bottom: 10px;
}
.bg_blue {
background-color: #2955b3;
color:white;
}
.online {
position: fixed;
@@ -365,12 +372,13 @@
<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)
@@ -382,18 +390,83 @@
<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 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)</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 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>
<td class="blueT">下载</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">&times;</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>*@
@@ -501,7 +574,30 @@
Account: "",
Pwd:""
},
onLineData:[]
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: {
@@ -515,6 +611,133 @@
this.getProducts();
},
methods: {
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: 'http://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: 'http://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: 'http://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;

View File

@@ -16,6 +16,9 @@ using System.Net;
using System.Net.Http;
using System.IO;
using System.Threading.Tasks;
using System.Security.Cryptography;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Hncore.Pass.Vpn.Service
{
public class AgentClient13Service:AgentClientBaseService
@@ -170,28 +173,43 @@ namespace Hncore.Pass.Vpn.Service
/// <returns></returns>
public override async Task<ApiResult> NewReAccount(string packageKey, string account, int connCount, int payCount = 1)
{
var product_id = "";
var product_sub_id = "";
var product_item_id = "";
var type = "";
var days = "";
if(packageKey.Contains("-")){
string[] arrStr = packageKey.Split('-');
product_id = arrStr[0];
product_sub_id = arrStr[1];
product_item_id = arrStr[2];
days = arrStr[3];
Random rd = new Random(Guid.NewGuid().GetHashCode());
int i = rd.Next();
if (product_id == "1") {
type = "0";
}
if (product_id == "2") {
type = "1";
}
}
Dictionary<string, string> map = new Dictionary<string, string>(){
{"product_id",product_id },
{"product_sub_id",product_sub_id },
{"product_item_id",product_item_id },
{"days",days },
{"type",type },
{"account",account },
};
var time_s = DateTime.Now.GetUnixTimeStamp();
var agentid = "admin1";
var nonce = MD5(time_s.ToString()) + i.ToString();
var apikey = "0c4641686764e0ee56ef54b16fddc966";
var sign = MD5(time_s+nonce+apikey);
var url = "/api/raduserRenew?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account+"&day="+packageKey;
var client = CreateHttpClient();
var resp = await client.GetAsync(url);
map = signAct(map);
var client = CreateHttpClient();
var resp = await client.PostAsForm("https://jyip.net/open-api/account-renew", map);
var content = await resp.Content.ReadAsStringAsync();
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
var status = jo["errcode"].ToString();
if (status =="0")
var status = jo["code"].ToString();
if (status == "200")
{
return new ApiResult(1);
}
@@ -298,25 +316,28 @@ namespace Hncore.Pass.Vpn.Service
/// <returns></returns>
public override async Task<bool> UpdateAccountPwd(string account, string pwd)
{
var account_r = "";
var type = "";
if(account.Contains("-")){
string[] arrStr = account.Split('-');
account_r = arrStr[0];
type = arrStr[1];
}
Dictionary<string, string> map = new Dictionary<string, string>(){
{"passwd",pwd },
{"account",account },
{"type",type },
};
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 = "0c4641686764e0ee56ef54b16fddc966";
var sign = MD5(time_s+nonce+apikey);
var url = "/api/raduserChpw?agentid="+agentid+"&ti="+time_s+"&nonce="+nonce+"&sign="+sign+"&username="+account+"&newpass="+pwd;
var client = CreateHttpClient();
var resp = await client.GetAsync(url);
map = signAct(map);
var client = CreateHttpClient();
var resp = await client.PostAsForm("https://jyip.net/open-api/edit-password", map);
var content = await resp.Content.ReadAsStringAsync();
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
var status = jo["errcode"].ToString();
if (status =="0")
var status = jo["code"].ToString();
if (status == "200")
{
return true;
}
@@ -479,5 +500,39 @@ namespace Hncore.Pass.Vpn.Service
}
return true;
}
private static Dictionary<string, string> signAct(Dictionary<string, string> body)
{
var authStr="";
body.Add("st",DateTime.Now.GetUnixTimeStamp().ToString());
body.Add("appid","49330ae23dad78f9");
body = body.OrderBy(kv => kv.Key).ToDictionary(kv => kv.Key, p => p.Value);
foreach (var item in body)
{
authStr=authStr+item.Value;
}
body.Add("sign",Md5(Md5(authStr)+"ddb4311a227fb118cacd63cc68416ab5"));
return body;
}
//Md5摘要
private static string Md5(string text)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] fromData = System.Text.Encoding.UTF8.GetBytes(text);
byte[] targetData = md5.ComputeHash(fromData);
string byte2String = null;
for (int i = 0; i < targetData.Length; i++)
{
byte2String += targetData[i].ToString("x2");
}
return byte2String;
}
}
}

View File

@@ -128,7 +128,7 @@ namespace Hncore.Pass.Vpn.Service
{"account",account },
{"password",pwd },
{"conn_max",connCount.ToString() },
{"t_id","666" },
{"t_id","121" },
};
map = signAct(map);

View File

@@ -145,6 +145,13 @@ namespace Hncore.Pass.Vpn.Service
{
return new ApiResult(ResultCode.C_INVALID_ERROR, "密码不能为空");
}
if (entity.ProductId == 28) {
if (entity.PackageName.Contains("固态")) {
entity.Account = entity.Account + "-" + "1";
} else {
entity.Account = entity.Account + "-" + "0";
}
}
var agentRet = await m_AgentService.UpdateAccountPwd(entity.ProductId.Value, entity.Account, request.Pwd);
if (!agentRet)
{
@@ -166,6 +173,13 @@ namespace Hncore.Pass.Vpn.Service
{
return new ApiResult(ResultCode.C_INVALID_ERROR, "密码不能为空");
}
if (entity.ProductId == 28) {
if (entity.PackageName.Contains("固态")) {
entity.Account = entity.Account + "-" + "1";
} else {
entity.Account = entity.Account + "-" + "0";
}
}
var agentRet = await m_AgentService.UpdateAccountPwd(entity.ProductId.Value, entity.Account, request.RePwd);
if (!agentRet)
{