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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user