BaseURL : localhost
使用请求头Authorization
携带tokentoken {your token here}
访问接口
Quieries:
redirect
app回调地址,用于接受AccessToken的地址,需要http/https前缀clientId
设备id
Response(OK):
url
就是登录链接
注意:返回url中的所有&
被替换成了\u0026
,需要前端进行一次字符串替换,不然学校接口会报错
{
"error":0,
"msg":"get url success",
"url":"url"
}
用户登录完成之后会跳转到{redirect}?auth={token}
地址,如:
如redirect
为https%3a%2f%2fwww.baidu.com
时,登录成功后跳转https://www.baidu.com/?auth=LrIH9YEaUy9pmg6nLlpatVvPaxtNuRgQPDT
,其中LrIH9YEaUy9pmg6nLlpatVvPaxtNuRgQPDT
就是用户token,有效期6个月
之后的请求携带该token即可
Quieries:
type
表单类型:①lost
②idcard
(一卡通拾取)
eg:http://www.buhuiphp.com/id/?type=lost
Response(OK):
[
{"id":"VDek4u"},
{"id":"6ZirNF"},
{"id":"fir1Gc"},
{"id":"Kywi2O"},
{"id":"z09n8p"},
{"id":"PBLtJh"}
]
Quieries:
name_owner
失主姓名stuno
失主学号describe
物品描述file
文件(jpeg/pjpeg/jpg/png)name_pickup
拾取人姓名contactType
联系类型contact
联系方式
Response(OK):
{
"error":0,
"msg":"success"
}
Quieries:
id
表单唯一编号
Response(OK):
{
"error": 0,
"msg": "success",
"data": {
"name_owner": "test",
"stuno": "17051818",
"describe": "描述",
"url": "http:\/\/phi28j82d.bkt.clouddn.com\/lost-found\/image\/test\/185DBD48799A57DC5125F5805BBE5F72.jpg",
"name_pickup": "test",
"contactType": "QQ",
"contact": "contact",
"timestamp": "1543818517"
}
}
Quieries:
name_pickup
拾取者姓名type
拾取物品类型describe
物品描述file
文件(jpeg/pjpeg/jpg/png)contactType
联系类型contact
联系方式
Response(OK):
{
"error":0,
"msg":"success"
}
Quieries:
id
表单唯一编号
Response(OK):
{
"error":0,
"msg":"success",
"data":{
"name_pickup":"test",
"type":"type",
"describe":"descripe",
"url":"http:\/\/qiniu.yubei.online\/lost-found\/image\/test\/04ECE64FB4865C9A97854FF0F2D2B7A0.jpg",
"contactType":"contactTyp",
"contact":"contact",
"timestamp":"1543822202"
}
}
Quieries:
id
表单唯一编号describe
新物品描述
Response(OK):
{
"error":0,
"msg":"success"
}
Quieries:
id
表单唯一编号
eg:http://www.buhuiphp.com/lost/delete.php?id=z09n8p
Response(OK):
{
"error":0,
"msg":"success"
}
Response(OK):
url
就是跳转链接
{
"url":"www.buhuiphp.com\/inc\/openqq.php"
}
Response(OK):
[{
"type": "鼠标",
"count": "3"
}, {
"type": "type",
"count": "1"
}, {
"type": "手机",
"count": "1"
}, {
"type": "U盘",
"count": "1"
}]