-
Notifications
You must be signed in to change notification settings - Fork 0
首页和公共APi
xuelang123 edited this page Apr 8, 2014
·
6 revisions
##返回状态## RESULT_CONSTANT
RESULT_SUCCESS : true; // 表示成功 一般只处理这种状态
RESULT_ERROR: false; // 表示请求错误 一般不作处理
##登录模块## ###用户登陆###
/api/login
Request:
method:GET
username:String
password:String
Response:
{
"status":RESULT_CONSTANT,
}
###查看用户登录状态###
/api/login/status
Request:
method:GET
Response:
{
"status":RESULT_CONSTANT,
"datas":[RoleCode:String,
RoleCode:String] // 角色编号
}
example:{"datas":["student"],"status":true}
###初始化推送服务###
/api/push/init
Request:
method:POST
userId : String // 百度提供的用户标识符
Response:
{
"status":RESULT_CONSTANT
}
##公共首页##
/api/home
Request:
method:GET Response:
{
"news": [ // 学院新闻模块, 默认 <=5条
{
"id": "ff8081814530db35014530db35fb0000",
"content": "第二届服务外包开始了。", // 新闻内容
"title": "第二届服务外包", // 标题
"time": "2014-04-05 15:47:23.0", // 时间
"author": "admin" // 发布者名称
}
],
// 班级新闻 默认 <=5条
"classNews": [
{
"author": "admin",
"id": "ff8081814530db35014531bc850c002c",
"content": "sd",
"title": "sdf",
"time": "2014-04-05 19:53:29.0"
}
], // 全部课表
"courses": [
{
"section": "第6,7节",
"place": null,
"teacherName": "物理老师",
"week": "星期三",
"name": "大物",
"id": "ff8081814530db35014531f54362002f"
}
]
}