- 将默认租户ID从10398更新为10586 - 更改网站名称为"行于思破产事务服务平台" - 替换首页为破产事务相关的新闻、公告和申报系统 - 更新头部导航栏和底部信息显示新的网站名称 - 修改应用布局背景为透明 - 更新PM2配置中的应用名称和端口设置 - 调整导航栏结构,增加搜索功能和品牌展示区域
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import { $fetch } from 'ofetch'
|
|
import { createError, defineEventHandler, getHeader, getQuery } from 'h3'
|
|
import { useRuntimeConfig } from '#imports'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const config = useRuntimeConfig()
|
|
const query = getQuery(event)
|
|
const modulesApiBase =
|
|
config.public.modulesApiBase || config.public.ApiBase || 'https://cms-api.websoft.top/api'
|
|
|
|
const tenantId =
|
|
getHeader(event, 'tenantid') ||
|
|
config.public.tenantId ||
|
|
config.public.TenantId ||
|
|
'10586'
|
|
const authorization = getHeader(event, 'authorization')
|
|
|
|
try {
|
|
return await $fetch('/cms/cms-website/getSiteInfo', {
|
|
baseURL: modulesApiBase,
|
|
headers: {
|
|
TenantId: String(tenantId),
|
|
...(authorization ? { Authorization: String(authorization) } : {})
|
|
},
|
|
query
|
|
})
|
|
} catch (error: any) {
|
|
throw createError({
|
|
statusCode: error?.statusCode || error?.response?.status || 502,
|
|
statusMessage: error?.statusMessage || 'Failed to fetch site info'
|
|
})
|
|
}
|
|
})
|