天天季卡年卡
This commit is contained in:
@@ -180,14 +180,26 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
public override async Task<ApiResult> NewAccount(string packageKey, string account, string pwd, int connCount = 1, int accountType = 1, int payCount = 1)
|
public override async Task<ApiResult> 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<string, string>(){
|
var map = new SortedDictionary<string, string>(){
|
||||||
{"user",account },
|
{"user",account },
|
||||||
{"passwd",pwd },
|
{"passwd",pwd },
|
||||||
{"num","1"},
|
{"num","1"},
|
||||||
{"conn_max",connCount.ToString() },
|
{"conn_max",connCount.ToString() },
|
||||||
{"test",packageKey=="test"?"1":"0" },
|
{"test",packageKey=="test"?"1":"0" },
|
||||||
{"type",packageKey=="test"?"d":packageKey },
|
{"type",packageKey=="test"?"d":package },
|
||||||
{"paynum",payCount.ToString() },
|
{"paynum",buyCount },
|
||||||
{"mobile","17719092232" },
|
{"mobile","17719092232" },
|
||||||
};
|
};
|
||||||
var title = GetOpTitle("NewAccount", account);
|
var title = GetOpTitle("NewAccount", account);
|
||||||
@@ -228,6 +240,18 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
public override async Task<ApiResult> NewReAccount(string packageKey, string id, int connCount, int payCount = 1)
|
public override async Task<ApiResult> NewReAccount(string packageKey, string id, int connCount, int payCount = 1)
|
||||||
{
|
{
|
||||||
var ret = await this.GetAccountInfo(id);
|
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)
|
if (ret.Code != ResultCode.C_SUCCESS|| ret.Data==null)
|
||||||
{
|
{
|
||||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "账户不存在,续费失败");
|
return new ApiResult(ResultCode.C_INVALID_ERROR, "账户不存在,续费失败");
|
||||||
@@ -235,8 +259,8 @@ namespace Hncore.Pass.Vpn.Service
|
|||||||
var client = CreateHttpClient();
|
var client = CreateHttpClient();
|
||||||
var map = new SortedDictionary<string, string>(){
|
var map = new SortedDictionary<string, string>(){
|
||||||
{"id",id }, //原始的账号的id
|
{"id",id }, //原始的账号的id
|
||||||
{"type",packageKey },
|
{"type",package },
|
||||||
{"paynum","1" },
|
{"paynum",buyCount },
|
||||||
};
|
};
|
||||||
|
|
||||||
var title = GetOpTitle("NewReAccount", id);
|
var title = GetOpTitle("NewReAccount", id);
|
||||||
|
|||||||
Reference in New Issue
Block a user