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 | 22 +++++++--------------- 1 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/api/intelligentPatrol/statistics.js b/src/api/intelligentPatrol/statistics.js index 2ba6fd0..d230be2 100644 --- a/src/api/intelligentPatrol/statistics.js +++ b/src/api/intelligentPatrol/statistics.js @@ -1,21 +1,13 @@ -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({ - method: 'get', - url: baseUrl + '/unlawful/type', - headers: { - ...token - }, - params: data - }), + searchByType: (params) => { + return http.get('/sccg/intelligentPatrol/statistics/unlawful/type', params); + }, // 鎸夌偣浣嶇粺璁� searchByPoint: (data) => axios({ method: 'get', -- Gitblit v1.8.0