2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 11:27:17 +08:00

fix: 修正环境检查

This commit is contained in:
2026-01-09 17:12:57 +08:00
parent 1d41b2c61c
commit f48c975de3
14 changed files with 74 additions and 53 deletions

View File

@@ -12,8 +12,8 @@ export default {
systemInfo: (): any => http.Get('/home/system_info'),
// 统计信息
countInfo: (): any => http.Get('/home/count_info'),
// 已安装的数据库和PHP
installedDbAndPhp: (): any => http.Get('/home/installed_db_and_php'),
// 已安装的环境
installedEnvironment: (): any => http.Get('/home/installed_environment'),
// 检查更新
checkUpdate: (): any => http.Get('/home/check_update'),
// 更新日志

View File

@@ -10,7 +10,7 @@ import { useGettext } from 'vue3-gettext'
const { $gettext } = useGettext()
const currentTab = ref('website')
const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
const { data: installedEnvironment } = useRequest(home.installedEnvironment, {
initialData: {
db: [
{
@@ -22,11 +22,11 @@ const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
})
const mySQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'mysql')
return installedEnvironment.value.db.find((item: any) => item.value === 'mysql')
})
const postgreSQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'postgresql')
return installedEnvironment.value.db.find((item: any) => item.value === 'postgresql')
})
</script>

View File

@@ -24,7 +24,7 @@ const createModel = ref({
const websites = ref<any>([])
const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
const { data: installedEnvironment } = useRequest(home.installedEnvironment, {
initialData: {
db: [
{
@@ -36,11 +36,11 @@ const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
})
const mySQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'mysql')
return installedEnvironment.value.db.find((item: any) => item.value === 'mysql')
})
const postgreSQLInstalled = computed(() => {
return installedDbAndPhp.value.db.find((item: any) => item.value === 'postgresql')
return installedEnvironment.value.db.find((item: any) => item.value === 'postgresql')
})
const handleSubmit = async () => {

View File

@@ -28,7 +28,7 @@ const createModel = ref({
proxy: ''
})
const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
const { data: installedEnvironment } = useRequest(home.installedEnvironment, {
initialData: {
php: [
{
@@ -141,7 +141,7 @@ const formatDbValue = (value: string) => {
<n-form-item path="php" :label="$gettext('PHP Version')">
<n-select
v-model:value="createModel.php"
:options="installedDbAndPhp.php"
:options="installedEnvironment.php"
:placeholder="$gettext('Select PHP Version')"
@keydown.enter.prevent
>
@@ -153,7 +153,7 @@ const formatDbValue = (value: string) => {
<n-form-item path="db" :label="$gettext('Database')">
<n-select
v-model:value="createModel.db_type"
:options="installedDbAndPhp.db"
:options="installedEnvironment.db"
:placeholder="$gettext('Select Database')"
@keydown.enter.prevent
@update:value="

View File

@@ -49,7 +49,7 @@ const { data: setting, send: fetchSetting } = useRequest(website.config(Number(i
proxies: []
}
})
const { data: installedDbAndPhp } = useRequest(home.installedDbAndPhp, {
const { data: installedEnvironment } = useRequest(home.installedEnvironment, {
initialData: {
php: [
{
@@ -249,7 +249,7 @@ const hasArg = (args: string[], arg: string) => {
<n-select
v-model:value="setting.php"
:default-value="0"
:options="installedDbAndPhp.php"
:options="installedEnvironment.php"
:placeholder="$gettext('Select PHP Version')"
@keydown.enter.prevent
>