add api for login & checklogin

This commit is contained in:
Dawn1Ocean
2024-03-19 23:45:16 +08:00
parent 5c78139d5a
commit f2f4929fc9
2 changed files with 51 additions and 0 deletions
+38
View File
@@ -61,6 +61,44 @@ data:
}
```
## 账号登陆
### 微信小程序登陆 `POST /login` OK
- Request
```json
{
"code": "wechat_login_code"
}
```
- Response
```json
{
"success": true,
"token": "your_token"
}
```
### 检查 token 是否登陆 `GET /checklogin?token={token}` OK
```json
{
"islogin": true
}
```
- Response
```json
{
"success": true,
"token": "your_token"
}
```
## 用户页面
### 个人信息 `GET /user/info`