# openCommentsComponent

评论组件 

## API 调用

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

#### API 调用入参

参数名             | 类型       | 是否可选 | 默认值 | 含义
:-------------- | :------- | :--- | :-- | :-----------------------------------------------------------------------------------------------------------------------
`query`         | `Object` |      |     |
`query.type`  | `string` |  可选    |  0 | 0.只有发布 （默认该值） 1.发布+匿名 2.发布+pk方选择 3.发布+匿名+pk方选择


#### API 响应结果

参数名      | 类型  | 示例 | 含义
:------- | :-- | :----- | :---
`result` | `*` |        | 请求响应
`query.comment`  | `string` |  <need>    |  <default> | 评论内容
`query.anonymous`  | `string` |  <need>    |  <default> | 是否匿名评论，0表示不匿名（默认），1表示匿名
`query.support`  | `string` |  <need>    |  <default> | 支持哪一方，1表示支持红方，2表示支持蓝方，0表示中立（默认中立）


#### 调用示例

```javascript
QN.app.invoke({
      api:'openCommentsComponent',
      query:{
                type : '0'  
            
      }
}).then(result => {
    console.log(result);
}, error => {
    console.log(error);
});
    
```
