From d62876d53574eae2480c350a5251e0bb777e279e Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 03 十一月 2022 17:55:27 +0800
Subject: [PATCH] http 请求重新封装

---
 src/api/intelligentPatrol/statistics.js |   46 +++++++++++++++++++++++++++++++++++++---------
 1 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/src/api/intelligentPatrol/statistics.js b/src/api/intelligentPatrol/statistics.js
index fe0261a..d230be2 100644
--- a/src/api/intelligentPatrol/statistics.js
+++ b/src/api/intelligentPatrol/statistics.js
@@ -1,16 +1,44 @@
-import axios from "axios";
-import {
-    getToken
-} from '@/utils/helper'
+import http from '@/http'
+
+
 const baseUrl = '/sccg/intelligentPatrol/statistics'
-const token = {
-    'Authorization': getToken()
-}
+
 export default {
     // 鎸夎繚瑙勭被鍨嬬粺璁�
-    searchByType: (data) => axios({
+    searchByType: (params) => {
+        return http.get('/sccg/intelligentPatrol/statistics/unlawful/type', params);
+    },
+    // 鎸夌偣浣嶇粺璁�
+    searchByPoint: (data) => axios({
         method: 'get',
-        url: baseUrl + '/unlawful/type',
+        url: baseUrl + '/unlawful/point',
+        headers: {
+            ...token
+        },
+        params: data
+    }),
+    // 鎸夋椂闂寸粺璁�
+    searchByTime: (data) => axios({
+        method: 'get',
+        url: baseUrl + '/unlawful/time',
+        headers: {
+            ...token
+        },
+        params: data
+    }),
+    // 鎸夊尯鍩熺粺璁�
+    searchByArea: (data) => axios({
+        method: 'get',
+        url: baseUrl + '/unlawful/area',
+        headers: {
+            ...token
+        },
+        params: data
+    }),
+    // 闂ㄥ墠涓夊寘缁熻
+    searchByShop: (data) => axios({
+        method: 'get',
+        url: baseUrl + '/unlawful/shop',
         headers: {
             ...token
         },

--
Gitblit v1.8.0