# couponList

优惠券列表 

## API 调用

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

#### API 调用入参

参数名             | 类型       | 是否可选 | 默认值 | 含义
:-------------- | :------- | :--- | :-- | :-----------------------------------------------------------------------------------------------------------------------
`query`         | `Object` |      |     |
`query.buyer_nick`  | `string` |  可选    |  c测试账号110 | 买家昵称
`query.limit`  | `number` |  可选    |  3 | 最多选择的优惠券数量，默认为1
`query.need_picture`  | `number` |  可选    |  0 | 0-不需要（默认） 1-需要


#### API 响应结果

参数名      | 类型  | 示例 | 含义
:------- | :-- | :----- | :---
`result` | `*` |        | 请求响应
`query.coupons`  | `object []` |  <need>    |  <default> | 优惠券列表
`query.=== id`  | `string` |  <need>    |  <default> | 优惠券id
`query.=== status`  | `number` |  <need>    |  <default> | 领取状态 0-未领取 1-已经领取
`query.=== amount`  | `number` |  <need>    |  <default> | 优惠券面额，人民币元为单位
`query.=== couponType`  | `number` |  <need>    |  <default> | 优惠券类型 0-店铺 1-商品
`query.=== startFee`  | `number` |  <need>    |  <default> | 优惠券使用条件，人民币元为单位，满200减10元，startFee为200
`query.=== title`  | `string` |  <need>    |  <default> | 优惠券名称
`query.=== startTime`  | `string` |  <need>    |  <default> | 优惠活动开始时间
`query.=== endTime`  | `string` |  <need>    |  <default> | 优惠活动结束时间
`query.=== totalCount`  | `number` |  <need>    |  <default> | 优惠券的总量
`query.=== applyCount`  | `number` |  <need>    |  <default> | 优惠券的领取数量
`query.=== hasLimit`  | `number` |  <need>    |  <default> | 优惠券是否有使用条件限制 0 -没有 1-有


#### 调用示例

```javascript
QN.app.invoke({
      api:'couponList',
      query:{
                buyer_nick : 'c测试账号110'  ,
                    limit : 3  ,
                    need_picture : 0  
            
      }
}).then(result => {
    console.log(result);
}, error => {
    console.log(error);
});
    
```
