简要描述:
- 会员等级接口
请求域名:
- http://xx.com
请求URL:
GET/获取会员等级列表:&route=member.member-level.index
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
null |
返回示例:
正确时返回:
{
"result": 1,
"msg": "ok",
"data": {
"shop_set": {
"name" => "哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
"logo" => "images/6/2018/04/yCfnKfcWicKXATi5fKI0watW8K0tz0.jpg"
"signimg" => ""
"cservice" => "https://eco-api.meiqia.com/dist/standalone.html?eid=9669"
"diycode" => ""
"copyright" => ""
"credit" => "哈哈币"
"credit1" => "积分
},
"shop_description": "撒打算打算"
"level_type": "2",
"data": [
{
"id": 7,
"level_name": "第一",
"discount": "1",
"freight_reduction": "11",
"goods": {
"id": 100,
"title": "测试商品",
"thumb": "",
"price": "200.00"
},
"rent_free": "1",
"deposit_free": "1"
},
{
"id": 8,
"level_name": "第二",
"discount": "",
"freight_reduction": "",
"goods": {
"id": 127,
"title": "测试",
"thumb": "",
"price": "1.00"
},
"rent_free": "1",
"deposit_free": "1"
}
],
"member_data": {
"level_id": 7,
"level_name": "第一",
"rights": {
"discount": "1",
"freight_reduction": "1",
"rent_free": "1",
"deposit_free": "1"
},
"nickname": "Joe",
"avatar": "",
"validity": 2
}
}
}
错误时返回:
{
"result":0,
"msg":"未进行等级设置",
"data":[]
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
shop_set.name | string | 商城名称 |
shop_set.cservice | string | 客服地址 |
shop_description | text | 商城描述 |
member_data 参数说明
参数名 | 类型 | 说明 |
---|---|---|
level_id | int | 等级id 为0时隐藏rights不返回 |
level_name | string | 等级名称 |
nickname | string | 用户昵称 |
avatar | string | 头像 |
validity | int | 等级有效天数 |
rights | obj | 权益 |
discount | int | 折扣 rights下 |
freight_reduction | string | 运费减免 rights下 |
rent_free | int | 免租金件数 rights下 为 null 时不显示 |
deposit_free | int | 免押金件数 rights下 为 null 时不显示 |
data 参数说明
参数名 | 类型 | 说明 |
---|---|---|
level_type | string | 升级条件类型,0:订单金额1:订单数量;2:指定商品 |
level_name | string | 等级名称 |
discount | string | 折扣 |
freight_reduction | string | 运费减免 |
rent_free | int | 免租金件数 为 null 时不显示 |
deposit_free | int | 免押金件数 为 null 时不显示 |
order_money | string | 订单金额(level_type为0时返回) |
order_count | string | 订单数量(level_type为1时返回) |
goods | array | 商品数据(level_type为2时返回) |
备注:
level_type 等于 2 时 返回的是goods 类型:数组;order_money与order_count不会返回
level_type 等于 0 时返回order_money 类型:字符串;goods与order_count不会返回
level_type 等于 1 时返回order_count 类型:字符串;goods与order_money不会返回
当goods、order_money或order_count为空,表示不自动升级
- 更多返回错误代码请看首页的错误代码描述