🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
**一、设备绑定** 请求地址: api_url + "device/add" 请求方式:POST **必须参数如下:** ``` 1. calling_name = "字符串" //自定义打印机名称(可填) 2. device_name = "字符串" //设备ID 3. device_key = "字符串" //设备密钥 ``` **POST 数据示例:** ~~~ { //公共参数略 "calling_name": "我的设备" , "device_name": "10110011", "device_key": "f0r5f4s21f54d" } ~~~ **返回结果示例:** ~~~ { "code":0, "msg":'ok', "data":[] } ~~~ **二、解绑设备** 请求地址: api_url + "device/del" 请求方式:POST **必须参数如下:** ``` 1. device_name = "字符串" //设备ID 2. device_key = "字符串" //设备密钥 ``` **POST 数据示例:** ~~~ { //公共参数略 "device_name": "10110011", "device_key": "f0r5f4s21f54d" } ~~~ **返回结果示例:** ~~~ { "code":0, "msg":'ok', "data":[] } ~~~ **三、修改设备** 请求地址: api_url + "device/edit" 请求方式:POST **必须参数如下:** ``` 1. calling_name = "字符串" //自定义打印机名称(可填) 2. device_name = "字符串" //设备ID 3. device_key = "字符串" //设备密钥 ``` **POST 数据示例:** ~~~ { //公共参数略 "calling_name": "我的设备" , "device_name": "10110011", "device_key": "f0r5f4s21f54d" } ~~~ **返回结果示例:** ~~~ { "code":0, "msg":'ok', "data":[] } ~~~