### Task Pool: Query Task Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi An example of a successful response when querying a task. It provides the task's status, start and end times, and the return data if the task has completed. ```json { "code": 10000, "data": { "ReturnData": "", "Status": 1, "TimeEnd": 0, "TimeStart": 1724574010 }, "msg": "查询成功" } ``` -------------------------------- ### Task Pool: Get Tasks Request Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi This request demonstrates how to retrieve tasks from the pool for processing. It specifies the number of tasks to fetch and the types of tasks desired. ```http POST http://127.0.0.1:18888/WebApi/TaskPoolGetTask HTTP/1.1 { "GetTaskNumber": 5, "GetTaskTypeId": [1, 2, 3] } ``` -------------------------------- ### Get Payment Order Status - GET Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This example shows how to retrieve the payment status of an order using an HTTP GET request. It requires the 'OrderId' as a query parameter. The response includes the order status and related information like the card name. ```http GET http://127.0.0.1:18888/WebApi/Pay/GetPayOrderStatus?OrderId=2023100622001414411410844851&Token=LAX6LCUN6KHBHYURTKHL2SM0QFIKMYG4 HTTP/1.1 ``` -------------------------------- ### Task Pool: Get Tasks Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi A successful response when fetching tasks from the pool. It returns a list of tasks, each with a unique UUID, type ID, start time, and the submitted data. ```json { "code": 0, "data": [{ "uuid": "5514d5a3-6d57-4b5a-afad-31bc37054abd", "Tid": 1, "TimeStart": 1687060862, "SubmitData": "{'a':1}" }, { "uuid": "58310db4-310a-438a-ad3b-137cdcc88013", "Tid": 1, "TimeStart": 1687060863, "SubmitData": "{'a':1}" }], "msg": "获取成功" } ``` -------------------------------- ### GET /WebApi/RunJs/{全局公共函数名称} Source: https://www.fnkuaiyan.cn/WebApi/WebApi Executes a global public JavaScript function using GET. Parameters are passed as URL query parameters. This method also supports token-based access control. ```APIDOC ## GET /WebApi/RunJs/{全局公共函数名称} ### Description Executes a global public JavaScript function using GET. Parameters are passed as URL query parameters. This method also supports token-based access control. ### Method GET ### Endpoint `http://127.0.0.1:18888/WebApi/RunJs/测试网页访问?a=3&b=2&Token=H9RNIFZKUSYLRBXYXYR51ZQ5MAM3HD5R` ### Parameters #### Path Parameters - **全局公共函数名称** (string) - Required - The name of the global public function to execute. #### Query Parameters - **a** (string) - Required - Example query parameter. - **b** (string) - Required - Example query parameter. - **Token** (string) - Required - Authentication token. ### Request Example ```http GET http://127.0.0.1:18888/WebApi/RunJs/测试网页访问?a=3&b=2&Token=H9RNIFZKUSYLRBXYXYR51ZQ5MAM3HD5R HTTP/1.1 ``` ### Response #### Success Response (200) - **code** (integer) - Response status code (10000 indicates success). - **msg** (string) - Response message. - **data** (any) - The information returned by the public function. Its type depends on the JS function's return value. #### Response Example ```json { "code": 10000, "data": { "Id": 1, "User": "feizi666", "Phone": "", "Email": "" }, "msg": "运行成功,耗时:2" } ``` #### Error Response Examples ```json {"code":200,"data":{},"msg":"JS公共函数不存在"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:SyntaxError: Unexpected token at the end: \u003cnil\u003e\n\tat parse (native)\n\tat WebApi_用户Id取详情 (\u003ceval\u003e:4:38(10))\n"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:js引擎未返回报错信息"} ``` ``` -------------------------------- ### Task Pool: Submit Task Result Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Example of a successful response after submitting a task's result. Indicates that the operation was successful. ```json { "code": 10000, "data": {}, "msg": "操作成功" } ``` -------------------------------- ### Task Pool: Create Task Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Example of a successful response when creating a task in the task pool. It includes a status code, a message, and the unique identifier (TaskUuid) for the newly created task. ```json { "code": 10000, "data": { "TaskUuid": "d55d61f1-56de-48ac-ab1d-ef4256388775" }, "msg": "查询成功" } ``` -------------------------------- ### Task Pool: Query Task Request Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Shows how to query the status and result of a task using its TaskUuid. The request is a POST to /WebApi/TaskPoolGetData. ```http POST http://127.0.0.1:18888/WebApi/TaskPoolGetData HTTP/1.1 { "TaskUuid": "1a6547d1-269d-4ca4-b1b8-b86fb6d41287" } ``` -------------------------------- ### Get Payment Order Status - POST Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This example demonstrates how to retrieve the payment status of an order using an HTTP POST request. It requires an 'OrderId' in the request body. The response includes the order status and related information like the card name. ```http POST http://127.0.0.1:18888/WebApi/Pay/GetPayOrderStatus HTTP/1.1 { "OrderId":"2023100622001414411410844851" } ``` -------------------------------- ### Task Pool: Create Task Request Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Demonstrates how to create a new task in the task pool. It requires a TaskTypeId and a Parameter, which should ideally be in JSON format. The response includes a TaskUuid for tracking. ```http POST http://127.0.0.1:18888/WebApi/TaskPoolNewData HTTP/1.1 { "TaskTypeId":1, "Parameter": "{'a':-1.11}" } ``` -------------------------------- ### Run Public JS Function Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Example of a successful response after executing a public JavaScript function. The 'data' field contains the return value of the JS function, which can be an object or text. ```json { "code": 10000, "data": { "Id": 1, "User": "feizi666", "Phone": "", "Email": "" }, "msg": "运行成功,耗时:2" } ``` -------------------------------- ### POST /WebApi/RunJs/{全局公共函数名称} Source: https://www.fnkuaiyan.cn/WebApi/WebApi Executes a global public JavaScript function. This API allows for extensible functionality by invoking predefined JS functions. It supports both GET and POST requests and can be secured with token-based permissions. ```APIDOC ## POST /WebApi/RunJs/{全局公共函数名称} ### Description Executes a global public JavaScript function. This API allows for extensible functionality by invoking predefined JS functions. It supports both GET and POST requests and can be secured with token-based permissions. ### Method POST ### Endpoint `http://127.0.0.1:18888/WebApi/RunJs/全局公共函数名称` ### Parameters #### Path Parameters - **全局公共函数名称** (string) - Required - The name of the global public function to execute. #### Request Body - **Uid** (integer) - Required - User ID. - **Phone** (string) - Required - User phone number. ### Request Example ```json { "Uid": 1, "Phone": "186666666" } ``` ### Response #### Success Response (200) - **code** (integer) - Response status code (10000 indicates success). - **msg** (string) - Response message. - **data** (any) - The information returned by the public function. Its type depends on the JS function's return value. #### Response Example ```json { "code": 10000, "data": { "Id": 1, "User": "feizi666", "Phone": "", "Email": "" }, "msg": "运行成功,耗时:2" } ``` #### Error Response Examples ```json {"code":200,"data":{},"msg":"JS公共函数不存在"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:SyntaxError: Unexpected token at the end: \u003cnil\u003e\n\tat parse (native)\n\tat WebApi_用户Id取详情 (\u003ceval\u003e:4:38(10))\n"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:js引擎未返回报错信息"} ``` ``` -------------------------------- ### Task Pool: Submit Task Result Failure Response Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi An example of a failure response when submitting a task result, typically due to an incorrect or invalid TaskUuid. ```json {"code":200,"data":{},"msg":"UUid错误"} ``` -------------------------------- ### Run Public JS Function Request Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Allows direct execution of public JavaScript functions via the WebApi. Requires the JsName and Parameter for the function. Note: This method does not support token-based permission control for specific functions. ```http POST http://127.0.0.1:18888/WebApi/RunJs HTTP/1.1 { "JsName": "WebApi_用户Id取详情", "Parameter": "{'Uid':1}" } ``` -------------------------------- ### Execute Public JS Function via GET Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint allows for the execution of global public JavaScript functions using GET requests. Parameters are appended directly to the URL as query parameters. This method is simpler for functions with few parameters and provides a straightforward way to trigger JavaScript logic within the API. Token-based authorization is also supported. ```http GET http://127.0.0.1:18888/WebApi/RunJs/测试网页访问?a=3&b=2&Token=H9RNIFZKUSYLRBXYXYR51ZQ5MAM3HD5R HTTP/1.1 ``` -------------------------------- ### Successful Response Example - JSON Source: https://www.fnkuaiyan.cn/WebApi/WebApi This is a typical successful JSON response structure from the API, indicating a successful operation with a 'code' of 10000 and a 'msg' detailing the success. The 'data' field contains the relevant information for the specific API call. ```json { "code": 10000, "data": { "Id": 360, "AppId": 10001, "KaClassId": 18, "Name": "1PDbU2i7lto5jdgcrXoLjUr5U", "Status": 1, "RegisterUser": "admin", "RegisterTime": 1689040135, "AdminNote": "测试WEB", "AgentNote": "", "VipTime": 86400, "InviteCount": 1, "RMb": 1, "VipNumber": 1, "Money": 3, "AgentMoney": 3, "UserClassId": 21, "NoUserClass": 1, "KaType": 1, "MaxOnline": 1, "Num": 0, "NumMax": 1, "User": "", "UserTime": "", "InviteUser": "" }, "msg": "获取成功" } ``` -------------------------------- ### Task Pool: Submit Task Result Request Example Source: https://www.fnkuaiyan.cn/WebApi/WebApi Used to submit the result of a processed task back to the system. Requires the TaskUuid, the final TaskStatus, and the TaskReturnData. ```http POST http://127.0.0.1:18888/WebApi/TaskPoolSetTask HTTP/1.1 { "TaskUuid": "5514d5a3-6d57-4b5a-afad-31bc37054abd", "TaskStatus": 3, "TaskReturnData": "BB6CB5C68DF4652941CAF652A366F2D8" } ``` -------------------------------- ### POST /WebApi/Pay/GetPayOrderStatus Source: https://www.fnkuaiyan.cn/WebApi/WebApi Retrieves the payment status of a given order. This endpoint can be used for various payment types, including card purchases. It supports both POST and GET methods. ```APIDOC ## POST /WebApi/Pay/GetPayOrderStatus ### Description Retrieves the payment status and other relevant information for a given order, such as a card purchase order. This endpoint supports both POST and GET requests. ### Method POST, GET ### Endpoint `/WebApi/Pay/GetPayOrderStatus` ### Parameters #### Query Parameters - **OrderId** (string) - Required - The order number or third-party order number to query. - **Token** (string) - Optional - Authentication token. #### Request Body - **OrderId** (string) - Required - The order number or third-party order number to query. ### Request Example ```json { "OrderId":"2023100622001414411410844851" } ``` ### Response #### Success Response (200) - **code** (int) - Response status code, 10000 indicates success. - **msg** (string) - Response status message. - **data** (object) - Data object containing order details. - **Status** (int) - Order status: 1 'Pending Payment', 2 'Paid, Pending Top-up', 3 'Top-up Successful', 4 'Refunding', 5 'Refund Failed', 6 'Refund Successful'. - **KaName** (string) - Associated information for the order, such as the card number for a card purchase order. #### Response Example ```json { "code": 10000, "data": { "KaName": "Y0197w1eHCD8ZzjYZiteiH5He", "Status": 3 }, "msg": "获取成功" } ``` ``` -------------------------------- ### Task Pool - Get Tasks for Processing Source: https://www.fnkuaiyan.cn/WebApi/WebApi Endpoint for workers to retrieve a batch of tasks from the task pool for processing. ```APIDOC ## POST /WebApi/TaskPoolGetTask ### Description Allows workers to retrieve a specified number of tasks of given types from the task pool for processing. ### Method POST ### Endpoint `域名/WebApi/TaskPoolGetTask` ### Parameters #### Request Body - **Token** (string) - Required - Authentication token. - **GetTaskNumber** (int) - Required - The maximum number of tasks to retrieve in this request. - **GetTaskTypeId** (int Array) - Required - An array of task type IDs to fetch. ### Request Example ```json { "GetTaskNumber": 5, "GetTaskTypeId": [1, 2, 3] } ``` ### Response #### Success Response (10000) - **code** (int) - Response status code (10000 for success). - **msg** (string) - Response message. - **data** (Object Array) - An array of tasks retrieved. - **uuid** (string) - The unique ID of the task. - **Tid** (int) - The task type ID. - **TimeStart** (int) - Timestamp when the task was created. - **SubmitData** (string) - The parameters provided when the task was created. #### Response Example ```json { "code": 0, "data": [{ "uuid": "5514d5a3-6d57-4b5a-afad-31bc37054abd", "Tid": 1, "TimeStart": 1687060862, "SubmitData": "{'a':1}" }, { "uuid": "58310db4-310a-438a-ad3b-137cdcc88013", "Tid": 1, "TimeStart": 1687060863, "SubmitData": "{'a':1}" }], "msg": "获取成功" } ``` ``` -------------------------------- ### Get App Latest Download Address Source: https://www.fnkuaiyan.cn/WebApi/WebApi This API endpoint retrieves the latest download address for a specific application based on its AppId. It requires both the AppId and a valid Token for authentication. The response includes a JSON object containing the download URL, file information, and an indicator for an executable file to run after update. ```http GET http://127.0.0.1:18888/WebApi/GetAppUpDataJson?AppId=10001&Token=LAX6LCUN6KHBHYURTKHL2SM0QFIKMYG4 HTTP/1.1 ``` -------------------------------- ### GET /WebApi/GetAppUpDataJson Source: https://www.fnkuaiyan.cn/WebApi/WebApi Retrieves the latest download URL for a given application ID. This endpoint is used to obtain app update information, including download links and file details. ```APIDOC ## GET /WebApi/GetAppUpDataJson ### Description Retrieves the latest download URL for a given application ID. This endpoint is used to obtain app update information, including download links and file details. ### Method GET ### Endpoint `http://127.0.0.1:18888/WebApi/GetAppUpDataJson` ### Parameters #### Query Parameters - **AppId** (integer) - Required - The ID of the application. - **Token** (string) - Required - System authentication token. ### Request Example ```http GET http://127.0.0.1:18888/WebApi/GetAppUpDataJson?AppId=10001&Token=LAX6LCUN6KHBHYURTKHL2SM0QFIKMYG4 HTTP/1.1 ``` ### Response #### Success Response (200) - **code** (integer) - Response status code (10000 indicates success). - **msg** (string) - Response message. - **data** (string) - A JSON string containing the download URL and file details. This includes `htmlurl`, `md5`, `Lujing`, `size`, `url`, and `YunXing` for each file. #### Response Example ```json { "code": 10000, "data": "{\n \"htmlurl\": \"www.baidu.com(自动下载失败打开指定网址,手动更新地址\",\n \"data\": [{\n \"WenJianMin\": \"文件名.exe\",\n \"md5\": \"e10adc3949ba59abbe56e057f20f883e(小写文件md5可选,有就校验,空就只校验文件名)\",\n \"Lujing\": \"/(下载本地相对路径)\",\n \"size\": \"12345\",\n \"url\": \"https://www.baidu.com/文件名.exe(下载路径)\",\n \"YunXing\": \"1(值为更新完成后会运行这个文件,只能有一个文件值为1)\"\n\n }, {\n \"WenJianMin\": \"文件名.dll\",\n \"md5\": \"e10adc3949ba59abbe56e057f20f883e(小写文件md5可选,有就校验,没有就文件名校验)\",\n \"Lujing\": \"/(下载本地相对路径)\",\n \"size\": \"12345\",\n \"url\": \"https://www.baidu.com/文件名.dll(下载路径)\",\n \"YunXing\": \"0\"\n }]\n}", "msg": "获取成功" } ``` #### Error Response Examples ```json {"code":200,"data":{},"msg":"JS公共函数不存在"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:SyntaxError: Unexpected token at the end: \u003cnil\u003e\n\tat parse (native)\n\tat WebApi_用户Id取详情 (\u003ceval\u003e:4:38(10))\n"} ``` ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:js引擎未返回报错信息"} ``` ``` -------------------------------- ### Failed Response Example - No JS Error Info Source: https://www.fnkuaiyan.cn/WebApi/WebApi This response signifies an error during JavaScript execution where the JavaScript engine failed to provide specific error details. The 'msg' field indicates '异常:可能Hook函数传参或返回值类型错误,具体:js引擎未返回报错信息' (Exception: Possible incorrect parameter or return type in Hook function, Specifics: JS engine did not return error information). ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:js引擎未返回报错信息"} ``` -------------------------------- ### Get Cloud Storage Upload Token - POST Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint, available from version 1.0.334+, provides an upload token for cloud storage. It accepts an optional 'Path' in the request body. The response includes a 'data' object containing the 'Url', 'Type', and 'UpToken' for uploading files. ```http POST http://127.0.0.1:18888/WebApi/CloudStorage/GetUploadToken HTTP/1.1 { "Path":"10001/1.apk" } ``` -------------------------------- ### Failed Response Example - JS Function Not Found Source: https://www.fnkuaiyan.cn/WebApi/WebApi This JSON object represents a common failure scenario where the requested JavaScript function could not be found by the API. The 'code' is typically 200, but the 'msg' clearly indicates the error, stating 'JS公共函数不存在' (Public JS function does not exist). ```json {"code":200,"data":{},"msg":"JS公共函数不存在"} ``` -------------------------------- ### Get Public Variable - POST Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint allows fetching a public variable by its name using an HTTP POST request. The 'Name' of the variable is provided in the request body. The response contains the 'code', 'msg', and the 'data' which is the variable's value. ```http POST http://127.0.0.1:18888/WebApi/GetPublicData HTTP/1.1 { "Name":"会员数据a" } ``` -------------------------------- ### Get Cloud Storage Public Link - POST Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint, available from version 1.0.334+, retrieves a public link for cloud storage. It accepts 'Path' and an optional 'LongTime' for link validity in the request body. The response contains a 'data' object with the 'Url' for accessing the file. ```http POST http://127.0.0.1:18888/WebApi/CloudStorage/GetUploadToken HTTP/1.1 { "Path":"10001/1.apk" "LongTime":86400 } ``` -------------------------------- ### Get Card Number Details Source: https://www.fnkuaiyan.cn/WebApi/WebApi This API endpoint retrieves detailed information about a specific card number. It requires a POST request with the card number's 'Name' as a parameter. The response provides comprehensive details about the card, including its ID, name, VIP time, balance, and points. ```http POST http://127.0.0.1:18888/WebApi/GetKaInfo HTTP/1.1 { "Name": "1PDbU2i7lto5jdgcrXoLjUr5U" } ``` -------------------------------- ### Failed Response Example - JS Execution Error Source: https://www.fnkuaiyan.cn/WebApi/WebApi This JSON object indicates an error during the execution of a JavaScript function. The 'msg' field provides details about the exception, such as '异常:可能Hook函数传参或返回值类型错误' (Exception: Possible incorrect parameter or return type in Hook function), and may include specific syntax errors or engine-reported issues. ```json {"code":200,"data":{},"msg":"异常:可能Hook函数传参或返回值类型错误,具体:SyntaxError: Unexpected token at the end: \u003cnil\u003e\n\t\tat parse (native)\n\t\tat WebApi_用户Id取详情 (\u003ceval\u003e:4:38(10))\n"} ``` -------------------------------- ### POST /WebApi/CloudStorage/GetDownloadUrl Source: https://www.fnkuaiyan.cn/WebApi/WebApi Generates a downloadable URL for a file stored in the cloud. This is available from version 1.0.334 onwards. ```APIDOC ## POST /WebApi/CloudStorage/GetDownloadUrl ### Description Generates a downloadable URL for a file stored in the cloud. This endpoint is available from version 1.0.334 onwards. ### Method POST ### Endpoint `/WebApi/CloudStorage/GetDownloadUrl` ### Parameters #### Request Body - **Path** (string) - Optional - The path of the object in storage. - **LongTime** (int) - Optional - The validity period of the link in seconds. If 0, it defaults to one year. ### Request Example ```json { "Path":"10001/1.apk", "LongTime":86400 } ``` ### Response #### Success Response (200) - **code** (int) - Response status code, 10000 indicates success. - **msg** (string) - Response status message. - **data** (object) - Data object containing the download URL. - **Url** (string) - The download URL. #### Response Example ```json { "data": { "Url": "http://asda.cn/10001/1.apk?e=1737806485&token=VyLPZmlDXj2VVmotjUbQRLI1DP9.....省略" }, "code": 10000, "msg": "操作成功" } ``` ``` -------------------------------- ### POST /WebApi/CloudStorage/GetUploadToken Source: https://www.fnkuaiyan.cn/WebApi/WebApi Obtains an upload token for cloud storage. This is typically used to authorize uploads to services like Qiniu Cloud. ```APIDOC ## POST /WebApi/CloudStorage/GetUploadToken ### Description Obtains an upload token for cloud storage, allowing clients to upload files. This endpoint is available from version 1.0.334 onwards. ### Method POST ### Endpoint `/WebApi/CloudStorage/GetUploadToken` ### Parameters #### Request Body - **Path** (string) - Optional - The desired path for the uploaded file in the storage. ### Request Example ```json { "Path":"10001/1.apk" } ``` ### Response #### Success Response (200) - **code** (int) - Response status code, 10000 indicates success. - **msg** (string) - Response status message. - **data** (object) - Data object containing upload details. - **Path** (string) - The path of the object in storage. - **Type** (int) - Storage type: 1 for self-hosted, 2 for Qiniu Cloud. - **Url** (string) - The upload URL. - **UpToken** (string) - The upload token. #### Response Example ```json { "data": { "Path": "10001/1.apk", "Type": 2, "Url": "http://upload.qiniup.com", "UpToken": "6MSwiVmlwTnVtYmVyIjo....." }, "code": 10000, "msg": "操作成功" } ``` ``` -------------------------------- ### Create New Card Number Source: https://www.fnkuaiyan.cn/WebApi/WebApi This API endpoint is used to create new card numbers, likely for a card issuing platform. It accepts POST requests with parameters specifying the card type ID, the quantity to generate, and an optional administrator note. The response includes details of the generated cards, such as their IDs, names, and associated values like VIP time and balance. ```http POST http://127.0.0.1:18888/WebApi/NewKa HTTP/1.1 { "Id": 18, "Number": 2, "AdminNote": "测试WEB" } ``` -------------------------------- ### POST /WebApi/GetKaInfo Source: https://www.fnkuaiyan.cn/WebApi/WebApi Retrieves detailed information for a specific card number. This endpoint allows querying the details of a card by its name. ```APIDOC ## POST /WebApi/GetKaInfo ### Description Retrieves detailed information for a specific card number. This endpoint allows querying the details of a card by its name. ### Method POST ### Endpoint `http://127.0.0.1:18888/WebApi/GetKaInfo` ### Parameters #### Request Body - **Name** (string) - Required - The card number to query. ### Request Example ```json { "Name": "1PDbU2i7lto5jdgcrXoLjUr5U" } ``` ### Response #### Success Response (200) - **code** (integer) - Response status code (10000 indicates success). - **msg** (string) - Response message. - **data** (object) - An object containing the details of the card number. #### Response Example ```json { "code": 10000, "data": { "Id": 360, "Name": "1PDbU2i7lto5jdgcrXoLjUr5U", "VipTime": 86400, "RMb": 1, "VipNumber": 1 }, "msg": "查询成功" } ``` ``` -------------------------------- ### POST /WebApi/NewKa Source: https://www.fnkuaiyan.cn/WebApi/WebApi Creates new card numbers. This endpoint interfaces with a card issuing platform to generate a specified quantity of cards of a certain type. ```APIDOC ## POST /WebApi/NewKa ### Description Creates new card numbers. This endpoint interfaces with a card issuing platform to generate a specified quantity of cards of a certain type. ### Method POST ### Endpoint `http://127.0.0.1:18888/WebApi/NewKa` ### Parameters #### Request Body - **Id** (integer) - Required - The type ID of the card. - **Number** (integer) - Required - The quantity of cards to generate. - **AdminNote** (string) - Required - Administrator's note. ### Request Example ```json { "Id": 18, "Number": 2, "AdminNote": "测试WEB" } ``` ### Response #### Success Response (200) - **code** (integer) - Response status code (10000 indicates success). - **msg** (string) - Response message. - **data** (array of objects) - An array containing details of the generated cards, including `Id`, `Name`, `VipTime`, `RMb`, and `VipNumber`. #### Response Example ```json { "code": 10000, "data": [ { "Id": 359, "Name": "18GS41nlZHjBBCHCM2IH8WqBG", "VipTime": 86400, "RMb": 1, "VipNumber": 1 }, { "Id": 360, "Name": "1PDbU2i7lto5jdgcrXoLjUr5U", "VipTime": 86400, "RMb": 1, "VipNumber": 1 } ], "msg": "制卡成功" } ``` ``` -------------------------------- ### Task Pool - Create Task Source: https://www.fnkuaiyan.cn/WebApi/WebApi Endpoint to create a new task in the task pool. This is an asynchronous operation, suitable for long-running processes. ```APIDOC ## POST /WebApi/TaskPoolNewData ### Description Creates a new task in the task pool for asynchronous processing. ### Method POST ### Endpoint `域名/WebApi/TaskPoolNewData` ### Parameters #### Request Body - **TaskTypeId** (string) - Required - The ID of the task type. - **Parameter** (string) - Required - Task parameters, recommended to be in JSON format. ### Request Example ```json { "TaskTypeId":1, "Parameter": "{'a':-1.11}" } ``` ### Response #### Success Response (10000) - **code** (int) - Response status code (10000 for success). - **msg** (string) - Response message. - **data** (Object Array) - Response data. - **TaskUuid** (string) - The unique UUID identifier for the created task. #### Response Example ```json { "code": 10000, "data": { "TaskUuid": "d55d61f1-56de-48ac-ab1d-ef4256388775" }, "msg": "查询成功" } ``` ``` -------------------------------- ### Execute Public JavaScript Function Source: https://www.fnkuaiyan.cn/WebApi/WebApi Endpoint to execute public JavaScript functions exposed by the Web API. ```APIDOC ## POST /WebApi/RunJs ### Description Executes public JavaScript functions. This allows extending API functionality by running custom JS code. ### Method POST ### Endpoint `域名/WebApi/RunJs` ### Parameters #### Request Body - **Token** (string) - Required - Authentication token. - **JsName** (string) - Required - The name of the public JavaScript function to execute. - **Parameter** (string) - Required - Parameters for the JavaScript function, typically in JSON format. ### Request Example ```json { "JsName": "WebApi_用户Id取详情", "Parameter": "{'Uid':1}" } ``` ### Response #### Success Response (10000) - **code** (int) - Response status code (10000 for success). - **msg** (string) - Response message, indicating success and execution time. - **data** (interface) - The return value from the JavaScript function. This can be an object, string, or other data types depending on the JS function's implementation. #### Response Example ```json { "code": 10000, "data": { "Id": 1, "User": "feizi666", "Phone": "", "Email": "" }, "msg": "运行成功,耗时:2" } ``` ``` -------------------------------- ### Execute Public JS Function via POST Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint allows for the execution of global public JavaScript functions. It supports POST requests where the request body contains the parameters for the JavaScript function. Authentication and authorization can be managed via tokens, and it's recommended for extending API functionality securely. This method is suitable for complex function calls with multiple parameters. ```http POST http://127.0.0.1:18888/WebApi/RunJs/全局公共函数名称 HTTP/1.1 { "Uid": 1, "Phone": "186666666" } ``` -------------------------------- ### Set Public Variable - POST Request Source: https://www.fnkuaiyan.cn/WebApi/WebApi This endpoint allows setting a public variable using an HTTP POST request. It requires both the 'Name' and 'Value' of the variable in the request body. A successful operation returns a 'code' and 'msg'. ```http POST http://127.0.0.1:18888/WebApi/SetPublicData HTTP/1.1 { "Name":"会员数据a", "Value":"sfsfsfsdf" } ``` -------------------------------- ### Task Pool - Query Task Status Source: https://www.fnkuaiyan.cn/WebApi/WebApi Endpoint to query the status and results of a task created in the task pool using its UUID. ```APIDOC ## POST /WebApi/TaskPoolGetData ### Description Queries the status and return data of a task in the task pool using its UUID. ### Method POST ### Endpoint `域名/WebApi/TaskPoolGetData` ### Parameters #### Request Body - **TaskUuid** (string) - Required - The UUID of the task to query, obtained when creating the task. ### Request Example ```json { "TaskUuid": "1a6547d1-269d-4ca4-b1b8-b86fb6d41287" } ``` ### Response #### Success Response (10000) - **code** (int) - Response status code (10000 for success). - **msg** (string) - Response message. - **data** (Object Array) - Response data. - **ReturnData** (string) - The result of the task execution, recommended to be in JSON format. - **Status** (int) - The status of the task: 1 created, 2 processing, 3 success, 4 failed, others custom. - **TimeEnd** (int) - Timestamp when the task completed. - **TimeStart** (int) - Timestamp when the task was created. #### Response Example ```json { "code": 10000, "data": { "ReturnData": "", "Status": 1, "TimeEnd": 0, "TimeStart": 1724574010 }, "msg": "查询成功" } ``` ``` -------------------------------- ### Task Pool - Submit Task Result Source: https://www.fnkuaiyan.cn/WebApi/WebApi Endpoint for workers to submit the result and status of a processed task back to the task pool. ```APIDOC ## POST /WebApi/TaskPoolSetTask ### Description Submits the result and final status of a processed task back to the task pool. ### Method POST ### Endpoint `域名/WebApi/TaskPoolSetTask` ### Parameters #### Request Body - **Token** (string) - Required - Authentication token. - **TaskUuid** (string) - Required - The UUID of the task to update, obtained when retrieving the task. - **TaskStatus** (int) - Required - The final status of the task (e.g., 3 for success, 4 for failure). - **TaskReturnData** (string) - Required - The result data of the task, recommended to be in JSON format. ### Request Example ```json { "TaskUuid": "5514d5a3-6d57-4b5a-afad-31bc37054abd", "TaskStatus": 3, "TaskReturnData": "BB6CB5C68DF4652941CAF652A366F2D8" } ``` ### Response #### Success Response (10000) - **code** (int) - Response status code (10000 for success). - **msg** (string) - Response message. - **data** (Object) - Empty object for successful operations. #### Response Example ```json { "code": 10000, "data": {}, "msg": "操作成功" } ``` #### Failure Response (200) - **code** (int) - Response status code (200 for failure). - **msg** (string) - Error message, e.g., "UUid错误". - **data** (Object) - Empty object. #### Failure Response Example ```json {"code":200,"data":{},"msg":"UUid错误"} ``` ``` -------------------------------- ### POST /WebApi/GetPublicData Source: https://www.fnkuaiyan.cn/WebApi/WebApi Retrieves the value of a public variable. This endpoint is useful for accessing shared or global data within the system. ```APIDOC ## POST /WebApi/GetPublicData ### Description Retrieves the value of a specified public variable. This endpoint is available from version 1.0.284 onwards. ### Method POST ### Endpoint `/WebApi/GetPublicData` ### Parameters #### Request Body - **Name** (string) - Required - The name of the public variable to retrieve. ### Request Example ```json { "Name":"会员数据a" } ``` ### Response #### Success Response (200) - **code** (int) - Response status code, 10000 indicates success. - **msg** (string) - Response status message. - **data** (string) - The value of the public variable. #### Response Example ```json { "code": 10000, "data": "sfsfsfsdf", "msg": "获取成功" } ``` ``` -------------------------------- ### POST /WebApi/SetPublicData Source: https://www.fnkuaiyan.cn/WebApi/WebApi Sets the value of a public variable. This endpoint allows for updating shared or global data within the system. ```APIDOC ## POST /WebApi/SetPublicData ### Description Sets the value of a specified public variable. This endpoint is available from version 1.0.284 onwards. ### Method POST ### Endpoint `/WebApi/SetPublicData` ### Parameters #### Request Body - **Name** (string) - Required - The name of the public variable to set. - **Value** (string) - Required - The value to set for the public variable. ### Request Example ```json { "Name":"会员数据a", "Value":"sfsfsfsdf" } ``` ### Response #### Success Response (200) - **code** (int) - Response status code, 10000 indicates success. - **msg** (string) - Response status message. #### Response Example ```json { "code": 10000, "msg": "操作成功" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.