fix: 本地品牌图可显示,未配置时不再露出文字 LOGO
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m2s
All checks were successful
Build and Deploy Front / deploy (push) Successful in 4m2s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a7993c12b6
commit
a21b2f5813
@ -129,11 +129,26 @@ function toCosSameOriginProxyUrl(absoluteUrl: string): string | null {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开发态 `/__cos__/` 必须留在 Vite 同源。
|
||||||
|
* 已改写过的地址再进 resolve 时,不能再拼 VITE_API_ASSET_ORIGIN,否则变成
|
||||||
|
* `https://api.../admin/__cos__/...`,空态背景图加载失败。
|
||||||
|
*/
|
||||||
|
function restoreDevCosProxyPath(value: string): string | null {
|
||||||
|
if (!import.meta.env.DEV) return null
|
||||||
|
if (value.startsWith('/__cos__/')) return value
|
||||||
|
const embedded = value.match(/\/__cos__\/.+$/)
|
||||||
|
if (embedded && /^https?:\/\//i.test(value)) return embedded[0]
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
/** 将 /uploads/... 相对路径转为可访问 URL(同源相对,或 VITE_API_ASSET_ORIGIN 绝对前缀) */
|
/** 将 /uploads/... 相对路径转为可访问 URL(同源相对,或 VITE_API_ASSET_ORIGIN 绝对前缀) */
|
||||||
export function resolveOmsAssetUrl(path?: string | null): string {
|
export function resolveOmsAssetUrl(path?: string | null): string {
|
||||||
if (!path) return ''
|
if (!path) return ''
|
||||||
const value = path.trim()
|
const value = path.trim()
|
||||||
if (!value) return ''
|
if (!value) return ''
|
||||||
|
const devCos = restoreDevCosProxyPath(value)
|
||||||
|
if (devCos) return devCos
|
||||||
if (/^https?:\/\//i.test(value) || value.startsWith('data:') || value.startsWith('blob:')) {
|
if (/^https?:\/\//i.test(value) || value.startsWith('data:') || value.startsWith('blob:')) {
|
||||||
const cosProxied = toCosSameOriginProxyUrl(value)
|
const cosProxied = toCosSameOriginProxyUrl(value)
|
||||||
if (cosProxied) return cosProxied
|
if (cosProxied) return cosProxied
|
||||||
|
|||||||
@ -39,29 +39,23 @@ body {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 全局空态:未配置吉祥物显示文字 LOGO;有配置用图片 */
|
/* 全局空态:未配置吉祥物时不占位;有配置才显示图片 */
|
||||||
.arco-empty-image {
|
.arco-empty-image {
|
||||||
.arco-icon {
|
.arco-icon {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&::after {
|
html:not(.has-app-mascot) .arco-empty-image {
|
||||||
content: 'LOGO';
|
display: none;
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
line-height: 1;
|
|
||||||
color: var(--color-text-3, #86909c);
|
|
||||||
opacity: 0.55;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
html.has-app-mascot .arco-empty-image::after {
|
html.has-app-mascot .arco-empty-image::after {
|
||||||
content: '';
|
content: '';
|
||||||
|
display: block;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
margin: 0 auto;
|
||||||
background: var(--app-mascot-bg) center / contain no-repeat;
|
background: var(--app-mascot-bg) center / contain no-repeat;
|
||||||
filter: grayscale(1) brightness(1.08) contrast(0.92);
|
filter: grayscale(1) brightness(1.08) contrast(0.92);
|
||||||
opacity: 0.78;
|
opacity: 0.78;
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-mascot-state" :class="[`is-${mode}`, { 'is-compact': compact }]">
|
<div
|
||||||
|
v-if="appMascotUrl || description || $slots.default"
|
||||||
|
class="app-mascot-state"
|
||||||
|
:class="[`is-${mode}`, { 'is-compact': compact }]"
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
v-if="appMascotUrl"
|
v-if="appMascotUrl"
|
||||||
class="app-mascot-state__img"
|
class="app-mascot-state__img"
|
||||||
@ -9,14 +13,6 @@
|
|||||||
decoding="async"
|
decoding="async"
|
||||||
draggable="false"
|
draggable="false"
|
||||||
/>
|
/>
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="app-mascot-state__text"
|
|
||||||
:class="{ 'is-bounce': mode === 'loading' }"
|
|
||||||
aria-hidden="true"
|
|
||||||
>
|
|
||||||
{{ BRAND_TEXT_LOGO }}
|
|
||||||
</span>
|
|
||||||
<p v-if="description" class="app-mascot-state__desc">{{ description }}</p>
|
<p v-if="description" class="app-mascot-state__desc">{{ description }}</p>
|
||||||
<div v-if="$slots.default" class="app-mascot-state__extra">
|
<div v-if="$slots.default" class="app-mascot-state__extra">
|
||||||
<slot />
|
<slot />
|
||||||
@ -25,7 +21,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo'
|
import { appMascotUrl } from '@/utils/brandLogo'
|
||||||
|
|
||||||
withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@ -61,10 +57,6 @@ withDefaults(
|
|||||||
width: 56px;
|
width: 56px;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-mascot-state__text {
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-empty .app-mascot-state__img {
|
&.is-empty .app-mascot-state__img {
|
||||||
@ -73,17 +65,9 @@ withDefaults(
|
|||||||
opacity: 0.78;
|
opacity: 0.78;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-empty .app-mascot-state__text {
|
|
||||||
opacity: 0.55;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-empty.is-compact .app-mascot-state__img {
|
&.is-empty.is-compact .app-mascot-state__img {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-empty.is-compact .app-mascot-state__text {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-mascot-state__img {
|
.app-mascot-state__img {
|
||||||
@ -98,20 +82,6 @@ withDefaults(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-mascot-state__text {
|
|
||||||
display: block;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
line-height: 1;
|
|
||||||
color: var(--color-text-3, #86909c);
|
|
||||||
pointer-events: none;
|
|
||||||
|
|
||||||
&.is-bounce {
|
|
||||||
animation: app-mascot-bounce 1.4s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-mascot-state__desc {
|
.app-mascot-state__desc {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
@ -140,8 +110,7 @@ withDefaults(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.app-mascot-state__img.is-bounce,
|
.app-mascot-state__img.is-bounce {
|
||||||
.app-mascot-state__text.is-bounce {
|
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,8 +16,7 @@
|
|||||||
} from './filterValue';
|
} from './filterValue';
|
||||||
import { enrichHybridColumn } from './hybridHeader';
|
import { enrichHybridColumn } from './hybridHeader';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import { appMascotUrl as emptyMascotSrc, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
|
import { appMascotUrl as emptyMascotSrc } from '@/utils/brandLogo';
|
||||||
const emptyTextLogo = BRAND_TEXT_LOGO;
|
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
/** Handsontable classic 浅/深主题:随页面日夜模式切换,否则列表区会被主题 CSS 锁成白底 */
|
/** Handsontable classic 浅/深主题:随页面日夜模式切换,否则列表区会被主题 CSS 锁成白底 */
|
||||||
@ -2889,11 +2888,6 @@
|
|||||||
alt=""
|
alt=""
|
||||||
draggable="false"
|
draggable="false"
|
||||||
/>
|
/>
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="handsontable-empty-overlay__text-logo"
|
|
||||||
aria-hidden="true"
|
|
||||||
>{{ emptyTextLogo }}</span>
|
|
||||||
<p v-if="emptyOverlayText" class="handsontable-empty-overlay__text">{{ emptyOverlayText }}</p>
|
<p v-if="emptyOverlayText" class="handsontable-empty-overlay__text">{{ emptyOverlayText }}</p>
|
||||||
<div v-if="$slots.emptyExtra" class="handsontable-empty-overlay__extra">
|
<div v-if="$slots.emptyExtra" class="handsontable-empty-overlay__extra">
|
||||||
<slot name="emptyExtra" />
|
<slot name="emptyExtra" />
|
||||||
@ -2974,16 +2968,6 @@
|
|||||||
opacity: 0.78;
|
opacity: 0.78;
|
||||||
}
|
}
|
||||||
|
|
||||||
.handsontable-empty-overlay__text-logo {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
line-height: 1;
|
|
||||||
color: var(--color-text-3, #86909c);
|
|
||||||
opacity: 0.55;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.handsontable-empty-overlay__text {
|
.handsontable-empty-overlay__text {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
|
|||||||
@ -19,9 +19,8 @@
|
|||||||
import { isFunction } from 'lodash';
|
import { isFunction } from 'lodash';
|
||||||
import FormPro from '@/components/FormPro/index.vue';
|
import FormPro from '@/components/FormPro/index.vue';
|
||||||
import { $baseMessage } from '@/utils';
|
import { $baseMessage } from '@/utils';
|
||||||
import { appMascotUrl, BRAND_TEXT_LOGO } from '@/utils/brandLogo';
|
import { appMascotUrl } from '@/utils/brandLogo';
|
||||||
const emptyImage = appMascotUrl;
|
const emptyImage = appMascotUrl;
|
||||||
const emptyTextLogo = BRAND_TEXT_LOGO;
|
|
||||||
import type { TableProMethods } from './types';
|
import type { TableProMethods } from './types';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@ -886,7 +885,6 @@
|
|||||||
class="empty-mascot"
|
class="empty-mascot"
|
||||||
draggable="false"
|
draggable="false"
|
||||||
/>
|
/>
|
||||||
<span v-else class="empty-text-logo" aria-hidden="true">{{ emptyTextLogo }}</span>
|
|
||||||
<div class="empty-text">暂无数据</div>
|
<div class="empty-text">暂无数据</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -993,15 +991,6 @@
|
|||||||
opacity: 0.78;
|
opacity: 0.78;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-text-logo {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
line-height: 1;
|
|
||||||
color: var(--color-text-3, #86909c);
|
|
||||||
opacity: 0.55;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-text {
|
.empty-text {
|
||||||
|
|||||||
@ -2,15 +2,18 @@
|
|||||||
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
<div id="top-nav" class="top-nav" :class="{ tabNavEnable: tabNavEnable }">
|
||||||
<div class="top-nav-header">
|
<div class="top-nav-header">
|
||||||
<!-- Logo 区域:点击跳转官网首页 -->
|
<!-- Logo 区域:点击跳转官网首页 -->
|
||||||
<a class="top-nav-logo" href="/" :title="t('brand.fullName')" @click="goOfficialSite">
|
<a
|
||||||
<template v-if="navLogoSrc">
|
v-if="navLogoSrc"
|
||||||
|
class="top-nav-logo"
|
||||||
|
href="/"
|
||||||
|
:title="t('brand.fullName')"
|
||||||
|
@click="goOfficialSite"
|
||||||
|
>
|
||||||
<img :src="navLogoSrc" :alt="t('brand.name')" />
|
<img :src="navLogoSrc" :alt="t('brand.name')" />
|
||||||
<div class="top-nav-logo__brand">
|
<div class="top-nav-logo__brand">
|
||||||
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
|
<span class="top-nav-logo__name">{{ t('brand.name') }}</span>
|
||||||
<span class="top-nav-logo__full">{{ t('brand.fullName') }}</span>
|
<span class="top-nav-logo__full">{{ t('brand.fullName') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
<span v-else class="top-nav-logo__mark" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- 顶部水平菜单:磁吸滑块 + 极速 hover 下拉 -->
|
<!-- 顶部水平菜单:磁吸滑块 + 极速 hover 下拉 -->
|
||||||
@ -285,11 +288,7 @@ import { Message } from '@arco-design/web-vue';
|
|||||||
import { openWindow, regexUrl } from '@/utils';
|
import { openWindow, regexUrl } from '@/utils';
|
||||||
import { MenuService, AuthService } from '@/api/rbac';
|
import { MenuService, AuthService } from '@/api/rbac';
|
||||||
import type { MenuTreeDto } from '@/api/rbac';
|
import type { MenuTreeDto } from '@/api/rbac';
|
||||||
import {
|
import { applyDocumentFavicon, loadBrandLogoUrls } from '@/utils/brandLogo';
|
||||||
applyDocumentFavicon,
|
|
||||||
BRAND_TEXT_LOGO,
|
|
||||||
loadBrandLogoUrls,
|
|
||||||
} from '@/utils/brandLogo';
|
|
||||||
import {
|
import {
|
||||||
initHiprintClientState,
|
initHiprintClientState,
|
||||||
setHiprintClientEnabled,
|
setHiprintClientEnabled,
|
||||||
@ -1405,18 +1404,6 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-nav-logo__mark {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 36px;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
color: rgba(255, 255, 255, 0.78);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-nav-logo__brand {
|
.top-nav-logo__brand {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@ -1,17 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-brand" aria-hidden="true">
|
<div v-if="logoSrc" class="login-brand" aria-hidden="true">
|
||||||
<template v-if="logoSrc">
|
|
||||||
<img class="login-brand__img" :src="logoSrc" alt="" draggable="false" />
|
<img class="login-brand__img" :src="logoSrc" alt="" draggable="false" />
|
||||||
<span class="login-brand__name">{{ t('brand.name') }}</span>
|
<span class="login-brand__name">{{ t('brand.name') }}</span>
|
||||||
</template>
|
|
||||||
<span v-else class="login-brand__mark">{{ BRAND_TEXT_LOGO }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { BRAND_TEXT_LOGO, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
|
import { fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
|
||||||
|
|
||||||
defineOptions({ name: 'LoginLockLogo' });
|
defineOptions({ name: 'LoginLockLogo' });
|
||||||
|
|
||||||
@ -40,16 +37,6 @@ void fetchBrandLogoUrlsPublic().then((urls) => {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-brand__mark {
|
|
||||||
display: block;
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
line-height: 1;
|
|
||||||
color: #86909c;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.login-brand__name {
|
.login-brand__name {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<header id="header" class="header d-flex align-items-center fixed-top">
|
<header id="header" class="header d-flex align-items-center fixed-top">
|
||||||
<div class="container-fluid container-xl d-flex align-items-center justify-content-between">
|
<div class="container-fluid container-xl d-flex align-items-center justify-content-between">
|
||||||
<a href="/" class="logo d-flex align-items-center" @click="$emit('home')">
|
<a
|
||||||
<template v-if="siteLogoSrc">
|
v-if="siteLogoSrc"
|
||||||
|
href="/"
|
||||||
|
class="logo d-flex align-items-center"
|
||||||
|
@click="$emit('home')"
|
||||||
|
>
|
||||||
<img :src="siteLogoSrc" alt="BCD logo" width="40" height="40" />
|
<img :src="siteLogoSrc" alt="BCD logo" width="40" height="40" />
|
||||||
<span class="brand-lockup">
|
<span class="brand-lockup">
|
||||||
<h1>BCD</h1>
|
<h1>BCD</h1>
|
||||||
<small class="brand-fullname">Business & Customer & Delivery</small>
|
<small class="brand-fullname">Business & Customer & Delivery</small>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
|
||||||
<span v-else class="logo-mark" aria-hidden="true">{{ BRAND_TEXT_LOGO }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@ -120,11 +122,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import {
|
import { applyDocumentFavicon, fetchBrandLogoUrlsPublic } from '@/utils/brandLogo';
|
||||||
applyDocumentFavicon,
|
|
||||||
BRAND_TEXT_LOGO,
|
|
||||||
fetchBrandLogoUrlsPublic,
|
|
||||||
} from '@/utils/brandLogo';
|
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { useRbacUserStore } from '@/store/modules/rbac-user';
|
import { useRbacUserStore } from '@/store/modules/rbac-user';
|
||||||
import { applyRbacUserToUserStore } from '@/utils/enter-system';
|
import { applyRbacUserToUserStore } from '@/utils/enter-system';
|
||||||
|
|||||||
@ -55,19 +55,6 @@ body.command-home {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header .logo .logo-mark {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 40px;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
line-height: 1;
|
|
||||||
color: var(--kc-secondary, #86909c);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header .logo h1 {
|
.header .logo h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--kc-primary);
|
color: var(--kc-primary);
|
||||||
|
|||||||
@ -223,8 +223,10 @@ export default defineConfig(({ mode }) => {
|
|||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
// 仅开发:同源代理 COS(生产无 /__cos__,走 file-storage/stream)
|
// 仅开发:同源代理 COS(生产无 /__cos__,走 file-storage/stream)
|
||||||
|
// 必须走 https:自定义域 http 会 302 到 https,浏览器跟随后因证书主机名不匹配,img 直接空白。
|
||||||
|
// secure:false 让代理忽略该证书,页面只请求 localhost。
|
||||||
'/__cos__': {
|
'/__cos__': {
|
||||||
target: 'http://cos.ideship.com',
|
target: 'https://cos.ideship.com',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
xfwd: false,
|
xfwd: false,
|
||||||
@ -233,7 +235,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
router: (req) => {
|
router: (req) => {
|
||||||
const raw = String(req.originalUrl || req.url || '').split('?')[0];
|
const raw = String(req.originalUrl || req.url || '').split('?')[0];
|
||||||
const host = raw.replace(/^\/__cos__\//, '').split('/')[0];
|
const host = raw.replace(/^\/__cos__\//, '').split('/')[0];
|
||||||
return host ? `http://${host}` : 'http://cos.ideship.com';
|
return host ? `https://${host}` : 'https://cos.ideship.com';
|
||||||
},
|
},
|
||||||
rewrite: (path) => path.replace(/^\/__cos__\/[^/]+/, '') || '/',
|
rewrite: (path) => path.replace(/^\/__cos__\/[^/]+/, '') || '/',
|
||||||
configure: (proxy) => {
|
configure: (proxy) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user