封装请求方法
This commit is contained in:
parent
7b5bb1aea7
commit
f1d2740689
|
@ -6,12 +6,13 @@ export const getSuperboxApiConfig = (address) => {
|
|||
const LOGIN_ROUTE = BASE_ROUTE + "/auth/login";
|
||||
const LOGOUT_ROUTE = BASE_ROUTE + "/auth/logout";
|
||||
const CAMERA_ROUTE = BASE_ROUTE + "/camera/cameras";
|
||||
const EVENTS_ROUTE = BASE_ROUTE + "/event/events";
|
||||
const EVENTS_ROUTE = BASE_ROUTE + "/event/events?limit=300";
|
||||
const ALGORITHM_ROUTE = BASE_ROUTE + "/algorithms";
|
||||
|
||||
let addr = address;
|
||||
if (!addr) {
|
||||
addr = window.location.host.replace(/:\d+/, "");
|
||||
console.log("No address provided, using " + addr);
|
||||
}
|
||||
const superboxAddress = "http://" + addr + ":" + PORT.toString();
|
||||
|
||||
|
@ -155,4 +156,5 @@ export default {
|
|||
getSuperboxApiConfig,
|
||||
initCodeNameMap,
|
||||
codenameTranslate,
|
||||
getAlgorithms,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue