From 8e4ab7acddbdb84fd755acf7e75cf471f50cba60 Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期四, 31 十月 2024 10:16:47 +0800
Subject: [PATCH] 优化部分页面及配置

---
 src/api/system/menu/index.ts |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts
index f8bc112..145d553 100644
--- a/src/api/system/menu/index.ts
+++ b/src/api/system/menu/index.ts
@@ -1,5 +1,9 @@
 import request from '@/config/axios'
 
+import { config } from '@/config/axios/config'
+
+const { plat_url} = config
+
 export interface MenuVO {
   id: number
   name: string
@@ -20,60 +24,60 @@
 
 // 查询菜单(精简)列表
 export const getSimpleMenusList = () => {
-  return request.get({ url: '/system/menu/simple-list' })
+  return request.get({ url: plat_url + '/system/menu/simple-list' })
 }
 
 // 查询应用菜单(精简)列表
 export const getSimpleAppMenusList = () => {
-  return request.get({ url: '/system/menu/simple-app-menus' })
+  return request.get({ url: plat_url + '/system/menu/simple-app-menus' })
 }
 
 // 查询菜单列表
 export const getMenuList = (params) => {
-  return request.get({ url: '/system/menu/list', params })
+  return request.get({ url: plat_url + '/system/menu/list', params })
 }
 
 // 查询应用菜单列表
 export const getAppMenuList = (params) => {
-  return request.get({ url: '/system/menu/app-menu-list', params })
+  return request.get({ url: plat_url + '/system/menu/app-menu-list', params })
 }
 
 // 获取菜单详情
 export const getMenu = (id: number) => {
-  return request.get({ url: '/system/menu/get?id=' + id })
+  return request.get({ url: plat_url + '/system/menu/get?id=' + id })
 }
 
 // 获取应用菜单详情
 export const getAppMenu = (id: number) => {
-  return request.get({ url: '/system/menu/getAppMenu?id=' + id })
+  return request.get({ url: plat_url + '/system/menu/getAppMenu?id=' + id })
 }
 
 // 新增菜单
 export const createMenu = (data: MenuVO) => {
-  return request.post({ url: '/system/menu/create', data })
+  return request.post({ url: plat_url + '/system/menu/create', data })
 }
 
 // 新增应用菜单
 export const createAppMenu = (data: MenuVO) => {
-  return request.post({ url: '/system/menu/createAppMenu', data })
+  return request.post({ url: plat_url + '/system/menu/createAppMenu', data })
 }
 
 // 修改菜单
 export const updateMenu = (data: MenuVO) => {
-  return request.put({ url: '/system/menu/update', data })
+  return request.put({ url: plat_url + '/system/menu/update', data })
 }
 
 // 修改应用菜单
 export const updateAppMenu = (data: MenuVO) => {
-  return request.put({ url: '/system/menu/updateAppMenu', data })
+  return request.put({ url: plat_url + '/system/menu/updateAppMenu', data })
 }
 
 // 删除菜单
 export const deleteMenu = (id: number) => {
-  return request.delete({ url: '/system/menu/delete?id=' + id })
+  return request.delete({ url: plat_url + '/system/menu/delete?id=' + id })
 }
 
 // 删除应用菜单
 export const deleteAppMenu = (id: number) => {
-  return request.delete({ url: '/system/menu/deleteAppMenu?id=' + id })
+  return request.delete({ url: plat_url + '/system/menu/deleteAppMenu?id=' + id })
 }

--
Gitblit v1.9.3