From b3eb1415b165a5d1f45a378df746c11f4ef53ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Wed, 24 Apr 2024 18:31:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=90=86api=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Host/Controllers/UserController.cs | 8 + Host/Views/User/Api.cshtml | 406 +++++++++++++++++++++++++++++ Host/Views/User/Index.cshtml | 4 + 3 files changed, 418 insertions(+) create mode 100644 Host/Views/User/Api.cshtml diff --git a/Host/Controllers/UserController.cs b/Host/Controllers/UserController.cs index 82b04f9..f8bf757 100644 --- a/Host/Controllers/UserController.cs +++ b/Host/Controllers/UserController.cs @@ -597,6 +597,14 @@ namespace Home.Controllers var userId =this.Request.GetUserInfo().UserId; return View(); } + [HttpGet] + [UserAuth] + public IActionResult api() + { + var userId =this.Request.GetUserInfo().UserId; + return View(); + } + [HttpGet] [UserAuth] public IActionResult upload() diff --git a/Host/Views/User/Api.cshtml b/Host/Views/User/Api.cshtml new file mode 100644 index 0000000..7471ce3 --- /dev/null +++ b/Host/Views/User/Api.cshtml @@ -0,0 +1,406 @@ + +@{ + Layout = "_UserLayout"; +} + +
+

代理平台api接口文档

+

警告:请勿在前台页面直接请求接口,容易产生盗号风险,请在后台进行模拟请求,隐藏请求地址。

+
请求基础接口url:https://php-api.juip.com
+
apikey:请联系客服查询
+ + + + + + + + + + + + + + + + + + + + + + + + + +
特殊参数说明:product:对应产品参数;package:对应套餐参数
产品(product)套餐(package)参数套餐
{{pkg.Name}}{{pkg.Id}}
{{info.ProductName}}{{info.Name}}{{info.Id}}
+ +
+
+
+

一、新开测试

+
接口地址:/api/account/createTest?apikey=1232455165&product=5&package=61&account=27test1231&pwd=123
+
请求方式:GET
+ + + + + + + + + + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
product产品 如:1
package套餐 如 1
account账号 如 test
pwd密码 如 123
+ + + + + + + + + + + + +
返回数据:
Code10000 开通成功/其他 开通失败
Message返回提示
+
+
+

二、新开正式账号

+
接口地址:/api/account/createAccount?apikey=1232455165&package=17&account=test123211&pwd=123&connect=1&type=1
+
请求方式:GET
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
package套餐 如 1
account账号 如 test
pwd密码 如 123
connect连接数
type类型{1;新开,3:续费}
+ + + + + + + + + + + + +
返回数据:
Code10000 开通成功/其他 开通失败
Message返回提示
+
+ +
+

三、修改账号密码

+
接口地址:/api/account/updateAccountPwd?apikey=1232455165&account=test123211&pwd=123&newPwd=123533
+
请求方式:GET
+ + + + + + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
account账号 如 test
pwd旧密码
newPwd新密码
+ + + + + + + + + + + + +
返回数据:
Code10000 修改成功/其他 修改失败
Message返回提示
+
+ +
+

四、获取在线账号

+
接口地址:/api/account/onLine?apikey=1232455165&product=1&account=tj8372
+
请求方式:GET
+ + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
account账号 如 test
product产品
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
返回数据:
Code10000 成功/其他 失败
Message返回提示
Data
返回在线数据(json)
Id在线ID
Account账号
LoginTime登录时间
OnlineTime在线时间
ServerIP服务器IP
LoginIP登录IP
UpStream上行
DownStream下行
+
+ +
+

五、踢线

+
接口地址:/api/account/killOut?apikey=1232455165&product=5&id=70329966
+
请求方式:GET
+ + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
id在获取在线账号接口获得的Id
product产品
+ + + + + + + + + + + + + + + + +
返回数据:
Code10000 请求成功
Message返回提示
Datatrue:踢线成功/false:踢线失败
+
+ +
+

六、查询账号信息

+
接口地址:/api/account/queryAccount?apikey=1232455165&product=5&account=test1231
+
请求方式:GET
+ + + + + + + + + + + + + + + + +
请求参数:
apikey唯一key值
account账号
product产品
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
返回数据:
Code10000 成功/其他 失败
Message返回提示
Data
返回信息(json)
ProductName产品名称
PackageName产品套餐
Account账号
ConnectCount连接数
StartTime开始时间
EndTime结束时间
+
+ +
+
+ + \ No newline at end of file diff --git a/Host/Views/User/Index.cshtml b/Host/Views/User/Index.cshtml index a75eafc..fd944dc 100644 --- a/Host/Views/User/Index.cshtml +++ b/Host/Views/User/Index.cshtml @@ -481,6 +481,10 @@
账户信息 + + @if(Model.UserModel.is_agent == 1){ + 代理商API接口 + }