MyProject
  1. 完美校园智能水电API
MyProject
  • 完美校园智能水电API
    • 学校代码
    • 获取指定房间水电
      POST
    • 获取账号所绑定的所有房间
      POST
  1. 完美校园智能水电API

获取指定房间水电

POST
http://prod-cn.your-api-server.comhttps://xqh5.17wanxiao.com/smartWaterAndElectricityService/SWAEServlet
此接口用于获取单个房间更加详细的水电信息。
房间号可以先使用“获取账号绑定的所有房间”接口获取,“roomverify”即对应房间号。
学校代码可以在本文档中查找

请求参数

Query 参数
param
string 
可选
示例值:
{"cmd":"h5_getstuindexpage","roomverify":"{{宿舍号}}","account":"{{学号或工号}}","timestamp":"{{$date.now|format('yyyyMMddHHmmss000')}}"}
customercode
string 
可选
示例值:
792
method
string 
可选
示例值:
h5_getstuindexpage
command
string 
可选
示例值:
JBSWaterElecService
Header 参数
Host
string 
可选
示例值:
xqh5.17wanxiao.com
Connection
string 
可选
示例值:
keep-alive
Content-Length
string 
可选
示例值:
245
sec-ch-ua
string 
可选
示例值:
"Not)A;Brand";v="99", "Android WebView";v="127", "Chromium";v="127"
content-type
string 
可选
示例值:
application/x-www-form-urlencoded
sec-ch-ua-mobile
string 
可选
示例值:
?1
User-Agent
string 
可选
示例值:
Mozilla/5.0 (Linux; Android 14; REP-AN00 Build/HONORREP-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36 Wanxiao/5.8.6
sec-ch-ua-platform
string 
可选
示例值:
"Android"
Accept
string 
可选
示例值:
*/*
Origin
string 
可选
示例值:
https://xqh5.17wanxiao.com
X-Requested-With
string 
可选
示例值:
com.newcapec.mobile.ncp
Sec-Fetch-Site
string 
可选
示例值:
same-origin
Sec-Fetch-Mode
string 
可选
示例值:
cors
Sec-Fetch-Dest
string 
可选
示例值:
empty
Referer
string 
可选
示例值:
https://xqh5.17wanxiao.com/userwaterelecmini/index.html
Accept-Encoding
string 
可选
示例值:
gzip, deflate, br, zstd
Accept-Language
string 
可选
示例值:
zh-CN,zh;q=0.9,en-CN;q=0.8,en-US;q=0.7,en;q=0.6
Set-Cookie
string 
可选
示例值:
SERVERID=7abd666da76fadf6bd7f0a8acd3e2ff1|1725968099|1725968080;Path=/

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://xqh5.17wanxiao.com/smartWaterAndElectricityService/SWAEServlet?param={"cmd":"h5_getstuindexpage","roomverify":"{{宿舍号}}","account":"{{学号或工号}}","timestamp":"{{$date.now|format('\''yyyyMMddHHmmss000'\'')}}"}&customercode=792&method=h5_getstuindexpage&command=JBSWaterElecService' \
--header 'Host:  xqh5.17wanxiao.com' \
--header 'Connection:  keep-alive' \
--header 'Content-Length:  245' \
--header 'sec-ch-ua:  "Not)A;Brand";v="99", "Android WebView";v="127", "Chromium";v="127"' \
--header 'sec-ch-ua-mobile:  ?1' \
--header 'User-Agent:  Mozilla/5.0 (Linux; Android 14; REP-AN00 Build/HONORREP-AN00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36 Wanxiao/5.8.6' \
--header 'sec-ch-ua-platform:  "Android"' \
--header 'Accept:  */*' \
--header 'Origin:  https://xqh5.17wanxiao.com' \
--header 'X-Requested-With:  com.newcapec.mobile.ncp' \
--header 'Sec-Fetch-Site:  same-origin' \
--header 'Sec-Fetch-Mode:  cors' \
--header 'Sec-Fetch-Dest:  empty' \
--header 'Referer:  https://xqh5.17wanxiao.com/userwaterelecmini/index.html' \
--header 'Accept-Encoding:  gzip, deflate, br, zstd' \
--header 'Accept-Language:  zh-CN,zh;q=0.9,en-CN;q=0.8,en-US;q=0.7,en;q=0.6' \
--header 'Set-Cookie:  SERVERID=7abd666da76fadf6bd7f0a8acd3e2ff1|1725968099|1725968080;Path=/' \
--header 'content-type:  application/x-www-form-urlencoded'

返回响应

🟢200成功
application/json
Body
code_
integer 
必需
sign
string 
必需
result_
string 
必需
body
string 
必需
message_
string 
必需
示例
{
  "code_": 0,
  "sign": "F70D1065FD5742EA",
  "result_": "true",
  "body": "{\"isshowsubsidy\":\"0\",\"modlist\":[{\"mac\":78063,\"isshowpay\":1,\"bluopen\":0,\"projectcode\":\"7\",\"opcount\":0,\"blunum\":\"078063\",\"charge_switch\":0,\"accode\":51101,\"ecardacccode\":216,\"todolist\":[],\"isble\":0,\"odd\":232.7,\"weekuselist\":[{\"date\":\"09-04\",\"daydate\":\"09-04\",\"ver\":46087317,\"use\":38,\"weekday\":\"星期三\",\"dayuse\":38,\"formatweek\":{\"date\":4,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725379200000,\"day\":3}},{\"date\":\"09-05\",\"daydate\":\"09-05\",\"ver\":46485791,\"use\":20.6,\"weekday\":\"星期四\",\"dayuse\":20.6,\"formatweek\":{\"date\":5,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725465600000,\"day\":4}},{\"date\":\"09-06\",\"daydate\":\"09-06\",\"ver\":46824363,\"use\":13.9,\"weekday\":\"星期五\",\"dayuse\":13.9,\"formatweek\":{\"date\":6,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725552000000,\"day\":5}},{\"date\":\"09-07\",\"daydate\":\"09-07\",\"ver\":47155886,\"use\":17.8,\"weekday\":\"星期六\",\"dayuse\":17.8,\"formatweek\":{\"date\":7,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725638400000,\"day\":6}},{\"date\":\"09-08\",\"daydate\":\"09-08\",\"ver\":47537005,\"use\":18.3,\"weekday\":\"星期日\",\"dayuse\":18.3,\"formatweek\":{\"date\":8,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725724800000,\"day\":0}},{\"date\":\"09-09\",\"daydate\":\"09-09\",\"ver\":47922253,\"use\":19.7,\"weekday\":\"星期一\",\"dayuse\":19.7,\"formatweek\":{\"date\":9,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725811200000,\"day\":1}},{\"date\":\"09-10\",\"daydate\":\"09-10\",\"ver\":48147749,\"use\":14.8,\"weekday\":\"星期二\",\"dayuse\":14.8,\"formatweek\":{\"date\":10,\"hours\":0,\"seconds\":0,\"month\":8,\"nanos\":0,\"timezoneoffset\":-480,\"year\":124,\"minutes\":0,\"time\":1725897600000,\"day\":2}}],\"totalamount\":0,\"sumsub\":17994.57,\"accgroup\":51101,\"monthuselist\":[{\"monthuse\":0,\"yearmonth\":\"2022.01\"},{\"monthuse\":3.3,\"yearmonth\":\"2022.02\"},{\"monthuse\":138.9,\"yearmonth\":\"2022.03\"},{\"monthuse\":334.6,\"yearmonth\":\"2022.04\"},{\"monthuse\":388,\"yearmonth\":\"2022.05\"},{\"monthuse\":585.9,\"yearmonth\":\"2022.06\"}],\"todayuse\":14.8,\"modstatus\":[],\"bussnesstype\":0,\"devicename\":\"电控\",\"expplancount\":0,\"sumbuy\":484.6,\"tododata\":\"\",\"status\":1}],\"collecdate\":\"\",\"cardtype\":\"\",\"datalookpayurl\":\"http://127.0.0.1/openapi/pay/openProjectDetail/V2\",\"ccbschoolid\":\"\",\"message\":\"操作成功\",\"isexpplan\":\"1\",\"result\":\"0\",\"ccbsecretkey\":\"\",\"unbinduser\":\"0\",\"roomnum\":\"12619\",\"identitytype\":\"\",\"roomfullname\":\"西区12栋-12619\",\"subornot\":\"0,0,0,1,1,0\",\"roomverify\":\"101-16--204-12619\",\"status\":\"\"}",
  "message_": "获取成功!"
}
上一页
学校代码
下一页
获取账号所绑定的所有房间
Built with