From 6ea169e69550d0422e639cf80333611f918ad353 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”>
Date: Sun, 7 Mar 2021 09:50:47 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=A4=A9=E5=AD=A3=E5=8D=A1=E5=B9=B4?=
=?UTF-8?q?=E5=8D=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/AgentClient7Service.cs | 34 ++++++++++++++++---
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/Services/Hncore.Pass.Vpn/Service/AgentClient7Service.cs b/Services/Hncore.Pass.Vpn/Service/AgentClient7Service.cs
index a5212a3..d9ea27e 100644
--- a/Services/Hncore.Pass.Vpn/Service/AgentClient7Service.cs
+++ b/Services/Hncore.Pass.Vpn/Service/AgentClient7Service.cs
@@ -179,15 +179,27 @@ namespace Hncore.Pass.Vpn.Service
///
public override async Task NewAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1, int payCount = 1)
{
- var client = CreateHttpClient();
+ var client = CreateHttpClient();
+ var package = "m";
+ var buyCount = "1";
+ if(packageKey =="m3"){
+ package = "m";
+ buyCount = "3";
+ } else if(packageKey =="m12"){
+ package = "m";
+ buyCount = "12";
+ } else {
+ package = packageKey;
+ buyCount = payCount.ToString();
+ }
var map = new SortedDictionary(){
{"user",account },
{"passwd",pwd },
{"num","1"},
{"conn_max",connCount.ToString() },
{"test",packageKey=="test"?"1":"0" },
- {"type",packageKey=="test"?"d":packageKey },
- {"paynum",payCount.ToString() },
+ {"type",packageKey=="test"?"d":package },
+ {"paynum",buyCount },
{"mobile","17719092232" },
};
var title = GetOpTitle("NewAccount", account);
@@ -228,6 +240,18 @@ namespace Hncore.Pass.Vpn.Service
public override async Task NewReAccount(string packageKey, string id, int connCount, int payCount = 1)
{
var ret = await this.GetAccountInfo(id);
+ var package = "m";
+ var buyCount = "1";
+ if(packageKey =="m3"){
+ package = "m";
+ buyCount = "3";
+ } else if(packageKey =="m12"){
+ package = "m";
+ buyCount = "12";
+ } else {
+ package = packageKey;
+ buyCount = payCount.ToString();
+ }
if (ret.Code != ResultCode.C_SUCCESS|| ret.Data==null)
{
return new ApiResult(ResultCode.C_INVALID_ERROR, "账户不存在,续费失败");
@@ -235,8 +259,8 @@ namespace Hncore.Pass.Vpn.Service
var client = CreateHttpClient();
var map = new SortedDictionary(){
{"id",id }, //原始的账号的id
- {"type",packageKey },
- {"paynum","1" },
+ {"type",package },
+ {"paynum",buyCount },
};
var title = GetOpTitle("NewReAccount", id);