From 0759348a3064698ed79e00d2abe0748d9391d409 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 25 七月 2022 12:13:55 +0800 Subject: [PATCH] batch import cameer --- src/api/camera.ts | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/api/camera.ts b/src/api/camera.ts index d2f33a5..1cd0040 100644 --- a/src/api/camera.ts +++ b/src/api/camera.ts @@ -1,17 +1,24 @@ import request from "@/scripts/httpRequest"; +import request2 from './index' import qs from "qs"; export const createCamera = (camera: any) => { - return request({ + return request2({ url: "/saas/api-s/camera/add", method: "post", data: camera }); }; +export const downloadFile = () => request({ + url: '/saas/api-s/camera/downloadExcel', + method: 'get', + responseType: "blob" +}) + export const updateCameraInfo = (camera: any) => { - return request({ + return request2({ url: "/saas/api-s/camera/update", method: "post", data: camera @@ -66,11 +73,11 @@ }); }; -export const updateSnapshot = (cameraId: string) => { +export const updateSnapshot = (data: any) => { return request({ url: "/saas/api-s/camera/updateSnapshotUrl", - method: "get", - params: { cameraId: cameraId } + method: "post", + data:data }); }; -- Gitblit v1.8.0