From 5d3f2aa7ccd9f761a6fd4224e7b49ceb6830abea Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期二, 09 八月 2022 10:02:51 +0800
Subject: [PATCH] 删除未用到的依赖

---
 src/api/api.js |  123 ++++++++++++++++++++++++++++++++++------
 1 files changed, 104 insertions(+), 19 deletions(-)

diff --git a/src/api/api.js b/src/api/api.js
index 839ac98..f9f48e3 100644
--- a/src/api/api.js
+++ b/src/api/api.js
@@ -1,28 +1,113 @@
-//鐢ㄤ簬鍐欐帴鍙�
-//post璇锋眰鍙傛暟鏀惧湪data閲岄潰锛実et璇锋眰鍙傛暟鏀惧湪params閲岃竟
+// 鐢ㄤ簬鍐欐帴鍙�
 
-import request from "../utils/request";
-//瀵艰埅鏍忓垪琛�
-export const getNavList = data => {
-  return request({
-    method: 'GET',
-    url: '/contype/findList',
-    params:data,
-  })
-}
-//鑾峰彇灏忔爣棰�
+import request from '../utils/request'
+// // 瀵艰埅鏍忓垪琛�
+// export const getNavList = data => {
+//   return request({
+//     method: 'GET',
+//     url: '/news_type/all',
+//     params:data,
+//   })
+// }
+// 鑾峰彇灏忔爣棰�
 export const getMinTitle = data => {
   return request({
-    method: 'POST',
-    url: '/category/findCategoryIdByContypeId',
-    data,
+    method: 'GET',
+    url: `/news_category/list/${data}`
   })
 }
-//鑾峰彇鏂伴椈鍒楄〃
+// 鑾峰彇鏂伴椈鍒楄〃
 export const getNewsList = data => {
   return request({
     method: 'POST',
-    url: '/newsTheme/findByTypeIdAndCategoryId',
-    data,
+    url: '/news/list',
+    params: data
   })
-}
\ No newline at end of file
+}
+// 鑾峰彇鍙湁涓�绡囨柊闂�
+export const getnew = data => {
+  return request({
+    method: 'GET',
+    url: `/news/main/${data}`
+  })
+}
+// 淇敼鏂伴椈
+export const update = data => {
+  return request({
+    method: 'POST',
+    url: '/news/update',
+    params: data
+  })
+}
+// 鍒犻櫎鏂伴椈
+export const deleteNew = data => {
+  return request({
+    method: 'POST',
+    url: '/news/delete',
+    params: data
+  })
+}
+// 妯$硦鏌ヨ
+export const fuzzy = data => {
+  return request({
+    method: 'POST',
+    url: '/news/fuzzy',
+    params: data
+  })
+}
+// 娣诲姞鏂伴椈
+export const add = (data, fd) => {
+  return request({
+    method: 'POST',
+    url: '/news/add',
+    params: data,
+    data: fd
+  })
+}
+// 鐧诲綍
+export const login = data => {
+  return request({
+    method: 'POST',
+    url: '/login',
+    params: data
+  })
+}
+// 鑾峰彇鏅�氱鐞嗗憳鍒楄〃
+export const getmain = () => {
+  return request({
+    method: 'GET',
+    url: '/admin/list'
+  })
+}
+// 瓒呯淇敼鏅璐﹀彿瀵嗙爜
+export const editAccount = data => {
+  return request({
+    method: 'POST',
+    url: '/admin/updatePassword',
+    params: data
+  })
+}
+// 鍒犻櫎鏅�氱鐞嗗憳
+export const deleteAd = data => {
+  return request({
+    method: 'POST',
+    url: '/admin/delete',
+    params: data
+  })
+}
+// 娉ㄥ唽鏅�氱鐞嗗憳
+export const addAd = data => {
+  return request({
+    method: 'POST',
+    url: '/admin/add',
+    params: data
+  })
+}
+// 鏂囦欢涓婁紶
+export const fileUpload = fd => {
+  return request({
+    method: 'POST',
+    url: '/uploading',
+    data: fd
+  })
+}

--
Gitblit v1.8.0