Authored by tanling

手机号码隐藏和个人中心缓存迁移到网关层

## 1、获取用户地址信息列表##
获取用户地址信息列表(method=app.address.get)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway/?method=app.address.get&uid=213&debug=XYZ
### 响应(data里所有的字段返回都是string类型,响应的mobile和phone字段是明文返回)
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"address": "北京市海淀区西三旗莱圳家园12号楼4单元1502",
"address_id": "142780",
"area": "北京市 北京市 海淀区",
"area_code": "110108",
"consignee": "胡飞",
"email": "brickhu@126.com",
"is_default": "Y",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "15801384560",
"phone": "",
"uid": "24",
"zip_code": "100033"
},
{
"address": "address2",
"address_id": "1",
"area": "北京市 北京市 东城区",
"area_code": "110101",
"consignee": "zheshiyige",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "1111",
"address_id": "2",
"area": "甘肃省 兰州市 城关区",
"area_code": "620102",
"consignee": "项波",
"email": "11111@1432.com",
"is_default": "N",
"is_delivery": "Y",
"is_support": "N",
"mobile": "111111",
"uid": "24",
"zip_code": "111111"
},
{
"address": "cccccc",
"address_id": "2383763",
"area": "北京市 北京市 石景山区",
"area_code": "110107",
"consignee": "bbb",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "11122255544",
"phone": "18502010432",
"uid": "24",
"zip_code": ""
},
{
"address": "bbb",
"address_id": "2383765",
"area": "北京市 北京市 石景山区",
"area_code": "110107",
"consignee": "aaa",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "",
"phone": "18502010432",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384048",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "12369985456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384049",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "12369985456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384050",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "12369985456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384051",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "12369985456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384058",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "12369985456",
"phone": "",
"uid": "24",
"zip_code": ""
}
],
"md5": "395274c6842e6c1b60905b644621eb94",
"message": "Address List"
}
```
## 2、获取用户地址信息列表(手机号码隐藏)##
获取用户地址信息列表(method=app.address.gethidden)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway/?method=app.address.gethidden&uid=213&debug=XYZ
### 响应(data里所有的字段返回都是string类型,响应的mobile和phone字段是星号隐藏返回的)
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": [
{
"address": "北京市海淀区西三旗莱圳家园12号楼4单元1502",
"address_id": "142780",
"area": "北京市 北京市 海淀区",
"area_code": "110108",
"consignee": "胡飞",
"email": "brickhu@126.com",
"is_default": "Y",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "158****4560",
"phone": "",
"uid": "24",
"zip_code": "100033"
},
{
"address": "address2",
"address_id": "1",
"area": "北京市 北京市 东城区",
"area_code": "110101",
"consignee": "zheshiyige",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "1111",
"address_id": "2",
"area": "甘肃省 兰州市 城关区",
"area_code": "620102",
"consignee": "项波",
"email": "11111@1432.com",
"is_default": "N",
"is_delivery": "Y",
"is_support": "N",
"mobile": "111111",
"uid": "24",
"zip_code": "111111"
},
{
"address": "cccccc",
"address_id": "2383763",
"area": "北京市 北京市 石景山区",
"area_code": "110107",
"consignee": "bbb",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "111****5544",
"phone": "185****0432",
"uid": "24",
"zip_code": ""
},
{
"address": "bbb",
"address_id": "2383765",
"area": "北京市 北京市 石景山区",
"area_code": "110107",
"consignee": "aaa",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "",
"phone": "185****0432",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384048",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "123****5456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384049",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "123****5456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384050",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "123****5456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384051",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "123****5456",
"phone": "",
"uid": "24",
"zip_code": ""
},
{
"address": "按揭费拉等级分类及妇女及法律法",
"address_id": "2384058",
"area": "北京市 北京市 房山区",
"area_code": "110121",
"consignee": "及拉风",
"email": "",
"is_default": "N",
"is_delivery": "Y",
"is_support": "Y",
"mobile": "123****5456",
"phone": "",
"uid": "24",
"zip_code": ""
}
],
"md5": "52945598707e72ede675cc86f5201b9e",
"message": "Address List"
}
```
## 3、修改用户地址接口##
用户签到接口(method=app.address.update)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|id|int|是|1|0|主键id|
|uid|int|是|213|0|用户id|
|consignee|String|是|zheshiyige||adressee_name 别名|
|address|String|是|addresstest||地址|
|area_code|String|是|110101||地区码|
|mobile/phone|String|二选一|156****5158||手机号码|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway?method=app.address.update&id=1&uid=24&consignee=zheshiyige&address=address2&area_code=110101&mobile=156****5158&debug=XYZ
### 响应(data里所有的字段返回都是string类型)
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 500,
"data": {},
"md5": "f4a7a490bb6666b005008d795ed14e5d",
"message": "手机或者电话必须填写一个."
}
```
或者
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"area_code": "110101",
"is_delivery": "Y",
"is_support": "Y"
},
"md5": "8898cec96e943126e66d75f55b9372f9",
"message": "修改成功."
}
```
## 4、查询用户信息接口##
查询用户信息接口(method=app.passport.profile)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway/?method=app.passport.profile&uid=213&debug=XYZ
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"alipay_bind": "N",
"alipay_nickname": "",
"bind_gate": "Y",
"birthday": "",
"gender": "",
"head_ico": "",
"height": "",
"mobile": "",
"nickname": "213",
"profile_name": "213",
"qq_bind": "N",
"qq_nickname": "",
"sina_bind": "N",
"sina_nickname": "",
"uid": 213,
"username": "213",
"verify_email": "",
"verify_mobile": "",
"vip_info": {
"cur_level": "0",
"next_level": "1",
"title": "普通会员",
"upgrade_need_cost_str": "再消费¥600.0即可升级为银卡会员"
},
"wechat_bind": "N",
"wechat_nickname": "",
"weight": "",
"yoho_currency": 50
},
"md5": "a44f96bf1c462cabe330d23c6a186cca",
"message": "请求成功"
}
```
## 5、获取用户联系方式接口##
获取用户联系方式接口(method=web.passport.getUserContacts)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway/?method=web.passport.getUserContacts&uid=213&debug=XYZ
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"area_code": 0,
"full_address": "南京市奥体大街128号宋都奥体名座D3楼",
"phone": "025-865****6",
"qq": "214104614",
"uid": 76
},
"md5": "da3b3cb27f79a38b0837392a177f15f6",
"message": "成功"
}
```
## 6、修改用户联系方式接口##
修改用户联系方式接口(method=web.passport.modifyUserContacts)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
|area_code|String|是|110101||地区码|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway?method=web.passport.modifyUserContacts&uid=524&area_code=6010111&mobile=15651035159&phone=1565****154&debug=XYZ
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {},
"md5": "f4a7a490bb6666b005008d795ed14e5d",
"message": "修改成功"
}
```
## 7、获取用户VIP信息接口##
获取用户VIP信息接口(method=method=app.passport.vip)
#### 请求参数
| 参数名称 | 参数类型 | 可否为空 | 示例 | 默认值 | 备注 |
|:-------| -----:|-----:|-----:|-----:|----:|
|uid|int|否|213|0|用户id|
注意,通用的头部没有列出。
请求示例
http://192.168.102.217:8080/gateway?method=app.passport.vip&uid=24&debug=XYZ
### 响应
code为200即为成功,否则是失败。
响应JSON格式如下所示:
```json
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"current_total_cost": "0.00",
"current_vip_level": "0",
"current_vip_title": "普通会员",
"current_year_cost": "0.00",
"enjoy_preferential": [],
"next_need_cost": 600,
"next_vip_level": "1",
"next_vip_title": "银卡会员",
"upgrade_need_cost": "600.0",
"vip_end_time": "1480608000",
"vip_reach_time": "1447776000",
"vip_start_time": "1449072000"
},
"md5": "1cda38589f33f516232d40d9704959f8",
"message": "vip."
}
```
... ...