From 9861e1af20d7e09f578657f8d32b62e54664327e Mon Sep 17 00:00:00 2001 From: "jonah.fu" Date: Sat, 6 Dec 2025 20:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(install):=20=E4=BF=AE=E6=AD=A3=20MySQL=20?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E7=9A=84=E6=93=8D=E4=BD=9C=E7=B3=BB=E7=BB=9F=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 根据运行环境自动判断是否为 Linux 操作系统 - 设置 MySQL 类型选择框默认选中对应操作系统选项 - 优化安装页面用户体验,避免手动选择错误的数据库类型 - 更新视图逻辑实现动态默认选项的渲染 --- COMCMS.Web/Views/Home/Install.cshtml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/COMCMS.Web/Views/Home/Install.cshtml b/COMCMS.Web/Views/Home/Install.cshtml index 910a6f8..887c0d0 100644 --- a/COMCMS.Web/Views/Home/Install.cshtml +++ b/COMCMS.Web/Views/Home/Install.cshtml @@ -37,10 +37,20 @@ @if (ViewBag.sqltype == "mysql") { + var isLinux = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Linux); + var defaultMysqlType = isLinux ? "linux" : "windows";
}