2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-07 13:13:06 +08:00

feat: alova.js替换axios

This commit is contained in:
耗子
2025-02-06 18:18:07 +08:00
parent 2b74b35701
commit d27a29151e
15 changed files with 186 additions and 348 deletions

View File

@@ -22,19 +22,22 @@ const createModel = ref({
})
const websites = ref<any>([])
const installedDbAndPhp = ref({
php: [
{
label: '',
value: ''
}
],
db: [
{
label: '',
value: ''
}
]
const { data: installedDbAndPhp } = useRequest(dashboard.installedDbAndPhp, {
initialData: {
php: [
{
label: '不使用',
value: 0
}
],
db: [
{
label: '',
value: ''
}
]
}
})
const mySQLInstalled = computed(() => {
@@ -56,11 +59,6 @@ const getWebsiteList = async (page: number, limit: number) => {
createModel.value.target = websites.value[0]?.value
}
const getPhpAndDb = async () => {
const { data } = await dashboard.installedDbAndPhp()
installedDbAndPhp.value = data
}
const handleSubmit = async () => {
loading.value = true
await cron
@@ -85,7 +83,6 @@ watch(createModel, (value) => {
})
onMounted(() => {
getPhpAndDb()
useRequest(app.isInstalled('nginx')).onSuccess(({ data }) => {
if (data.installed) {
getWebsiteList(1, 10000)