diff --git a/src/api/system/otherConfig.ts b/src/api/system/otherConfig.ts index 41b8161..5081745 100644 --- a/src/api/system/otherConfig.ts +++ b/src/api/system/otherConfig.ts @@ -76,6 +76,30 @@ export async function uploadPaymentReceiveQr(channel: PaymentReceiveQrChannel, f return unwrapData(res.data) } +export type BrandLogoChannel = 'portal' | 'site' + +export interface BrandLogoDto { + portalUrl?: string + siteUrl?: string +} + +/** 获取品牌 Logo(系统顶栏 / 官网)可访问地址 */ +export async function getBrandLogo() { + const res = await axiosInstance.get(omsUrl('/system/other-config/brand-logo')) + return unwrapData(res.data) +} + +/** 上传并替换品牌 Logo */ +export async function uploadBrandLogo(channel: BrandLogoChannel, file: File) { + const form = new FormData() + form.append('channel', channel) + form.append('file', file) + const res = await axiosInstance.post(omsUrl('/system/other-config/brand-logo/upload'), form, { + headers: { 'Content-Type': 'multipart/form-data' }, + }) + return unwrapData(res.data) +} + /** 轨迹服务默认配置编码 */ export const TRACK_SERVICE_CONFIG_CODE = 'track_service' diff --git a/src/components/top-nav/index.vue b/src/components/top-nav/index.vue index a684f25..9b7a509 100644 --- a/src/components/top-nav/index.vue +++ b/src/components/top-nav/index.vue @@ -3,7 +3,7 @@