# BTPrint

蓝牙打印小票 

## API 调用

### QN.app.invoke({api:'BTPrint', query})

#### API 调用入参

参数名             | 类型       | 是否可选 | 默认值 | 含义
:-------------- | :------- | :--- | :-- | :-----------------------------------------------------------------------------------------------------------------------
`query`         | `Object` |      |     |
`query.content`  | `string` |  可选    |  [{"type":"text","value":"蓝牙打印标题","align":"center","textSize":"2"}, {"type":"barCode","value":"123-ABC-456"}] | 需要打印的内容，JSONArray格式； 文本 text [value(String 必要)、textSize(int)字体倍数、align(String: left、center、right)]、支持\n换行 \t制表 条形码 barCode [value(String 必要)] 二维码 QRCode [value(String 必要)] （见测试用例）


#### API 响应结果

参数名      | 类型  | 示例 | 含义
:------- | :-- | :----- | :---
`result` | `*` |        | 请求响应


#### 调用示例

```javascript
QN.app.invoke({
      api:'BTPrint',
      query:{
                content : '[{"type":"text","value":"蓝牙打印标题","align":"center","textSize":"2"}, {"type":"barCode","value":"123-ABC-456"}]'  
            
      }
}).then(result => {
    console.log(result);
}, error => {
    console.log(error);
});
    
```
