refactor: 安装向导移除「监听端口」字段
端口由启动方式(PM2 项目端口 / compose / API_PORT 环境变量)决定,默认 3000, 向导填的值会被进程环境覆盖,属误导项;写 .env 的 API_PORT 改取 process.env.API_PORT。 反代 HTTPS/域名仍由 Nginx/宝塔/1Panel 配置,与安装页无关。
This commit is contained in:
@@ -192,8 +192,7 @@
|
||||
"base": "Base",
|
||||
"appName": "Platform Name",
|
||||
"baseUrl": "Public URL",
|
||||
"listenPort": "Listen Port",
|
||||
"baseUrlHint": "All three apps share this URL: admin at /admin, client at /trace, API at /api. Use Nginx / a control panel to reverse-proxy the domain and HTTPS to the listen port.",
|
||||
"baseUrlHint": "All three apps share this URL: admin at /admin, client at /trace, API at /api. Reverse-proxy the domain and HTTPS to the service port (default 3000, decided by how the service is launched — not set here).",
|
||||
"host": "Host",
|
||||
"port": "Port",
|
||||
"database": "Database",
|
||||
|
||||
@@ -192,8 +192,7 @@
|
||||
"base": "基础",
|
||||
"appName": "平台名称",
|
||||
"baseUrl": "对外访问地址",
|
||||
"listenPort": "监听端口",
|
||||
"baseUrlHint": "三端共用此地址:后台 /admin、客户端 /trace、接口 /api。域名与 HTTPS 建议由 Nginx/宝塔/1Panel 反代到监听端口。",
|
||||
"baseUrlHint": "三端共用此地址:后台 /admin、客户端 /trace、接口 /api。域名与 HTTPS 由 Nginx/宝塔/1Panel 反代到服务端口(默认 3000,由启动方式决定,此处无需填写)。",
|
||||
"host": "主机",
|
||||
"port": "端口",
|
||||
"database": "数据库",
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<h2>{{ tt('base') }}</h2>
|
||||
<label><span>{{ tt('appName') }}</span><n-input v-model:value="form.appName" /></label>
|
||||
<label><span>{{ tt('baseUrl') }}</span><n-input v-model:value="form.baseUrl" placeholder="https://example.com" /></label>
|
||||
<label><span>{{ tt('listenPort') }}</span><n-input-number v-model:value="form.port" :min="1" :show-button="false" class="full" /></label>
|
||||
<p class="hint">{{ tt('baseUrlHint') }}</p>
|
||||
</section>
|
||||
|
||||
@@ -100,7 +99,6 @@ import { useI18n } from 'vue-i18n';
|
||||
interface InstallForm {
|
||||
appName: string;
|
||||
baseUrl: string;
|
||||
port: number;
|
||||
mysql: {
|
||||
host: string;
|
||||
port: number;
|
||||
@@ -138,7 +136,6 @@ const driverOptions = computed(() => [
|
||||
const form = reactive<InstallForm>({
|
||||
appName: tt('defaultAppName'),
|
||||
baseUrl: location.origin,
|
||||
port: 3000,
|
||||
mysql: {
|
||||
host: '127.0.0.1',
|
||||
port: 3306,
|
||||
@@ -223,7 +220,6 @@ onMounted(async () => {
|
||||
const body = await res.json();
|
||||
installed.value = Boolean(body.data?.installed);
|
||||
const d = body.data?.defaults || {};
|
||||
form.port = d.port || form.port;
|
||||
form.mysql.host = d.mysqlHost || form.mysql.host;
|
||||
form.mysql.port = d.mysqlPort || form.mysql.port;
|
||||
form.mysql.database = d.mysqlDatabase || form.mysql.database;
|
||||
|
||||
Reference in New Issue
Block a user