feat(api): 添加多路由代理处理实现
- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL - 根据环境变量选择不同的后端服务地址(如dev和生产环境) - 统一添加TenantId和Authorization请求头传递租户及身份信息 - 实现请求参数及搜索参数的完整转发 - 引入better-sqlite3及node内建模块支持服务端功能 - 新增专家详情页面,实现文章、成果及预约咨询功能展示 - 页面实现加载骨架屏、标签页切换及空状态提示优化体验
This commit is contained in:
36
.output/server/chunks/build/usePageSeo-0Fjg7K52.mjs
Normal file
36
.output/server/chunks/build/usePageSeo-0Fjg7K52.mjs
Normal file
@@ -0,0 +1,36 @@
|
||||
import { b as useSeoMeta, c as useHead, u as useRequestEvent } from './server.mjs';
|
||||
import { b as getRequestURL } from '../nitro/nitro.mjs';
|
||||
|
||||
function useRequestURL(opts) {
|
||||
{
|
||||
return getRequestURL(useRequestEvent(), opts);
|
||||
}
|
||||
}
|
||||
function getSiteOrigin() {
|
||||
try {
|
||||
return useRequestURL().origin;
|
||||
} catch {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
function usePageSeo(input) {
|
||||
const origin = getSiteOrigin();
|
||||
const url = input.path && origin ? new URL(input.path, origin).toString() : void 0;
|
||||
useSeoMeta({
|
||||
title: input.title,
|
||||
description: input.description,
|
||||
ogTitle: input.title,
|
||||
ogDescription: input.description,
|
||||
ogType: "website",
|
||||
...url ? { ogUrl: url } : {},
|
||||
twitterCard: "summary_large_image"
|
||||
});
|
||||
if (url) {
|
||||
useHead({
|
||||
link: [{ rel: "canonical", href: url }]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { usePageSeo as u };
|
||||
//# sourceMappingURL=usePageSeo-0Fjg7K52.mjs.map
|
||||
Reference in New Issue
Block a user