@lina
2021-02-02T04:21:33.000000Z
字数 37787
阅读 1466
列表项
志多星
1.0
前端
- 【测试url】http://api.volunteer.alpha.guangying.link/api/v1
- 【线上url】/api/v1
X-auth-token
: [string] 登录后获取的token
信息, 取window.token 请求头带此字段X-org-code
: [string]https://www.zybuluo.com/mdeditor# 机构表识字段,所有请求均需要此字段,取window.orgCode 请求头带此字段X-location
: [string] 坐标 lng-lat 请求头带此字段X-unique-key
: [string] 服务端下发的标识,取window.uniqueKey 请求头带此字段X-city
: [string] 所在城市名称 请求头带此字段X-platform-code
: [string] 平台标识字段,所有请求均需要此字段,取window.platformCode 请求头带此字段
- POST请求Content-Type为:Content-Type:application/x-www-form-urlencoded
- 文件上传时Content-Type为:Content-Type:multipart/form-data
- 对于:Content-Type:application/json:Content-Type:application/xml不保证完全支持,请谨慎使用
- 【线上url】待定
- 【测试url】http://api.volunteer.alpha.flashdiet.cn/api/
- 【线上url】/api/
通用图片上传文件服务
请求URL
POST
/imgupload
请求参数
file
: 文件
响应
{
error_code: 0,
data: {
url: 'http://xxx'
}
}
url
: [string] 文件的访问URL
注:请求图片时,需解析图片的cookie,不然无法认证
GET
/captcha
POST
/verifycode
请求参数
captcha_code
: [string] 图形验证码phone
: [string] 手机号
响应
{
error_code: 0,
data: {
}
}
get
/city
请求参数
parent_id
: [integer] 当不传值时,取parent_id=0的数据,即省、直辖市
响应
{
error_code: 0,
data: {
"list": [
{
"id": 0,
"parent_id": 0,
"name": "string",
"short_name": "string",
"pinyin": "string",
"sort": 0,
}
]
}
}
get
/area/city
请求参数
name
: [string] 城市名称
响应
{
error_code: 0,
data: {
"list": [
{
"id": 0,
"parent_id": 0,
"name": "string",
"short_name": "string",
"pinyin": "string",
"sort": 0,
}
]
}
}
error_code
: [int] 服务器状态码,0 为正常状态,异常状态待定。error_message
:[string] 错误信息,但error_code
不为 0 时返回
data
: [object] 数据字段,所有响应数据都在此字段中list
: [array],当返回数据为列表时会将数据放在该字段
page
: [object] 分页信息,当返回数组数据时会携带该字段
current_page
: [int] 当前页码,默认为1total_page
: [int] 总页数page_size
: [int] 每页数量:本项目常用page_size==10
示例
{
error_code: 0,
data: {
key: value,
list: [{
key: value
}],
page {
}
}
}
sex
:[int]0: 未知
1: 男
2: 女
verify_status
:[int]-1: 未提审
0: 审核中
1: 通过
2: 驳回
in_blacklist
:[int]0: 不在
1: 在
jump_mode
: [int]0:不跳转
1:跳转指定url 取href字段
2:跳转项目 [后台暂未实现]
3:跳转团队 [后台暂未实现]
examine
: [int]0:开启审核
1:关闭审核
is_display
: [int]0:上架
1:下架
status
: [int]0:通过
1:已拒绝
2:待审核
state
: [int]0:未领取
1:已领取
budget_type
: [int]0:活动成本
1:管理成本
2:服务费
status
: [int]0:待审核
1:已通过
2:被驳回
3:已撤销
status
: [int]2:招募中
3:进行中
4:已招满
5:已结束
6:招募截止
10:未提交
11:待审核
12:审核驳回
13:已下架
{
id: 123,
username: '梦里花落知多少',
phone: '15500000000',
avatars: 'http://image.com/1.jpeg',
real_name: '',
nation: '汉族',
sex: 0,
birthday: 2013-03-03,
identifier: 'V170924000008',
slogan: '明天更美丽',
reward_time: 12.5,
id_number: 110101198803031321,
province_id: 12,
province_name: '河北',
city_id: 1212,
city_name: '保定',
county_id: 121212,
county_name: '望都县',
addr: 'xx路xx小区',
family_id: 0,
relation: '儿子',
join_family_time: '2017-09-09 13:13:13',
good_at: [{}],
join_project_count: 10,
register_time: '2017-09-09 13:13:13',
server_time: '2017-09-09 13:13:13',
token:'aaaaaaa',
email: 'aaa@163.com',
score: 15,
in_blacklist:1,
have_pwd:1,
stars: 1,
achievement: 4,
growth: 4000,
}
id
: [int] 用户IDusername
: [string] 用户名phone
: [string] 用户手机avatars
: [string] 头像real_name
: [string] 姓名nation
: [string] 民族sex
: [integer] 性别birthday
: [string] 生日identifier
: [string] 编号slogan
: [string] 口号reward_time
: [float] 奖励时长id_number
: [string] 身份证号province_id
: [integer] 省份idprovince_name
: [string] 省份名称city_id
: [integer] 城市idcity_name
: [string] 城市名称county_id
: [integer] 区县idcounty_name
: [string] 区县名称addr
: [string] 地址family_id
: [integer] 家庭id,是否加入idrelation
: [string] 与户主关系join_family_time
: [string] 加入家庭时间good_at
: [array] 个人擅长join_project_count
: 服务项目个数register_time
: 注册时间server_time
: 服务器时间token
: [string] token,用户登录态,仅登陆接口下发score
: [integer] 分数in_blacklist
: [integer] 是否加入黑名单have_pwd
: [integer] 0没有,用户设置文案出“设置密码” 1有密码,用户设置文案出“修改密码”stars
: [integer] 星级achievement
: [integer] 完成成就个数growth
: [integer] 成长值
{
id: 123,
name: '服务远征1号队',
slogan: '服务为名',
logo: 'http://image.com/1.jpg',
photo: ['http://image.com/1.jpg',],
team_photo: ['http://image.com/1.jpg',],
type: '企事业单位'
team_size: 111,
identifier: 'aaa',
contact_name: '张三',
contact_phone: '18866666666',
contact_addr: '某某省某某市',
province_id: 12,
province_name: '河北',
city_id: 1212,
city_name: '保定',
county_id: 121212,
county_name: '望都县',
addr:'xx区'
reward_time: 12.5,
abstract: '团队市很棒的',
created_at: '2017-03-03',
parent: @团队信息
category: @服务类别
service_object: @服务对象
join_type: 1
join_status: 1
collection_status: 1
stars: 1,
}
id
: [integer] IDname
: [string] 团队名称slogan
: [string] 口号logo
: [string] logophoto
: [array] bannerteam_photo
: [array] 活动图type
: [string] 类型team_size
: [integer] 团队人数identifier
: [string] 编号contact_name
: [string] 联系人contact_phone
: [string] 联系人手机contact_addr
: [string] 联系人地址province_id
: [integer] 省份idprovince_name
: [string] 省份名称city_id
: [integer] 城市idcity_name
: [string] 城市名称county_id
: [integer] 区县idcounty_name
: [string] 区县名称addr
: [string] 地址reward_time
: [int] 累计时长abstract
: [string] 简介created_at
: [string] 创建时间category
: [object] @服务类别service_object
: [object] @服务对象parent
: [object] @团队信息join_type
: [integer] 团队加入类型,1免审加入、2需要审核加入、3不允许任何人加入join_status
: [integer] -1未提交 0审核中 1通过 2驳回, 团队详情页,我的团队列表页,下发此字段collection_status
: [integer] 0未收藏 1已收藏, 团队详情页下发此字段stars
: [integer] 星级
{
id: 123,
name: '程序员慰问团',
list_photo: 'http://image.com/1.jpg'
photo: ['http://image.com/1.jpg',],
identifier: '',
province_id: '100100'
province_name: '河北',
city_id: 11,
city_name: '保定',
county_id: 11,
county_name: '望都',
addr: 'ssss',
content: '富文本',
join_end: '2017-10-10',
begin: '2013-03-03 12:12:12',
end: '2013-03-03 12:12:12',
people_count: 133,
join_people_count: 13,
lng: 123.123433,
lat: 40.984,
reward_time: 13.5,
created_at: '2017-11-11 11:11:11',
project_status: 2,
distance": 2554.5801072666,
team: @团队信息
category: @服务类别
service_object: @服务对象
join_status: 1,
my_reward_time: 10,
collection_status: 1
contact_name: "张三",
contact_phone: "133333333",
contact_phone_public: 0,
custom_config:{},
custom_payment_config:{},
}
id
: [integer] 活动IDname
: [string] 活动名称list_photo
: [string] 列表大图photo
: [array] 详情页轮播图identifier
: [string] 项目编号province_id
: [integer] 省份idprovince_name
: [string] 省份名称city_id
: [integer] 城市idcity_name
: [string] 城市名称county_id
: [integer] 区县idcounty_name
: [string] 区县名称addr
: [string] 地址content
: [string] 富文本内容join_end
: [date] 结束报名时间begin
: [datetime] 活动开始时间end
: [datetime] 活动结束时间people_count
: [integer] 活动人数join_people_count
: [integer] 参加活动人数lng
: [float] 经度lat
: [float] 纬度reward_time
: [float] 活动时长/奖励时长created_at
: [string] 创建时间project_status
: [integer] 活动状态 '1'=>'未开始', '2'=>'招募中', '3'=>'已满员', '4'=>'进行中', '5'=>'已结束'team
: [object] @团队信息category
: [object] @服务类型service_object
: [object] @服务对象join_status
: [integer] -1没加入项目或者用户没登陆 0审核中 1通过 2驳回, 详情页下发,登陆后如加入项目才有此字段my_reward_time
: [float] 详情页下发,登陆后如加入项目才有此字段collection_status
: [integer] 0未收藏 1已收藏, 详情页下发此字段contact_phone_public
: [integer] 0不公开 1公开, 详情页下发此字段contact_name
: [string] 联系人contact_phone
: [string] 联系电话custom_config
: [array] 参考 2.2.20 仅详情页下发custom_payment_config
: [array] 参考 2.2.21
{
service_category_name: '赛事服务'
}
service_category_name
: [string] 类型名称
{
service_object_name: 'aaa',
}
service_object_name
: [string] 服务对象名称
{
id: 123,
title: '活动',
photo: 'http://image.com/111',
jump_mode: 1,
jump_id: 1,
href: 'htttp://www.baidu.com',
type:'0'
}
id
: [integer] IDtitle
: [string] titlephoto
: [string] 图片地址jump_mode
: [integer] 跳转类型jump_id
: [integer] 跳转idhref
: [string] 跳转地址type
: [integer] banner类型 0首页 1积分商品
{
id: 123,
project: @项目信息
reward_time: 3.5,
content: '文字描述',
attachment: [],
verify_status: 1,
verify_msg: '通过',
}
id
: [integer] IDproject
: [object] @项目信息reward_time
: [float] 申请时长content
: [string] 申请内容attachment
: [array] 附件verify_status
: [integer] 审核状态verify_msg
: [string] 审核内容
{
id: 123,
type: 1,
title: '标题',
content: '文字描述',
publish_time: '2017-09-25 23:05:23',
username: "wang59",
avatars: "http://image.com/1.jpeg"
}
id
: [integer] IDtype
: [float] 类型 0全量消息,1单发消息title
: [string] 标题content
: [string] 内容publish_time
: [string] 发布时间username
: [string] 消息发送人avatars
: [string] 消息发送人头像
{
"id": 22,
"clock_in_time": "2017-11-27 13:59:44",
"clock_end_time": "0000-00-00 00:00:00",
"type": 1,
"apply_id": 0,
"clock_in_addr": "",
"clock_in_lat": 0,
"clock_in_lng": 0,
"clock_end_addr": "",
"clock_end_lat": 0,
"clock_end_lng": 0,
"reward_time": "3.00"
}
id
: [integer] IDclock_in_time
: [string] 打卡or签到时间clock_end_time
: [string] 签退时间type
: [integer] 补卡or正常打卡 type=0 补卡 type=1正常打卡apply_id
: [integer] 补卡idclock_in_addr
: [string] 打卡or签到地点clock_in_lat
: [float] 打卡or签到纬度clock_in_lng
: [float] 打卡or签到经度clock_end_addr
: [string] 签退地点clock_end_lat
: [float] 签退纬度clock_end_lng
: [float] 签退纬度reward_time
: [float] 时长
{
"id": 1,
"name": "张三",
"avatars": "http://alpha.api.volunteer.tmallwo.com/images/1.jpg",
"political_affiliation": "党员",
"workplace": "北京",
"abstracts": "简介",
"description": "描述"
}
id
: [integer] IDname
: [string] 姓名avatars
: [string] 头像political_affiliation
: [string] 政治面貌workplace
: [string] 工作单位abstracts
: [string] 简介description
: [string] 详情
{
"id": 1,
"price": "100.00",
"name": "保险",
"photo": "http://image.com",
"company": "中国保险",
"description": "描述",
"detail_link": "http://baidu.com"
}
id
: [integer] IDname
: [string] 保险名称price
: [string] 价格photo
: [string] 图片company
: [string] 机构description
: [string] 简介detail_link
: [string] 详情链接
{
"id": 1,
"team_name": "青岛志愿者1对",
"logo": "http://alpha.api.volunteer.tmallwo.com/images/11.jpg",
"name": "活动那个名称 ",
"address": "地址",
"begin": "2017-12-25 11:08:36",
"end": "2017-12-30 11:07:32",
"cover": "http://alpha.api.volunteer.tmallwo.com/images/2.jpg",
"banner":["http://alpha.api.volunteer.tmallwo.com/images/uploads/2017-10/115121508466952.jpeg"],
"publish_time": "2017-12-25 11:07:46",
"content": "1111",
"claim_status": 1,
"join_status": 1,
"claim_list":[@认领信息],
}
id
: [integer] 活动IDteam_name
: [string] 团队名logo
: [string] 团队logoname
: [array] 项目名称address
: [string] 地址begin
: [string] 开始认领时间end
: [string] 结束时间cover
: [string] 活动列表图banner
: [array] 活动banner图publish_time
: [string] 发布时间content
: [string] 内容claim_status
: [integer] 认领项目状态 1未开始 2认领中 3已结束join_status
: [integer] 用户是否认领 1已认领 0未认领 详情页下发claim_list
: [array] 认领的列表 @认领信息 详情页下发
{
id: 123,
team_name: '程序员慰问团',
created_at: '2013-03-03 12:12:12',
}
id
: [integer] IDteam_name
: [string] 团队名称created_at
: [string] 认领时间
{
"id": 1,
"score": "10",
"remark": "注册奖励",
"created_at": "2017-12-15 17:04:50"
}
id
: [integer] IDscore
: [integer] 团队名称remark
: [string] 原由created_at
: [string] 时间
注:此字段会再渲染页面时,在window.orgInfo里
org_info
: [string] 平台介绍富文本org_manual
: [string] 使用帮助富文本org_service
: [string] 客服中心富文本org_service_tel
: [string] 客服电话org_service_guide
: [string] 引导用户修改密码富文本real_name_register
: [int] 是否要求实名注册
{
"id": 1,
"type": 1,
"content": "这次志愿者活动",
"photo": ['imageurl'],
"like_count": 1,
"comment_count": 1,
"created_at": "5分钟前",
"user_info": {},//用户信息
"project_info": @项目想,
"team_info": @团队信息,
"like_list": [@用户信息],
"comment_list": [@社区话题评论信息],
"is_like":1
}
id
: [integer] IDtype
: [integer] 类型 type=1,2,3 分别表示不关联、关联项目 关联团队content
: [string] 心情photo
: [array] 图片like_count
: [integer] 点赞总数comment_count
: [integer] 评论总数created_at
: [string] 发布时间user_info
: [object] 发布人project_info
: [object] 项目信息 如type=2 有此字段team_info
: [object] 团队信息 如type=3 有此字段like_list
: [array] 点赞用户信息comment_list
: [array] 评论信息is_like
: [integer] 是否已点赞 如登陆且点赞则为1,否则为0
{
"id": 1,
"comment": "挺好的",
"created_at": "2017-12-15 17:04:50",
"feeling_id": 11,
"is_display": 1,
"feeling_is_display": 1,
"user_info": {},//用户信息
"comment_to": {},//用户信息
"is_new":1
}
id
: [integer] IDcomment
: [string] 评论内容created_at
: [string] 评论时间feeling_id
: [integer] 被评论的话题idis_display
: [integer] 是否显示 1显示 0不显示(已删除)feeling_is_display
: [integer] 话题是否显示 1显示 0不显示(已删除)user_info
: [object] 评论的用户信息(仅有头像和昵称)comment_to
: [object] 被评论的用户信息(仅有头像和昵称), 仅回复别人时才有is_new
: [integer] 是否为新消息,1为新消息
{
"id": 1,
"open_custom_config": 0,
"custom_config": {},
"open_stars": 0,
"open_volunteer_certificate": 0,
}
id
: [integer] 机构id: [integer] 是否开启志愿者信息完善功能 0关闭 1开启 废弃 沿用原有的real_name_register
open_custom_configcustom_config
: [text] json格式,详见2.2.19open_stars
: [integer] 是否开启星级open_volunteer_certificate
: [integer] 是否开启志愿者证书功能 0不开启 1开启
{
"open_real_name": 0,
"open_avatars": 0,
"open_id_number": 0,
"open_nation": 0,
"open_addr": 0,
"extends":[
{
"key": "字段名",
"label":"职业",
"type":1,
"options":"老师,医生,律师",
"is_required" 1,
},
{
"key": "字段名",
"label":"职业",
"type":1,
"options":"老师,医生,律师",
"is_required" 1,
},
],
}
open_real_name
: [integer] 是否开启姓名 0不开启 1开启open_avatars
: [integer] 是否开启头像 0不开启 1开启open_id_number
: [integer] 是否开启身份证 0不开启 1开启open_nation
: [integer] 是否开启名族 0不开启 1开启open_addr
: [integer] 是否开启地址验证 0不开启 1开启
以上五个字断oost传参同3.1.5接口extends
: [array] 扩展字断,字段含义如下
key
: [string] 字段名,用作上传时的参数名
label
: [string] 展示名称
type
: [string] 类型 1单项选择 select, 2多项选择 3单行输入 4多行输入 5上传图片 6日期空间 7日期时间空间
options
: [string] 仅当type=1,2时有用,用英文逗号分割
is_required
: [integer] 是否比输 0非必输 1必输
- 以上参数在传参时,请用数组上传,数组的键使用key的值,eg:
<input type="text" name="extends[职业]" />
[
{
"key": "字段名",
"label":"职业",
"type":1,
"options":"老师,医生,律师",
"is_required" 1,
},
{
"key": "字段名",
"label":"职业",
"type":1,
"options":"老师,医生,律师",
"is_required" 1,
},
]
extends
: [array] 扩展字断,字段含义如下
key
: [string] 字段名,用作上传时的参数名
label
: [string] 展示名称
type
: [string] 类型 1单项选择 select, 2多项选择 3单行输入 4多行输入 5上传图片 6日期空间 7日期时间空间
options
: [string] 仅当type=1,2时有用,用英文逗号分割
is_required
: [integer] 是否比输 0非必输 1必输
- 以上参数在传参时,请用数组上传,数组的键使用key的值,eg:
<input type="text" name="extends[职业]" />
[
{
"key": "字段名",
"amount":100.00,
"label":"T恤",
"is_required" 1,
},
]
payment
: [array] 扩展字断,字段含义如下
key
: [string] 字段名,用作上传时的参数名
amount
: [float] 单价
label
: [string] 商品名称
is_required
: [integer] 是否比输 0非必买 1必买
- 以上参数在传参时,请用数组上传,数组的键使用key的值,val请传用户购买数量,eg:
<input type="text" name="payment[字段名]" />
{
id: 1,
title: '活动',
photo: 'http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg',
content: "<div>富文本</div>"
publish_time: "2017-02-17 13:00:00",
}
id
: [int] IDtitle
: [string] titlephoto
: [string] logo图片content
: [string] 富文本内容publish_time
: [string] 发布时间
{
"id": 1,
"org_info": [@机构信息],
"team_id": [@团队信息],
"g_name": "水杯",
"sponsor":"星巴克",
"thumbnail": "/uploads/2017-09/246251506503134.png",
"g_img": "/uploads/2017-09/246251506503134.png",
"content": "超级好用",
"access": "包你满意",
"type": 0,
"price": "180.00",
"points": 180,
"g_num": 10,
"u_num": 1,
"start_time": "2017-09-27",
"end_time": "2017-09-27",
"created_at": "2017-09-27 17:07:08",
"updated_at": "2017-09-27 17:07:08",
"auto_time": "2017-09-27 17:07:08",
"examine": 0,
"is_display": 1,
"condition":"女士,vip"
}
id
: [integer] 商品IDorg_info
: [object] 关联的机构信息team_info
: [object] 关联的团队信息g_name
: [string] 商品名称sponsor
: [string] 供应商thumbnail
: [string] 小图g_img
: [string] 大图content
: [text] 商品描述access
: [string] 购买成功描述type
: [integer] 商品类型price
: [decimal] 市场价值points
: [integer] 消耗积分g_num
: [integer] 库存u_num
: [integer] 限制购买数量created_at
: [date] 开始时间updated_at
: [date] 结束时间auto_time
: [datetime] 自动下架时间examine
: [integer] 是否审核 0开启审核 1关闭审核is_display
: [integer] 上下架 0上架 1下架condition
: [string] 限制购买标签 英文,分割
{
"id": 1,
"order_num":"aaaaaa111111",
"org_id": 1,
"team_id": 0,
"goods_info": [@商品信息],
"user_id":1,
"status": 0,
"num": 1,
"points": 180,
"collect_time":"2017-09-27 17:07:08",
"created_at": "2017-09-27 17:07:08",
"updated_at": "2017-09-27 17:07:08",
"state":0,
"reason":""
}
id
: [integer] 订单IDorder_num
: [string] 订单编号org_id
: [integer] 关联的机构 idteam_id
: [integer] 关联的团队 idgoods_info
: [object] 关联的商品信息user_id
: [integer] 关联的用户 idstatus
: [integer] 审核状态 0通过 1已拒绝 2待审核num
: [integer] 购买时数量points
: [integer] 购买时消费积分collect_time
: [datetime] 领取时间state
: [integer] 领取状态 0未领取 1已领取reason
: [string] 拒绝理由
{
name: '活动',
logo: 'http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg',
href: "http://wxxxx"
project: 12,
reward_time:133
org_info:'机构介绍'
}
name
: [string] 机构名称logo
: [string] logohref
: [string] 机构的首页地址project_count
: [string] 项目总数reward_time
: [string] 累计时长org_info
: [string] 机构介绍
{
achieve_key: 'key_name',
name: '成就名称',
icons: ['http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg',]
optional: 1
}
achieve_key
: [string] 成就标识name
: [string] 成就名称icons
: [array] 成就图optional
: [integer] 是否开启等级
{
"level": 0,
"name":'爱心新秀', #等级名称
"growth": 0, #超过此成长值获得该等级
}
level
: [integer] 等级name
: [string] 等级名称growth
: [integer] 最低成长值
{
"id": 23,
"begin": "2017-11-12 20:00:00",
"end": "2017-11-13 00:00:00",
"reward_time": "0.50",
"type": 1,
"province_id": 0,
"province_name": "",
"city_id": 0,
"city_name": "",
"county_id": 0,
"county_name": "",
"lat": 0,
"lng": 0,
"distance": 0,
"status": 0,
}
id
: [integer] 班次idbegin
: [string] 开始打卡or签到时间要求end
: [integer] 结束打卡or签退的时间reward_time
: [string] 奖励时长type
: [integer] 类型,type=1为打卡类型,type=2为签到类型province_id
: [integer] 省份idprovince_name
: [string] 省份名称city_id
: [integer] 城市idcity_name
: [string] 城市名称county_id
: [integer] 区县idcounty_name
: [string] 区县名称lat
: [float] 打卡坐标的纬度lng
: [float] 打卡坐标的经度distance
: [float] 距离status
: [integer] 用户在该打卡的状态, 待签到 => 0, 待签退 => 1,未签到 => 2,未签退 => 3,已打卡 => 4,审核中 => 5,已通过 => 6,被驳回 => 7
{
"id": 1,
"name": 发布人,
"phone": 电话,
"category": 类别,
"title": 标题,
"content": 详情,
"village": 乡镇,
"addr": 详细地点,
"team_id": 1,
"team_name": 关联的团队名字,
"project_id": 1,
"project_name": 关联的项目名字,
"status": 2,
}
id
int(11) NOT NULL,name
varchar(64) NOT NULL,phone
varchar(255) NOT NULL COMMENT '手机号',category
varchar(11) NOT NULL COMMENT '类别',title
varchar(64) NOT NULL COMMENT '标题',content
text(0) NOT NULL COMMENT '详情',village
varchar(11) NOT NULL COMMENT '乡镇',addr
varchar(64) NOT NULL COMMENT '详细地点',team_id
int(11) COMMENT '关联的团队id',team_name
varchar(64) COMMENT '关联的团队名字',project_id
int(11) COMMENT '关联的项目id',project_name
varchar(64) COMMENT '关联的项目名字',status
int(2) COMMENT '需求状态 0:待审核 1:服务中 2:已完成 3:已拒绝',created_at
timestamp(0),updated_at
timestamp(0),
"id" : 基地id ,
"name" : 基地名称 ,
"address" : 地址 ,
"contacts" : 联系人 ,
"phone" : 手机号 ,
"base_url" : 图片地址 (相对路径) ,
"desc" : 详情 说明 ,
"base_state" : 上下架状态 0下架 1上架 ,
"status" : 启用(删除)状态 0禁用 1启用 ,
id
int(11) NOT NULL,name
varchar(64) NOT NULL,phone
char(13) NOT NULL COMMENT '手机号',contacts
varchar(64) NOT NULL COMMENT '联系人',address
varchar(255) NOT NULL COMMENT '地址',desc
text(0) NOT NULL COMMENT '详情',base_url
varchar(255) NOT NULL COMMENT '图片url',base_state
int(11) NOT NULL COMMENT '上下架状态 0下架 1上架',status
int(11) COMMENT '删除状态',created_at
timestamp(0),updated_at
timestamp(0),
"id" : 基地分类id ,
"name" : 基地分类名称 ,
"status" : 启用(删除)状态 0禁用 1启用 ,
id
int(11) NOT NULL,name
varchar(64) NOT NULL,status
int(11) COMMENT '禁用(删除)状态 0禁用 1启用',created_at
timestamp(0),updated_at
timestamp(0),
请求URL
POST
/register
请求参数
username
: [string] 用户名 【非必填】 实名注册时非必填photo
: [string] 手机号码 【必填】verify_code
: [string] 验证码 【必填】pwd
: [string] 密码【必填】avatars
: [string] 头像 【非必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
POST
/login
请求参数
username
: [string] 用户名 or 手机号 or 身份证号码 【必填】pwd
: [string] 密码【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/user
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
POST
/user
请求参数
avatars
: [url] 头像 【非必填】good_at
: [array] 个人擅长文本【非必填】slogan
: [string] 口号 【非必填】pwd
: [string] 密码 【have_pwd = 0 时必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
POST
/user/check
请求参数
avatars
: [url] 头像 【非必填】real_name
: [string] 真实姓名 【必填】num_type
: [int] 证件类型 【必填】1内地 2香港 3澳门 4台湾 5护照id_number
: [string] 身份证号 会校验此字段,根据字段生产性别、生日【必填】nation
: [string] 民族【必填】province_id
: [integer] 省份id 【必填】city_id
: [integer] 城市id 【必填】county_id
: [integer] 区县id 【必填】addr
: [string] 详细地址 【必填】extends[*]
: [string] 用户自定义字段 *号表示自定义字段的label, 详见2.1.19
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
POST
/check/edit
请求参数
nation
: [string] 民族birthday
: [string] 出生日期 【用户身份证非18位可修改】sex
: [integer] 性别【用户身份证非18位可修改】province_id
: [integer] 省份idcity_id
: [integer] 城市idcounty_id
: [integer] 区县idaddr
: [string] 详细地址extends[*]
: [string] 用户自定义字段 *号表示自定义字段的label, 详见2.1.19
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
注:使用3.1.21接口发送短信
请求URL
POST
/reset/pwd
请求参数
phone
: [string] 手机号码 【必填】verify_code
: [string] 验证码 【必填】pwd
: [string] 密码【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
POST
/user/collection
请求参数
type
: [integer] 0项目 1团队 【必填】id
: [integer] 收藏的id【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
post
/user/uncollection
请求参数
type
: [integer] 0项目 1团队 【必填】id
: [integer] 收藏的id【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/user/collection
请求参数
type
: [integer] 0项目 1团队 【必填】
响应
{
"error_code": 0,
"data":{
"list":[
@项目信息 or @团队信息
]
},
"error_message": ""
}
请求URL
get
/user/team
响应
{
"error_code": 0,
"data":{
"list":[
@团队信息
]
},
"error_message": ""
}
请求URL
get
/user/project
请求参数
status
: [intger] 1待录用 2已录用 3已结束 【非必填】
响应
{
"error_code": 0,
"data":{
"list":[
@团队信息
]
},
"error_message": ""
}
请求URL
get
/user/reward/time
响应
{
"error_code": 0,
"data":{
"reward_time": 13.5,
"join_project_count": 13,
"project":[
@项目信息
]
},
"error_message": ""
}
请求URL
get
/user/apply
响应
{
"error_code": 0,
"data":{
"list":[
@时长申请信息
]
},
"error_message": ""
}
请求URL
post
/user/apply
请求参数
project_id
: [integer] 项目id 【必填】reward_time
: [float] 补录时长 【必填】content
: [string] 申请内容【必填】attachment
: [array] 申请附件【非必填】
响应
{
"error_code": 0,
"data":{
@时长申请信息
},
"error_message": ""
}
注:报名且被录用的项目
请求URL
get
/project/apply
响应
{
"error_code": 0,
"data":{
"list":[
@项目信息
]
},
"error_message": ""
}
注:家庭成员数和家庭总时长请求此接口获取
请求URL
get
/myfamily
响应
{
"error_code": 0,
"data":{
"family_size": 10,
"reward_time": 25.9,
"family":[
@用户信息
]
},
"error_message": ""
}
请求URL
post
/myfamily
请求参数
real_name
: [string] 真实姓名 【必填】id_number
: [string] 身份证号 会校验此字段,根据字段生产性别、生日【必填】nation
: [string] 民族【必填】province_id
: [integer] 省份id 【必填】city_id
: [integer] 城市id 【必填】county_id
: [integer] 区县id 【必填】addr
: [string] 详细地址 【必填】pwd
: [string] 密码 【必填】relation
: [string] 关系 【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/myfamily/{id}
请求参数
id
: [integer] 用户id,家庭用户列表接口中的id【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/message
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@消息信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
post
/clock/in
请求参数
code
: [string] 二维码的字符串 or 口令【必填】type
: [integer] 打卡类型 1二维码打卡 2口令打卡【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/clock/in
响应
{
"error_code": 0,
"data":{
"list":[
@打卡信息 //已完成的打卡记录
],
"next": //下次打卡信息提示
{
"begin":"2017-10-11 11:11:11",
"end":"2017-10-11 11:11:11",
"reward_time": 2.0,
"project":@项目信息
}
},
"error_message": ""
}
请求URL
get
/user/center
响应
{
"error_code": 0,
"data":{
"user":@用户信息,
"team_count": 1, //团队总数
"project_count": 3, //项目总数
"msg_count": 0, //未读消息数
"comment_count": 1,//未读社区评论数
},
"error_message": ""
}
请求URL
POST
/phone/verifycode
请求参数
phone
: phone【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/logout
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
delete
/myfamily/{id}
请求参数
id
: [integer] 用户id,家庭用户列表接口中的id【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/weixin/media
请求参数
media_id
: [string] 素材id【必填】
响应
{
"error_code": 0,
"data":{
'url':'http://img.jpg',
},
"error_message": ""
}
请求URL
post
/myfamily/bind
请求参数
phone
: [string] 手机号 【必填】pwd
: [string] 密码 【必填】˚didrelation
: [string] 关系 【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
put
/myfamily/{id}
请求参数
id
: [integer] 用户id,家庭用户列表接口中的id 【必填】pwd
: [string] 密码 【非必填】relation
: [string] 关系 【非必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
post
/login/phone
请求参数
photo
: [string] 手机号码 【必填】verify_code
: [string] 验证码 【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/banner
响应
{
"error_code": 0,
"data":{
list:[
@Banner信息
]
},
"error_message": ""
}
请求URL
get
/index
响应
{
"error_code": 0,
"data":{
"banner"[
@Banner信息
],
"project":[
@项目信息
],
"news":[
@新闻信息
],
},
"error_message": ""
}
请求URL
get
/project
请求参数
name
: 项目名称,模糊匹配【非必填】team_id
: 项目id【非必填】service_object
: 服务对象【非必填】service_category
: 服务类别【非必填】sort
: 排序规则【非必填】默认按发布时间 [distance|time|recommend]recommend
: 【非必填】是否推荐current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@项目信息
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/project/{id}
请求参数
id
: 项目id【必填】preview
: 预览项目,无视项目是否上线【非必填】 请传1
响应
{
"error_code": 0,
"data":{
@项目信息
},
"error_message": ""
}
如需要支付,会返回特殊的结构 ,微信公众号支付返回payConfig字断;H5支付返回wechatPayUrl,收到url直接跳转到该url即可唤起支付
请求URLhttp://wx8b7f9e8dc8e839cb.wechat.alpha.flashdiet.cn/
post
/project/join/{id}
请求参数
id
: 项目id【必填】type
: 类型0退出 1加入【必填】extends[*]
: [string] 用户自定义字段 *号表示自定义字段的label, 详见2.1.20, 【非必填】payment[*]
: [string] 项目自定义支付 *号表示自定义字段的name, 值取商品数量, 详见2.1.21
响应【非必填】
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/project/user/{id}
请求参数
id
: 项目id【必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@用户信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/team
请求参数
team_type
: 团队类别【非必填】service_category
: 服务类别【非必填】service_object
: 服务对象【非必填】county_id
: 区域id【非必填】name
: 团队名称,模糊匹配【非必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@团队信息
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
post
/project/pay/result/{sn}
请求参数
sn
: payment返回的支付交易号【必填】
{
"error_code": 0,
"data":{
"code": 0, //0失败 1成功
"desc": "待支付",
"project_id": "72" //项目id
},
"error_message": ""
}
请求URL
get
/team/{id}
请求参数
id
: 项目id【必填】
响应
{
"error_code": 0,
"data":{
@团队信息
},
"error_message": ""
}
请求URL
post
/team/join/{id}
请求参数
id
: 项目id【必填】type
: 类型0退出 1加入【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
详见3.3.2
攻略复用紫鹿的代码,文档详见:
https://www.zybuluo.com/lina/note/677843
调用过程中,将接口的host替换为志多星即可:
api.guide.volunteerzhiduoxing.com
攻略后台地址:admin.guide.volunteerzhiduoxing.com
攻略前台地址:m.guide.volunteerzhiduoxing.com
请求URL
get
/goodexample
请求参数
响应
{
"error_code": 0,
"data":{
"list":[@星级榜样信息]
},
"error_message": ""
}
请求URL
get
/goodexample/{id}
请求参数
id
: id【必填】
响应
{
"error_code": 0,
"data":{
@星级榜样信息
},
"error_message": ""
}
请求URL
get
/insurance
请求参数
响应
{
"error_code": 0,
"data":{
"list":[@保险信息],
"banner":[@Banner信息],
},
"error_message": ""
}
请求URL
get
/insurance/{id}
请求参数
id
: id【必填】
响应
{
"error_code": 0,
"data":{
@保险信息
},
"error_message": ""
}
请求URL
get
/claim
请求参数
name
: 项目名称,模糊匹配【非必填】team_id
: 项目id【非必填】service_object
: 服务对象【非必填】service_category
: 服务类别【非必填】sort
: 排序规则【非必填】默认按发布时间 [distance|time|recommend]recommend
: 【非必填】是否推荐current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@认领项目信息
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/claim/{id}
请求参数
id
: 认领项目id【必填】
响应
{
"error_code": 0,
"data":{
@认领项目信息
},
"error_message": ""
}
请求URL
post
/claim/{id}
请求参数
id
: 认领项目id【必填】team_name
: 团队名称【必填】contact_name
: 联系人【必填】contact_phone
: 联系人手机【必填】contact_email
: 联系人邮箱【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/user/score/{type}
请求参数
type
: 类型 0收入 1支出【必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@星币获取|支付详情
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
POST
/user/phone
请求参数
phone
: [string] 手机号码 【必填】verify_code
: [string] 验证码 【必填】
响应
{
"error_code": 0,
"data":{
@用户信息
},
"error_message": ""
}
请求URL
get
/feeling
请求参数
type
: 类型 【非必填】 不填表示全部, 1无标签 2项目 3团队relation_id
: 关联id【非必填】当type=2|3必填,分别表示项目id或团队idcurrent_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@社区话题信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
post
/feeling
请求参数
type
: 类型 【必填】 不填表示全部, 1无标签 2项目 3团队relation_id
: 关联id【非必填】当type=2|3必填,分别表示项目id或团队idcontent
: 内容【必填】photo
: 图片【非必填】
响应
{
"error_code": 0,
"data":{
@社区话题信息
},
"error_message": ""
}
请求URL
delete
/feeling/{id}
请求参数
id
: 话题id 【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/feeling/my
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"new_comment": 10,//新消息数
"list":[
@社区话题信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/feeling/like/{id}
请求参数
id
: 话题id 【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/feeling/dislike/{id}
请求参数
id
: 话题id 【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
post
/feeling/comment/{id}
请求参数
id
: 话题id 【必填】comment
: 内容【必填】parent_id
: 如是回复评论,传被评论的内容id【非必填】
响应
{
"error_code": 0,
"data":{
@社区话题评论信息
},
"error_message": ""
}
请求URL
delete
/comment/{id}
请求参数
id
: 话题id 【必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/comment/new
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认20
响应
{
"error_code": 0,
"data":{
[
@社区话题评论信息
]
},
"error_message": ""
}
请求URL
get
/feeling/{id}
请求参数
id
: i 【必填】
响应
{
"error_code": 0,
"data":{
@社区话题信息
},
"error_message": ""
}
请求URL
GET
/news/list
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
error_code: 0,
data: {
"list":[
@新闻信息
]
"page":{
@分页字段
}
}
}
请求URL
GET
/news/{id}
请求参数
id
: id【必填】
响应
{
error_code: 0,
data: {
@新闻信息
}
}
请求URL
get
/banner/{type}
请求参数
type
: 类型【必填】商品banner 0
响应
{
"error_code": 0,
"data":{
list:[
@Banner信息
]
},
"error_message": ""
}
请求URL
GET
/goods/list
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data": {
"list":[
@积分商品信息
]
"page":{
@分页字段
}
}
"error_message": ""
}
请求URL
GET
/goods/${id}
请求参数
id
: 商品id【必填】
响应
{
"error_code": 0,
"data": {
@商品信息
},
"error_message": ""
}
请求URL
GET
/goods/change/{id}
请求参数
id
: 商品id 【必填】
响应
{
"error_code": 0,
"data": {
@订单信息
},
"error_message": ""
}
请求URL
GET
/order/myorders
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data": {
"list":[
@订单信息
]
"page":{
@分页字段
}
}
"error_message": ""
}
请求URL
GET
/order/collect/{id}
请求参数
id
: 订单id 【必填】
响应
{
"error_code": 0,
"error_message": ""
}
请求URL
get
/platform/index
响应
{
"error_code": 0,
"data":{
"banner"[
@Banner信息
],
"project":[
@项目信息
],
"news":[
@新闻信息
],
},
"error_message": ""
}
请求URL
get
/platform/project
请求参数
name
: 项目名称,模糊匹配【非必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@项目信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/platform/org
请求参数
name
: 机构名称,模糊匹配【非必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@机构信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/platform/volunteer
请求参数
id_number
: 身份证【必填】
响应
{
"error_code": 0,
"data":{
"volunteer_info":@志愿者信息,
"org_count": 2, //加入机构数
"team_count": 2, //加入团队数
"project_count": 3, //参加项目数
"reward_time": "8.00", //累计时长
"project_list":[ //用户参加的所有项目
{
"org":@机构信息,//项目所在的机构
"project":@项目信息,//项目信息
"reward_time": 13,//奖励时长
}
]
},
"error_message": ""
}
请求URL
get
/platform/team
请求参数
team_type
: 团队类别【非必填】service_category
: 服务类别【非必填】service_object
: 服务对象【非必填】county_id
: 区域id【非必填】name
: 团队名称,模糊匹配【非必填】current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@团队信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/platform/claim
请求参数
name
: 项目名称,模糊匹配【非必填】team_id
: 项目id【非必填】service_object
: 服务对象【非必填】service_category
: 服务类别【非必填】sort
: 排序规则【非必填】默认按发布时间 [distance|time|recommend]recommend
: 【非必填】是否推荐current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
"error_code": 0,
"data":{
"list":[
@认领项目信息
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
GET
/platform/news
请求参数
current_page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10
响应
{
error_code: 0,
data: {
"list":[
@新闻信息
]
"page":{
@分页字段
}
}
}
请求URL
get
/org/info
响应
{
"error_code": 0,
"data":{
@机构信息
},
"error_message": ""
}
请求URL
get
/growth/config
响应
{
"error_code": 0,
"data":{
"score":[
{
"label":'每日登陆',
"value": 13,
},
{
"label":'实名认证',
"value": 13,
},
],
"growth_value":[
{
"label":'每日登陆',
"value": 13,
},
{
"label":'实名认证',
"value": 13,
},
],
"growth_level":[
{
"level": 0,
"name":'爱心新秀', #等级名称
"growth": 0, #超过此成长值获得该等级
},
{
"level": 1,
"name":'爱心见习生',
"growth": 100,
},
],
},
"error_message": ""
}
注:此接口返回用户未获取的成就
请求URL
get
/achieve
响应
{
"error_code": 0,
"data":{
"list":[
{
achieve_key: 'key_name', #成就标识
name: '成就名称',#成就名称
icons:'http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg', #成就icon
level:1 #等级
}
]
},
"error_message": ""
}
注:此接口返回用户已获取的成就
请求URL
get
/user/achievement/
响应
{
"error_code": 0,
"data":{
"list":[
{
achieve_key: 'key_name', #成就标识
name: '成就名称',#成就名称
icons:'http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg', #成就icon
level:1 #等级
}
]
},
"error_message": ""
}
请求URL
get
/user/achievement/{key}
请求参数
key
: 成就key【必填】
响应
{
"error_code": 0,
"data":{
"achievement_info":@成就信息
"level":1,#当前等级
"tips":'志愿时长达到101小时,快去晒成就吧!',
},
"error_message": ""
}
请求URL
get
/user/achievement/{key}/share
请求参数
key
: 成就key【必填】
响应
{
"error_code": 0,
"data":{
"key": 'key_name', #成就标识
"label": '成就名称',#成就名称
"logo":'http://oss-static-resource.oss-cn-beijing.aliyuncs.com/image/2017-03-09/35ca97afe5194f27eaf15a9cac6ef279.jpeg', #成就icon
"level":1 #等级
"tips":'志愿时长超过101小时,超过了机构名称97%的志愿者',
"user_info":@用户信息
},
"error_message": ""
}
请求URL
get
/user/level
响应
{
"error_code": 0,
"data":{
"growth_level_now":@用户成长等级, #当前用户等级
"growth_level_next":@用户成长等级, #用户的下一级 如为满级,不下发此字断
},
"error_message": ""
}
请求URL
get
/share/callback/{type}
请求参数
type
: 分享那些【必填】 待确定
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
本类别的接口的url前缀请用v2,不要使用v1
此接口项目信息中包含nearest_clock_in字断,该字断是这个项目最近的一次可打卡的班次信息
请求URL
get
/user/project/clock
请求参数
无
响应
{
"error_code": 0,
"data":{
"three_day_project":[@项目详情],
"project":[@项目详情]
},
"error_message": ""
}
请求URL
get
/project/{project_id}/clock
请求参数
project_id
: 项目id 【必填】
响应
{
"error_code": 0,
"data":{
"three_day_clock":[@签到班次信息],//最近三天要签到的
"clock":[@签到班次信息] //所有签到的
},
"error_message": ""
}
请求URL
get
/clock/{id}/info
请求参数
id
: 班次信息id 【必填】
响应
{
"error_code": 0,
"data":{
"clock_info":@签到班次信息,//含状态信息
"user_clock_info":@打卡信息 //用户的打卡信息,如何时打卡等
},
"error_message": ""
}
请求URL
post
/clock/{id}
请求参数
id
: 班次信息id 【必填】addr
: 打卡地址 【非必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
post
/clock/{id}/apply
请求参数
id
: 班次信息id 【必填】clock_in_time
: [datetime] 打卡时间 or 签到时间 2019-1-12 12:12:12 【必填】clock_end_time
: [datetime] 签退时间 2019-1-12 12:12:12 【非必填】 班次信息type=2的时候必填content
: [string] 申请内容【必填】attachment
: [array] 申请附件【非必填】
响应
{
"error_code": 0,
"data":{
},
"error_message": ""
}
请求URL
get
/clock/apply/project
响应
{
"error_code": 0,
"data":{
"list":[
@项目信息
]
},
"error_message": ""
}
请求URL
get
/project/{id}/clock/list
响应
{
"error_code": 0,
"data":{
"list":[
@签到班次信息
]
},
"error_message": ""
}
请求URL
get
/apply/list
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
post
/support/create
请求参数
user_name
: 申请人姓名 【必填】user_business_province
: 所属业务区域 省【必填】user_business_city
: 所属业务区域 市【必填】user_store
: 所属门店【必填】user_position
: 职位【必填】user_job_num
: 工号【必填】user_phone
: 联系电话 【必填】user_email
: 电子邮箱【必填】user_apply_rsason
: 申请理由【必填】user_apply_monry
: 申请金额【必填】group_name
: 组织名称【必填】group_credit_num
: 统一社会信用代码【非必填】group_addr
: 组织地址【必填】group_legal_person
: 法人【必填】group_user
: 联系人【必填】group_user_phone
: 联系人电话【必填】group_user_email
: 联系人邮箱【必填】group_service
: 服务领域【必填】group_info
: 组织简介【必填】group_certificate
: 登记证书【非必填】[array]project_name
: 项目名称 【必填】project_field
: 项目领域【必填】[orject]project_start
: 项目实施开始时间【必填】project_end
: 项目实施结束时间【必填】project_addr
: 项目实施地点【必填】project_money
: 项目预算【必填】project_info
: 项目描述【必填】project_effect
: 项目实施成效【必填】project_object
: 项目收益对象【必填】project_resources
: 额外提供资源 【非必填】plan
: 【必填】[object]
{{activity_name: '活动名称',
activity_start: '活动开始时间',
activity_end: '活动结束时间',
activity_objective: '活动目的',
activity_people: '活动收益人数',
activity_info: '活动内容'
}}budget
: 【必填】[object]
{{budget_type: '预算类型', (见2.1.9)
budget_purpose: '预算用途',
budget_price: '单价',
budget_num: '数量',
budget_money: '金额',
}}budget_reason
: 预算理由【非必填】
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
get
/support/list
请求参数
status
: 申请资助状态 【非必填】(见2.2.0)
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
get
/support/show/{id}
请求参数
id
: 申请资助id 【必填】
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
post
/support/{id}
请求参数
id
: 申请资助id 【必填】- 、、、
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
get
/support/{id}
请求参数
id
: 申请资助id 【必填】type
: 撤销:3 再次提交:0【必填】
响应
{
"error_code": 0,
"data":{
"list":[
]
},
"error_message": ""
}
请求URL
POST
/demand
请求参数
name
: 申请人姓名 【必填】phone
: 手机号【必填】category
: 类别【必填】title
: 标题【必填】content
: 详情【必填】village
: 乡镇【必填】addr
: 详细地点 【必填】
响应
{
"error_code": 0,
"data":{
@求助信息(上传的信息)
},
"error_message": ""
}
请求URL
GET
/demand/all
请求参数
page
: 页码【非必填】默认1page_size
: 页长【非必填】 默认10】
响应
{
"error_code": 0,
"data":{
"list":[
@求助信息
],
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
GET
/demand
响应
{
"error_code": 0,
"data":{
[
{@求助信息}
]
},
"error_message": ""
}
请求URL
GET
/demand/{id}
请求参数
id
: 求助id
响应
{
"error_code": 0,
"data":{
@求助信息
},
"error_message": ""
}
X-auth-token
: [string] 登录后获取的token
信息, 请求头带此字段X-org-code
: [string] 机构表识字段,所有请求均需要此字段,测试环境用yMYerkEaOB 请求头带此字段
请求URL
GET
/api/v2/conf
请求参数
响应
{
"error_code": 0,
"data": {
"serviceTarget": [
"儿童",
],
"serviceCategory": [
"文明健康",
],
"teamCategory": [
"党政机关",
],
"goodAt": [
"关爱服务",
],
"orgInfo": {
"name": "志多星演示版",
"logo": "http://api.volzdx.cn/images/uploads/2020-02/488211582098336.png",
"real_name_register": 1,
"module_settings": [
[
{
"label": "志愿项目",
"key": "volunteer_project",
"icon": "http://api.volzdx.cn/images/uploads/2018-12/362691544419728.png",
"settings": {
"label": "志愿活动",
"icon": "http://api.volzdx.cn/images/uploads/2018-12/362691544419728.png"
}
},
],
],
"volunteer_feedback": 1,
"funding_application": 0
},
"serviceArea": [
{
"value": "扶贫",
"label": "扶贫"
},
]
},
"error_message": ""
}
验证码图片为一次性的,如果输入错误则作废,需要重新获取图片内容
请求URL
GET
/api/captcha/app
请求参数
响应
{
"error_code": 0,
"data": {
"sensitive": false,
"key": "$2y$10$ZNX65xVgn1X1cLfEKBK.VuxdbbDntCrhI1HW.7W1CO2OqktO7o6vW", //验证码图片标识符
"img": "data:image/png;base64,xxx" //图片base64编码
},
"error_message": ""
}
请求URL
POST
/api/app/verifycode
请求参数
key
: 图片验证码接口返回的key值 【必填】captcha_code
: 验证码【必填】phone
: 手机号【必填】
响应
{
"error_code": 0,
"data": {
},
"error_message": ""
}
请求URL
POST
/api/v2/login/phone
请求参数
verify_code
: 验证码【必填】phone
: 手机号【必填】
响应
{
"error_code": 0,
"data": {
"id": 446363,
"username": "用户_94020012",
"email": "email@email.com",
"phone": "15510073021",
"avatars": "",
"open_id": "",
"real_name": "邱开",
"nation": "汉族",
"sex": 1,
"birthday": "1987-08-03",
"identifier": "V200628446363",
"slogan": "文明点亮你我,志愿感动社会",
"reward_time": "0.00",
"id_number": "421122198708037319",
"province_id": 0,
"province_name": "",
"city_id": 0,
"city_name": "",
"county_id": 0,
"county_name": "",
"township_id": 0,
"township_name": "",
"addr": "",
"score": 0,
"family_id": 0,
"relation": "",
"join_family_time": "",
"extends": null,
"stars": 0,
"in_blacklist": 0,
"num_type": 1,
"achievement": 0,
"growth": 0,
"NO": "",
"regitser_time": "2020-06-28 23:42:09",
"server_time": "2020-09-10 23:23:23",
"have_pwd": 1,
"token": "c8482a5fc09574f49ad7537db803a99c5f5655db5cc81"
},
"error_message": ""
}
请求URL
POST
/api/v2/login
请求参数
username
: 手机号【必填】pwd
: 密码【必填】
响应
{
"error_code": 0,
"data": {
"id": 446363,
"username": "用户_94020012",
"email": "email@email.com",
"phone": "15510073021",
"avatars": "",
"open_id": "",
"real_name": "邱开",
"nation": "汉族",
"sex": 1,
"birthday": "1987-08-03",
"identifier": "V200628446363",
"slogan": "文明点亮你我,志愿感动社会",
"reward_time": "0.00",
"id_number": "421122198708037319",
"province_id": 0,
"province_name": "",
"city_id": 0,
"city_name": "",
"county_id": 0,
"county_name": "",
"township_id": 0,
"township_name": "",
"addr": "",
"score": 0,
"family_id": 0,
"relation": "",
"join_family_time": "",
"extends": null,
"stars": 0,
"in_blacklist": 0,
"num_type": 1,
"achievement": 0,
"growth": 0,
"NO": "",
"regitser_time": "2020-06-28 23:42:09",
"server_time": "2020-09-10 23:23:23",
"have_pwd": 1,
"token": "c8482a5fc09574f49ad7537db803a99c5f5655db5cc81"
},
"error_message": ""
}
请求URL
get
/practiceBase
请求参数
name
: 基地名称,模糊匹配【非必填】category_id
: 基地分类id【非必填】
响应
{
"error_code": 0,
"data":{
"list":[
@基地信息
]
"page":{
@分页字段
}
},
"error_message": ""
}
请求URL
get
/practiceBase/{id}
请求参数
id
: 基地id【必填】
响应
{
"error_code": 0,
"data":{
@基地信息
},
"error_message": ""
}
请求URL
get
/practiceBaseCategory
响应
{
"error_code": 0,
"data":[
{
@基地分类信息
}
],
"error_message": ""
}