12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- import { http } from "@/common/service/service.js";
- import configService from "@/common/service/config.service.js";
- const apiService = {
-
- login(params) {
- return http.post("/sys/mLogin", params);
- },
-
- phoneNoLogin(params) {
- return http.post("/sys/phoneLogin", params);
- },
-
- logout(params) {
- return http.post("/sys/logout", params);
- },
-
- getDeviceType(params) {
- return http.get(
- "/safety/ventanalyDeviceInfo/DeviceKind/queryBySystem",
- params
- );
- },
-
- getShowColum(params) {
- return http.get("/safety/ventanalyShowColum/show_colum", params);
- },
-
- getDeviceMonitor(params) {
- return http.post("/monitor/device", params);
- },
-
- getShowColumList(params) {
- const urlParams = new URLSearchParams(params);
- const url = "/safety/ventanalyShowColum/list?" + urlParams.toString();
- return http.get(url);
- },
-
- controlDevice(params) {
- return http.put(
- "/ventanaly-device/safety/ventanalyMonitorData/devicecontrol",
- params
- );
- },
-
- getCameraById(params) {
- const urlParams = new URLSearchParams(params);
- const url = "/safety/ventanalyCamera/list?" + urlParams.toString();
- return http.get(url);
- },
-
- getCameraByCode(params) {
- const urlParams = new URLSearchParams(params);
- const url =
- "/ventanaly-device/camera/queryByCameraCode?" + urlParams.toString();
- return http.get(url);
- },
-
- getDeviceHistory(params) {
- const urlParams = new URLSearchParams(params);
- const url =
- "/ventanaly-device/safety/ventanalyMonitorData/listdays?" +
- urlParams.toString();
- return http.get(url);
- },
-
- getFileAccessHttpUrl(avatar, subStr) {
- if (!subStr) subStr = "http";
- if (avatar && avatar.startsWith(subStr)) {
- return avatar;
- } else {
- return configService.staticDomainURL + "/" + avatar;
- }
- },
- };
- export default apiService;
|