Files
ClassContent/项目合集/校园失物招领/min-backend/header.md
2024-09-27 02:06:13 +08:00

23 lines
676 B
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
## 【注意】使用注意事项
1接口返回的数据格式如下
```
{
"status" : 200,
"message" : "请求成功"
"result" : "...省略"
}
```
- 1.1status主要作用标志请求是否成功`200`表示接口请求成功无错误,`404`表示接口请求出现错误
- 1.2message`status``200` 的时候值为:`请求成功`,当 `status``404` 的时候 `message`数值为具体的接口错误信息前端只需要在全局ajax拦截器中`Toast`弹出`message`的错误信息即可
- 1.3result: 请求的所有数据都会在本字段中
2Ajax的请求方式一律使用`POST`接口,注意是`POST`