完成自动类型检查和查询功能

This commit is contained in:
Yu Sun
2022-07-12 22:36:14 +08:00
parent 5fdfc04349
commit 68f86c94b7
4 changed files with 113 additions and 31 deletions

View File

@@ -26,7 +26,19 @@ export default ({ service, request, serviceForMock, requestForMock, mock, faker,
return request({ url: '?query=codes&working_subclass=' + workingSubclass })
},
QUERY_NODE_DATA (workingSubclass, code) {
return request({ url: '?query=node_data&working_subclass=' + workingSubclass + '&code=' + code })
QUERY_NODE_DATA ({
workingSubclass,
startTime,
endTime,
code
} = {}) {
let url = '?query=node_data&working_subclass=' + workingSubclass + '&start_time=' + startTime + '&end_time=' + endTime
if (code) {
url += `&code=${code}`
}
return request({
url: url,
timeout: 20000
})
}
})