mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-09-26 16:44:13 +08:00
fix:环境变量
This commit is contained in:
@ -459,7 +459,7 @@ function AboutUs() {
|
||||
<div className={styles.brief}>
|
||||
<div className={styles.appName}>{APP_NAME}</div>
|
||||
<div className={styles.env}>
|
||||
{i18n('setting.text.currentEnv')}:{window._ENV}
|
||||
{i18n('setting.text.currentEnv')}:{window.__ENV}
|
||||
</div>
|
||||
<div className={styles.version}>
|
||||
{i18n('setting.text.currentVersion')}:v{__APP_VERSION__} build
|
||||
|
@ -6,12 +6,13 @@ import styles from './index.less';
|
||||
// 只有本地开发时使用cdn,发布线上时要下载iconfont到 /assets/font
|
||||
if (__ENV === 'local') {
|
||||
let container = `
|
||||
@font-face {
|
||||
font-family: 'iconfont'; /* Project id 3633546 */
|
||||
src: url('//at.alicdn.com/t/c/font_3633546_0ip5jtwa6g6.woff2?t=1687700061581') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_3633546_0ip5jtwa6g6.woff?t=1687700061581') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_3633546_0ip5jtwa6g6.ttf?t=1687700061581') format('truetype');
|
||||
}
|
||||
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
||||
@font-face {
|
||||
font-family: 'iconfont'; /* Project id 3633546 */
|
||||
src: url('//at.alicdn.com/t/a/font_3633546_p80guyu8w2s.woff2?t=1687748230475') format('woff2'),
|
||||
url('//at.alicdn.com/t/a/font_3633546_p80guyu8w2s.woff?t=1687748230475') format('woff'),
|
||||
url('//at.alicdn.com/t/a/font_3633546_p80guyu8w2s.ttf?t=1687748230475') format('truetype');
|
||||
}
|
||||
`
|
||||
let style = document.createElement("style");
|
||||
style.type = "text/css";
|
||||
|
@ -22,7 +22,6 @@ import {
|
||||
declare global {
|
||||
interface Window {
|
||||
_Lang: string;
|
||||
_ENV: string;
|
||||
_APP_PORT: string;
|
||||
_BUILD_TIME: string;
|
||||
_BaseURL: string;
|
||||
@ -33,9 +32,6 @@ declare global {
|
||||
const __ENV: string;
|
||||
}
|
||||
|
||||
console.log(process.env.UMI_ENV);
|
||||
|
||||
window._ENV = process.env.UMI_ENV! || 'local';
|
||||
window._Lang = getLang();
|
||||
|
||||
const { getDesignToken, useToken } = theme;
|
||||
|
@ -119,7 +119,6 @@
|
||||
|
||||
.databaseItemRight {
|
||||
display: none;
|
||||
|
||||
i {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
@ -24,8 +24,8 @@ const navConfig: INavItem[] = [
|
||||
},
|
||||
{
|
||||
key: 'dashboard',
|
||||
icon: '\ue616',
|
||||
iconFontSize: 16,
|
||||
icon: '\ue629',
|
||||
iconFontSize: 24,
|
||||
component: <Dashboard />,
|
||||
},
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ request.interceptors.request.use((url, options) => {
|
||||
|
||||
request.interceptors.response.use(async (response, options) => {
|
||||
const res = await response.clone().json();
|
||||
if (window._ENV === 'desktop') {
|
||||
if (__ENV === 'desktop') {
|
||||
const DBHUB = response.headers.get('DBHUB') || '';
|
||||
if (DBHUB) {
|
||||
localStorage.setItem('DBHUB', DBHUB);
|
||||
|
Reference in New Issue
Block a user