📝 去除 demo.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion-visor/api'
|
||||
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.2.1'
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
VITE_API_BASE_URL= '/orion-visor/api'
|
||||
VITE_WS_BASE_URL= '/orion-visor/keep-alive'
|
||||
VITE_APP_VERSION= '2.2.1'
|
||||
VITE_DEMO_MODE= false
|
||||
|
||||
@@ -9,10 +9,8 @@
|
||||
"dev": "vite --config ./config/vite.config.dev.ts",
|
||||
"dev:host": "vite --config ./config/vite.config.dev.ts --host",
|
||||
"build": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts",
|
||||
"build:demo": "cross-env VITE_DEMO_MODE=true npm run build",
|
||||
"report": "cross-env REPORT=true npm run build",
|
||||
"preview": "npm run build && vite preview --host",
|
||||
"preview:demo": "npm run build:demo && vite preview --host",
|
||||
"type:check": "vue-tsc --noEmit --skipLibCheck",
|
||||
"lint-staged": "npx lint-staged"
|
||||
},
|
||||
|
||||
1
orion-visor-ui/src/env.d.ts
vendored
1
orion-visor-ui/src/env.d.ts
vendored
@@ -19,7 +19,6 @@ interface ImportMetaEnv {
|
||||
readonly VITE_API_BASE_URL: string;
|
||||
readonly VITE_WS_BASE_URL: string;
|
||||
readonly VITE_APP_VERSION: string;
|
||||
readonly VITE_DEMO_MODE: string;
|
||||
}
|
||||
|
||||
// editor
|
||||
|
||||
@@ -12,9 +12,6 @@ export const isStandaloneMode = (() => (
|
||||
|| document.referrer.includes('android-app://')
|
||||
) === true)();
|
||||
|
||||
// 是否为 demo 环境
|
||||
export const isDemoMode = (() => import.meta.env.VITE_DEMO_MODE === 'true')();
|
||||
|
||||
// http base url
|
||||
export const httpBaseUrl = (() => {
|
||||
const configBase = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
<!-- 标题 -->
|
||||
<div class="login-form-title usn">{{ $t('login.form.title') }}</div>
|
||||
<!-- 子标题 -->
|
||||
<div v-if="!isDemoMode" class="login-form-sub-title">{{ $t('login.form.sub.title') }}</div>
|
||||
<!-- 演示模式 -->
|
||||
<div v-else class="login-form-sub-title">{{ $t('login.form.demo.title') }}</div>
|
||||
<div class="login-form-sub-title">{{ $t('login.form.sub.title') }}</div>
|
||||
<!-- 错误信息 -->
|
||||
<div class="login-form-error-msg">{{ errorMessage }}</div>
|
||||
<!-- 登录表单 -->
|
||||
@@ -56,7 +54,6 @@
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useUserStore } from '@/store';
|
||||
import useLoading from '@/hooks/loading';
|
||||
import { isDemoMode } from '@/utils/env';
|
||||
import { DEFAULT_ROUTE_NAME } from '@/router/constants';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export default {
|
||||
'login.form.title': '登录 Orion Visor',
|
||||
'login.form.sub.title': '一站式服务器运维解决方案',
|
||||
'login.form.demo.title': '演示模式账号: admin/admin',
|
||||
'login.form.userName.errMsg': '用户名不能为空',
|
||||
'login.form.password.errMsg': '密码不能为空',
|
||||
'login.form.login.errMsg': '登录出错, 轻刷新重试',
|
||||
|
||||
Reference in New Issue
Block a user