项目地址:https://gz100.ncscu.cn
POST /api/car/auth/login
说明:管理员登录,账号密码固定为 admin / 123456。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| username | string | 是 | 用户名 |
| password | string | 是 | 密码 |
curl -X POST https://gz100.ncscu.cn/api/car/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"123456"}'
{
"code": 200,
"msg": "登录成功",
"data": {
"username": "admin",
"role": "admin"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
GET /api/car/weather?city=[城市]
说明:根据传入城市返回随机天气和温度。
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| city | string | 是 | 城市名称,可任意输入 |
curl "https://gz100.ncscu.cn/api/car/weather?city=北京"
{
"city": "北京",
"weather": "多云",
"temperature": 18
}