-
Notifications
You must be signed in to change notification settings - Fork 1
MAD_BackWeb_Interface
jimxiang edited this page May 16, 2016
·
31 revisions
http请求: POST
/back/login
客户端提交
{
"name": String, //用户名
"password": String //密码(使用sha256加密后的密文)
}
服务器返回:
成功:
{
"errCode": Int,
"id": String //管理员id(本地缓存)
"token": String //本次登陆发放的会话令牌(本地缓存)
}
失败:
{
"errCode": Int
}
http请求方式: GET
/back/home?token=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
服务器返回:
成功:
{
"errCode": Int,
"totalAdvertiser": Int //广告商总数
"totalAdvertisement": Int //广告总数
"totalUser": Int //车主总数
"totalBroadcastTimes": Int//总投放量
"advert_detail7": [ //最近七天的广告投放情况,数组大小为7
{
"date": Date, //日期
"totalBroadcastTimes": Number, //当天投放量
"totalIncome": Number //当天投放广告获得的利润,用来显示最近一周收入
},
{
"date": Date,
"totalBroadcastTimes": Number,
"totalIncome": Number
},
.....
],
"advert_most": [ //三个投放量最多的广告的详情
{
"advert_id": String, //广告ID
"broadcastSum": Number, //广告总投放次数
"title": String //广告标题
},
{
"advert_id": String, //广告ID
"broadcastSum": Number, //广告总投放次数
"title": String //广告标题
},
...
],
"newUser": Int, //新增车主用户
"newAdvertiser": Int, //新增广告商用户
"newAdvertisement": Int, //新增广告投放数
"newBroadcastTimes": Int //昨日广告投放量
"downloadCount", { //过去七周每周的APP下载量
"week1": Int,
"week2": Int,
"week3": Int,
"week4": Int,
"week5": Int,
"week6": Int,
"week7": Int
}
}
失败:
{
"errCode": Int
}
http请求方式: GET
/back/user/list?token=&tag=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
| tag | 标记用户类型,1:车主用户,2:广告商用户 |
服务器返回:
成功:
{
"errCode": Int,
"userList": [ //用户列表
{
"id": Int,
"name": String, //用户姓名
"status": String, //用户审核状态
"registrationDate: String //用户注册日期
},
...
]
}
失败:
{
"errCode": Int
}
http请求:GET
/back/user/detail/{userid}?token=&tag=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
| userid | 用户ID |
| tag | 标记用户类型,1:车主用户,2:广告商用户 |
服务器返回
成功(车主用户):
{
"errCode": Int,
"tag": Int, //标记用户类型,1:车主用户,2:广告商用户
"userDetail": { //车主用户详情
"name": String, //车主姓名
"id": String, //车主id
"location": String, //车主常居地
"vehicleLicenseImage": String, //行驶证照片
"email": String, //邮箱
"mobilePhone": String //电话号码
}
}
成功(广告商用户):
{
"errCode": Int,
"tag": Int, //标记用户类型,1:车主用户,2:广告商用户
"userDetail": { //广告商用户详情
name: String, //企业名称
id: String, //企业id
status: true, //企业验证状态
email: String, //企业联系email
detail: {
registerData: Date, //
type: String, //广告商单位类型
licenseType: String, //证件类型
licenseImage: String, //营业执照图片,放在七牛云
licenseCode: String, //证件注册号
location: String, //单位所在地
accomodation: String, //住所
businessScope: String, //经营范围
businessPeriod: Date, //营业期限
organizationCode: String, //组织机构代码
legalPerson: {
name: String, //法定代表人姓名
location: String, //法定代表人归属地
id: String, //身份证号
validDate: Date, //证件有效期
ifLongTerm: Boolean, //是否长期
ifLegalPerson: Boolean //填写人是否是法定代表人,false为代理人
}
}
}
}
失败:
{
"errCode": Int
}
http请求:POST
/back/user/audit
客户端提交
{
"token": String, //会话令牌
"id": String, //用户ID
"tag": Number, //标记用户类型,1:车主用户,2:广告商用户
"success": Number, //0=不通过 1=通过
"reason": String //未通过原因,通过时设置为null
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/advert/submit
客户端提交:
{
"token": String //登陆后获得的token
"title": string //广告标题
"content": string //广告内容
"catalog": string //广告类别
"broadcastLocation":[ //投放地点商圈名
district_name1: String,
district_name2: String,
...
],
"startDate": Date, //广告开始投放日期
"endDate": Date //广告停止投放日期
}
服务器返回:
成功:
{
"errCode": Int
"id": string //广告编号
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/advert/save
客户端提交:
{
"token": String //登陆后获得的token
"title": string //广告标题
"content": string //广告内容
"catalog": string //广告类别
"broadcastLocation":[ //投放地点商圈名
district_name1: String,
district_name2: String,
...
],
"timePeriod": string//广告发布时段(不需要date类型,因为是下拉框选的)
"startDate": Date, //广告开始投放日期
"endDate": Date //广告停止投放日期
}
服务器返回:
成功:
{
"errCode": Int
"id": string //广告编号
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/advert/list/all
客户端提交:
{
"token": String //登陆后获得的token
"tag": number //0:全部,1:未审核
}
服务器返回:
成功://返回JSON数组
{
"errCode": Int
"notAuditAdsList":[
{
"id": int //广告id
"title": string //广告标题
"catalog": string
"belongTo": string //申请人
},
...
]
}
失败:
{
"errCode": Int
}
http请求:POST
/back/advert/audit
客户端提交
{
"token": String, //会话令牌
"id": String, //广告ID
"success": Number //0=不通过 1=通过
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/advert/search
客户端提交:
{
"token": String //登陆后获得的token
"id": String
"title": String
"broadcastLocation": String, //同时只能查询一个商圈里的广告
"startDate": Date //广告起始日期
"endDate": Date //广告结束日期
}
服务器返回:
成功:
{
"errCode": Int
"SearchAdsList”: [
{
"id": Int
"title": String
"catalog": String
"belongTo": String
"status": String
}
]
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/advert/detail
客户端提交:
{
"token": String //登陆后获得的token
"id": string //广告id
}
服务器返回:
成功:
//返回广告详情
{
"errCode": Int,
"id": String //广告编号
"title": String //广告标题
"content": String //广告内容
"catalog": String //广告类别
"broadcastLocation":[ //投放地点,放商圈名
district_name1: String,
district_name2: String,
...
],
"timePeriod": String//广告发布时段(不需要date类型,因为是下拉框选的)
"startDate": Date //广告开始日期
"endDate": Date //广告结束日期
}
失败:
{
"errCode": Int
}
http请求:POST
/back/advert/remove
客户端提交:
{
"token": String, //会话令牌
"id": String, //下架广告ID
"reason": String //下架原因,弹出一个模态框让后台管理员填写
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
#财务管理
http请求方式: POST
/back/account/list
客户端提交:
{
"token": String //登陆后获得的token
}
服务器返回:
成功:
//返回财务信息列表
{
"errCode": Int,
"id": String, //申请ID
"catalog": String, //申请分类编号,1:广告商充值,2:广告商退款申请,3:车主用户提现申请
"userId": String //用户id
"account": String //用户资金账户
"money": Number //金额
"completedDate": Date //操作日期
"operatorName": String //经办人
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/account/apply/list
客户端提交:
{
"token": String //登陆后获得的token
"catalog": number // 申请分类编号,1:广告商充值,2:广告商退款申请,3:车主用户提现申请
}
服务器返回:
成功:
{
"errCode": Int,
"applyList": [
{
"id": String, //申请ID
"userName": String //用户名称
"userId": String //用户id
"account": String //用户资金账户
"money": Number //金额
"applyDate": Date //操作日期
},
...
]
}
失败:
{
"errCode": Int
}
http请求方式: POST
/back/account/apply/complete
客户端提交:
{
"token": String,
"operatorEmail": String,
"operatorPassword": String,
"applyId": String,
"tag": int // 1为通过,0为不通过
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
http请求方式: GET
/back/backuser/list?token=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
服务器返回:
成功:
{
"errCode": Int,
"backUserList": [
{
"id": String, //用户ID
"userName": String //后台用户名称
"gender": Boolean //后台用户性别
"email": String // 后台用户邮箱
"level": String //后台用户权限级别
"hireDate": Date //入职时间
},
...
]
}
失败:
{
"errCode": Int
}
##添加后台用户
http请求方式: POST
/back/backuser/create
客户端提交:
{
"token": String //登陆后获得的token
"userName": String //后台用户名称
"email": String //后台用户邮箱
"gender": String //后台用户性别
"level": String //后台用户权限级别
"hireDate": Date //入职时间
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
##权限管理
http请求方式: POST
/back/backuser/manage
客户端提交:
{
"token": String //登陆后获得的token
"id": String //要修改的用户id
"newLevel": String //修改后的权限等级
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
##管理员信息修改
http请求方式: POST
/back/backuser/modify
客户端提交:
{
"token": String //登陆后获得的token
"id": String //要修改的用户id
"email": String //修改后的邮箱
"password": String //修改后的登录密码
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
#消息部分
##获取消息列表
http请求方式: GET
/back/message/list?token=&id=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
| id | 管理员id |
服务器返回:
成功:
{
"errCode": Int,
"MsgList": [
{
"msgContent": String //消息内容
"msgDate": String //消息创建日期
"status": String //消息阅读状态 ('0' : 未读 | '1' : 已读)
},
...
]
}
失败:
{
"errCode": Int
}
##更新消息阅读状态
http请求方式: POST
/back/message/status
客户端提交:
{
"token": String //登陆后获得的token
"id": String //消息所有者id
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
##删除消息
http请求方式: POST
/back/message/delete
客户端提交:
{
"token": String //登陆后获得的token
"id": String //要删除消息的id
"adminId": String //消息所有者id
}
服务器返回:
成功:
{
"errCode": Int
}
失败:
{
"errCode": Int
}
#统计信息 ##获取MAD平台每天营收数据
http请求方式: GET
/back/statistics/dayincome?token=
| 参数 | 说明 |
|---|---|
| token | 会话令牌 |
服务器返回:
成功:
{
"errCode": Int,
"statistics": [
{
"date": Date,//年月日
"totalIncome": Number,//当天广告收入
"totalBroadcast": Number//当天总投放量
},
{
"date": Date,//年月日
"totalIncome": Number,//当天广告收入
"totalBroadcast": Number//当天总投放量
},
.....
]
}