2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-08 15:24:28 +08:00

feat: alova.js替换axios

This commit is contained in:
耗子
2025-02-05 22:43:40 +08:00
parent 4632cf7d58
commit 645e6d663f
17 changed files with 99 additions and 152 deletions

View File

@@ -1,8 +1,8 @@
import { request } from '@/utils'
import { http } from '@/utils'
export default {
// 获取配置
config: (): any => request.get('/apps/gitea/config'),
config: (): any => http.Get('/apps/gitea/config'),
// 保存配置
saveConfig: (config: string): any => request.post('/apps/gitea/config', { config })
saveConfig: (config: string): any => http.Post('/apps/gitea/config', { config })
}

View File

@@ -1,8 +1,7 @@
import { http } from '@/utils'
// 负载状态
export const getLoad = () => http.Get('/apps/memcached/load')
// 获取配置
export const getConfig = () => http.Get('/apps/memcached/config')
// 保存配置
export const updateConfig = (config: string) => http.Post('/apps/memcached/config', { config })
export default {
getLoad: (): any => http.Get('/apps/memcached/load'),
getConfig: (): any => http.Get('/apps/memcached/config'),
updateConfig: (config: string): any => http.Post('/apps/memcached/config', { config })
}

View File

@@ -1,20 +1,20 @@
import { request } from '@/utils'
import { http } from '@/utils'
export default {
// 服务状态
status: (service: string): any => request.get('/systemctl/status', { params: { service } }),
status: (service: string): any => http.Get('/systemctl/status', { params: { service } }),
// 是否启用服务
isEnabled: (service: string): any => request.get('/systemctl/isEnabled', { params: { service } }),
isEnabled: (service: string): any => http.Get('/systemctl/isEnabled', { params: { service } }),
// 启用服务
enable: (service: string): any => request.post('/systemctl/enable', { service }),
enable: (service: string): any => http.Post('/systemctl/enable', { service }),
// 禁用服务
disable: (service: string): any => request.post('/systemctl/disable', { service }),
disable: (service: string): any => http.Post('/systemctl/disable', { service }),
// 重启服务
restart: (service: string): any => request.post('/systemctl/restart', { service }),
restart: (service: string): any => http.Post('/systemctl/restart', { service }),
// 重载服务
reload: (service: string): any => request.post('/systemctl/reload', { service }),
reload: (service: string): any => http.Post('/systemctl/reload', { service }),
// 启动服务
start: (service: string): any => request.post('/systemctl/start', { service }),
start: (service: string): any => http.Post('/systemctl/start', { service }),
// 停止服务
stop: (service: string): any => request.post('/systemctl/stop', { service })
stop: (service: string): any => http.Post('/systemctl/stop', { service })
}