feat(api): 添加多路由代理处理实现
- 新增api目录下多个接口路径代理处理文件,支持动态拼接目标URL - 根据环境变量选择不同的后端服务地址(如dev和生产环境) - 统一添加TenantId和Authorization请求头传递租户及身份信息 - 实现请求参数及搜索参数的完整转发 - 引入better-sqlite3及node内建模块支持服务端功能 - 新增专家详情页面,实现文章、成果及预约咨询功能展示 - 页面实现加载骨架屏、标签页切换及空状态提示优化体验
This commit is contained in:
862
.output/server/chunks/build/_id_-BqOla5il.mjs
Normal file
862
.output/server/chunks/build/_id_-BqOla5il.mjs
Normal file
@@ -0,0 +1,862 @@
|
||||
import { a as _export_sfc, e as useRoute, d as useRouter, c as useHead, _ as __nuxt_component_0 } from './server.mjs';
|
||||
import { defineComponent, computed, ref, resolveComponent, mergeProps, withCtx, createTextVNode, createVNode, unref, createBlock, openBlock, toDisplayString, createCommentVNode, isRef, Fragment, renderList, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrInterpolate, ssrRenderList } from 'vue/server-renderer';
|
||||
import { message } from 'ant-design-vue';
|
||||
import '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
import 'better-sqlite3';
|
||||
import 'vue-router';
|
||||
import '@babel/runtime/helpers/esm/extends';
|
||||
import 'stylis';
|
||||
import 'dayjs';
|
||||
import '../routes/renderer.mjs';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'unhead/server';
|
||||
import 'devalue';
|
||||
import 'unhead/plugins';
|
||||
import 'unhead/utils';
|
||||
|
||||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
__name: "[id]",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
computed(() => route.params.id);
|
||||
const loading = ref(true);
|
||||
const activeTab = ref("intro");
|
||||
const expert = ref({});
|
||||
const expertArticles = ref([]);
|
||||
useHead({
|
||||
title: computed(() => `${expert.value?.name || "专家详情"} - 决策咨询网`)
|
||||
});
|
||||
function handleConsult() {
|
||||
message.info("请先联系我们预约咨询服务");
|
||||
}
|
||||
function goArticle(item) {
|
||||
router.push(`/article/${item.id}`);
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_a_breadcrumb = resolveComponent("a-breadcrumb");
|
||||
const _component_a_breadcrumb_item = resolveComponent("a-breadcrumb-item");
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
const _component_a_skeleton = resolveComponent("a-skeleton");
|
||||
const _component_a_row = resolveComponent("a-row");
|
||||
const _component_a_col = resolveComponent("a-col");
|
||||
const _component_a_button = resolveComponent("a-button");
|
||||
const _component_a_tabs = resolveComponent("a-tabs");
|
||||
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
||||
const _component_a_empty = resolveComponent("a-empty");
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "expert-detail-page" }, _attrs))} data-v-b2657184><div class="mx-auto max-w-screen-xl px-4 py-8" data-v-b2657184>`);
|
||||
_push(ssrRenderComponent(_component_a_breadcrumb, { class: "mb-6" }, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(ssrRenderComponent(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
||||
if (_push3) {
|
||||
_push3(ssrRenderComponent(_component_NuxtLink, { to: "/" }, {
|
||||
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
||||
if (_push4) {
|
||||
_push4(`首页`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode("首页")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent3, _scopeId2));
|
||||
} else {
|
||||
return [
|
||||
createVNode(_component_NuxtLink, { to: "/" }, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode("首页")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent2, _scopeId));
|
||||
_push2(ssrRenderComponent(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
||||
if (_push3) {
|
||||
_push3(ssrRenderComponent(_component_NuxtLink, { to: "/expert" }, {
|
||||
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
||||
if (_push4) {
|
||||
_push4(`专家资讯`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode("专家资讯")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent3, _scopeId2));
|
||||
} else {
|
||||
return [
|
||||
createVNode(_component_NuxtLink, { to: "/expert" }, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode("专家资讯")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent2, _scopeId));
|
||||
_push2(ssrRenderComponent(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
||||
if (_push3) {
|
||||
_push3(`专家详情`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode("专家详情")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent2, _scopeId));
|
||||
} else {
|
||||
return [
|
||||
createVNode(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_NuxtLink, { to: "/" }, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode("首页")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_NuxtLink, { to: "/expert" }, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode("专家资讯")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_breadcrumb_item, null, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode("专家详情")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
if (unref(loading)) {
|
||||
_push(`<div data-v-b2657184>`);
|
||||
_push(ssrRenderComponent(_component_a_skeleton, {
|
||||
active: "",
|
||||
avatar: "",
|
||||
paragraph: { rows: 6 }
|
||||
}, null, _parent));
|
||||
_push(`</div>`);
|
||||
} else {
|
||||
_push(`<div data-v-b2657184>`);
|
||||
_push(ssrRenderComponent(_component_a_row, { gutter: [32, 24] }, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(ssrRenderComponent(_component_a_col, {
|
||||
xs: 24,
|
||||
lg: 7
|
||||
}, {
|
||||
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
||||
if (_push3) {
|
||||
_push3(`<div class="expert-card" data-v-b2657184${_scopeId2}><div class="expert-avatar-wrapper" data-v-b2657184${_scopeId2}>`);
|
||||
if (unref(expert).avatar) {
|
||||
_push3(`<img${ssrRenderAttr("src", unref(expert).avatar)}${ssrRenderAttr("alt", unref(expert).name)} class="expert-avatar" data-v-b2657184${_scopeId2}>`);
|
||||
} else {
|
||||
_push3(`<div class="expert-avatar-placeholder" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).name?.charAt(0))}</div>`);
|
||||
}
|
||||
_push3(`</div><h2 class="expert-name" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).name)}</h2><div class="expert-title-tag" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).title)}</div><div class="expert-org" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).organization)}</div><div class="expert-info-list" data-v-b2657184${_scopeId2}>`);
|
||||
if (unref(expert).researchArea) {
|
||||
_push3(`<div class="info-item" data-v-b2657184${_scopeId2}><span class="info-label" data-v-b2657184${_scopeId2}>研究领域</span><span class="info-value" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).researchArea)}</span></div>`);
|
||||
} else {
|
||||
_push3(`<!---->`);
|
||||
}
|
||||
if (unref(expert).education) {
|
||||
_push3(`<div class="info-item" data-v-b2657184${_scopeId2}><span class="info-label" data-v-b2657184${_scopeId2}>学历</span><span class="info-value" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).education)}</span></div>`);
|
||||
} else {
|
||||
_push3(`<!---->`);
|
||||
}
|
||||
if (unref(expert).joinTime) {
|
||||
_push3(`<div class="info-item" data-v-b2657184${_scopeId2}><span class="info-label" data-v-b2657184${_scopeId2}>入库时间</span><span class="info-value" data-v-b2657184${_scopeId2}>${ssrInterpolate(unref(expert).joinTime)}</span></div>`);
|
||||
} else {
|
||||
_push3(`<!---->`);
|
||||
}
|
||||
_push3(`</div>`);
|
||||
_push3(ssrRenderComponent(_component_a_button, {
|
||||
type: "primary",
|
||||
block: "",
|
||||
size: "large",
|
||||
class: "mt-4",
|
||||
onClick: handleConsult
|
||||
}, {
|
||||
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
||||
if (_push4) {
|
||||
_push4(` 预约咨询 `);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(" 预约咨询 ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent3, _scopeId2));
|
||||
_push3(`</div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "expert-card" }, [
|
||||
createVNode("div", { class: "expert-avatar-wrapper" }, [
|
||||
unref(expert).avatar ? (openBlock(), createBlock("img", {
|
||||
key: 0,
|
||||
src: unref(expert).avatar,
|
||||
alt: unref(expert).name,
|
||||
class: "expert-avatar"
|
||||
}, null, 8, ["src", "alt"])) : (openBlock(), createBlock("div", {
|
||||
key: 1,
|
||||
class: "expert-avatar-placeholder"
|
||||
}, toDisplayString(unref(expert).name?.charAt(0)), 1))
|
||||
]),
|
||||
createVNode("h2", { class: "expert-name" }, toDisplayString(unref(expert).name), 1),
|
||||
createVNode("div", { class: "expert-title-tag" }, toDisplayString(unref(expert).title), 1),
|
||||
createVNode("div", { class: "expert-org" }, toDisplayString(unref(expert).organization), 1),
|
||||
createVNode("div", { class: "expert-info-list" }, [
|
||||
unref(expert).researchArea ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "研究领域"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).researchArea), 1)
|
||||
])) : createCommentVNode("", true),
|
||||
unref(expert).education ? (openBlock(), createBlock("div", {
|
||||
key: 1,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "学历"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).education), 1)
|
||||
])) : createCommentVNode("", true),
|
||||
unref(expert).joinTime ? (openBlock(), createBlock("div", {
|
||||
key: 2,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "入库时间"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).joinTime), 1)
|
||||
])) : createCommentVNode("", true)
|
||||
]),
|
||||
createVNode(_component_a_button, {
|
||||
type: "primary",
|
||||
block: "",
|
||||
size: "large",
|
||||
class: "mt-4",
|
||||
onClick: handleConsult
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode(" 预约咨询 ")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent2, _scopeId));
|
||||
_push2(ssrRenderComponent(_component_a_col, {
|
||||
xs: 24,
|
||||
lg: 17
|
||||
}, {
|
||||
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
||||
if (_push3) {
|
||||
_push3(`<div class="expert-content-card" data-v-b2657184${_scopeId2}>`);
|
||||
_push3(ssrRenderComponent(_component_a_tabs, {
|
||||
activeKey: unref(activeTab),
|
||||
"onUpdate:activeKey": ($event) => isRef(activeTab) ? activeTab.value = $event : null
|
||||
}, {
|
||||
default: withCtx((_3, _push4, _parent4, _scopeId3) => {
|
||||
if (_push4) {
|
||||
_push4(ssrRenderComponent(_component_a_tab_pane, {
|
||||
key: "intro",
|
||||
tab: "专家简介"
|
||||
}, {
|
||||
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
||||
if (_push5) {
|
||||
_push5(`<div class="tab-content" data-v-b2657184${_scopeId4}><h3 class="section-title" data-v-b2657184${_scopeId4}>个人简介</h3><p class="intro-text" data-v-b2657184${_scopeId4}>${ssrInterpolate(unref(expert).introduction || "暂无简介")}</p><h3 class="section-title mt-6" data-v-b2657184${_scopeId4}>主要成就</h3><ul class="achievement-list" data-v-b2657184${_scopeId4}><!--[-->`);
|
||||
ssrRenderList(unref(expert).achievements, (item, idx) => {
|
||||
_push5(`<li data-v-b2657184${_scopeId4}>${ssrInterpolate(item)}</li>`);
|
||||
});
|
||||
_push5(`<!--]--></ul><h3 class="section-title mt-6" data-v-b2657184${_scopeId4}>荣誉奖项</h3><div class="honors-grid" data-v-b2657184${_scopeId4}><!--[-->`);
|
||||
ssrRenderList(unref(expert).honors, (honor, idx) => {
|
||||
_push5(`<div class="honor-item" data-v-b2657184${_scopeId4}><span class="honor-icon" data-v-b2657184${_scopeId4}>🏆</span><span data-v-b2657184${_scopeId4}>${ssrInterpolate(honor)}</span></div>`);
|
||||
});
|
||||
_push5(`<!--]--></div></div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
createVNode("h3", { class: "section-title" }, "个人简介"),
|
||||
createVNode("p", { class: "intro-text" }, toDisplayString(unref(expert).introduction || "暂无简介"), 1),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "主要成就"),
|
||||
createVNode("ul", { class: "achievement-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).achievements, (item, idx) => {
|
||||
return openBlock(), createBlock("li", { key: idx }, toDisplayString(item), 1);
|
||||
}), 128))
|
||||
]),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "荣誉奖项"),
|
||||
createVNode("div", { class: "honors-grid" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).honors, (honor, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "honor-item"
|
||||
}, [
|
||||
createVNode("span", { class: "honor-icon" }, "🏆"),
|
||||
createVNode("span", null, toDisplayString(honor), 1)
|
||||
]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent4, _scopeId3));
|
||||
_push4(ssrRenderComponent(_component_a_tab_pane, {
|
||||
key: "articles",
|
||||
tab: "专家文章"
|
||||
}, {
|
||||
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
||||
if (_push5) {
|
||||
_push5(`<div class="tab-content" data-v-b2657184${_scopeId4}>`);
|
||||
if (unref(expertArticles).length === 0) {
|
||||
_push5(`<div class="empty-state" data-v-b2657184${_scopeId4}>`);
|
||||
_push5(ssrRenderComponent(_component_a_empty, { description: "暂无文章" }, null, _parent5, _scopeId4));
|
||||
_push5(`</div>`);
|
||||
} else {
|
||||
_push5(`<!---->`);
|
||||
}
|
||||
_push5(`<div class="article-list" data-v-b2657184${_scopeId4}><!--[-->`);
|
||||
ssrRenderList(unref(expertArticles), (item) => {
|
||||
_push5(`<div class="article-item" data-v-b2657184${_scopeId4}>`);
|
||||
if (item.image) {
|
||||
_push5(`<div class="article-thumb" data-v-b2657184${_scopeId4}><img${ssrRenderAttr("src", item.image)}${ssrRenderAttr("alt", item.title)} data-v-b2657184${_scopeId4}></div>`);
|
||||
} else {
|
||||
_push5(`<!---->`);
|
||||
}
|
||||
_push5(`<div class="article-info" data-v-b2657184${_scopeId4}><h4 class="article-title" data-v-b2657184${_scopeId4}>${ssrInterpolate(item.title)}</h4><p class="article-overview" data-v-b2657184${_scopeId4}>${ssrInterpolate(item.overview)}</p><span class="article-date" data-v-b2657184${_scopeId4}>${ssrInterpolate(item.date)}</span></div></div>`);
|
||||
});
|
||||
_push5(`<!--]--></div></div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expertArticles).length === 0 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "empty-state"
|
||||
}, [
|
||||
createVNode(_component_a_empty, { description: "暂无文章" })
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expertArticles), (item) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: item.id,
|
||||
class: "article-item",
|
||||
onClick: ($event) => goArticle(item)
|
||||
}, [
|
||||
item.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "article-thumb"
|
||||
}, [
|
||||
createVNode("img", {
|
||||
src: item.image,
|
||||
alt: item.title
|
||||
}, null, 8, ["src", "alt"])
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-info" }, [
|
||||
createVNode("h4", { class: "article-title" }, toDisplayString(item.title), 1),
|
||||
createVNode("p", { class: "article-overview" }, toDisplayString(item.overview), 1),
|
||||
createVNode("span", { class: "article-date" }, toDisplayString(item.date), 1)
|
||||
])
|
||||
], 8, ["onClick"]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent4, _scopeId3));
|
||||
_push4(ssrRenderComponent(_component_a_tab_pane, {
|
||||
key: "research",
|
||||
tab: "研究成果"
|
||||
}, {
|
||||
default: withCtx((_4, _push5, _parent5, _scopeId4) => {
|
||||
if (_push5) {
|
||||
_push5(`<div class="tab-content" data-v-b2657184${_scopeId4}>`);
|
||||
if (unref(expert).researchResults && unref(expert).researchResults.length) {
|
||||
_push5(`<div data-v-b2657184${_scopeId4}><!--[-->`);
|
||||
ssrRenderList(unref(expert).researchResults, (result, idx) => {
|
||||
_push5(`<div class="research-item" data-v-b2657184${_scopeId4}><span class="research-year" data-v-b2657184${_scopeId4}>${ssrInterpolate(result.year)}</span><div class="research-content" data-v-b2657184${_scopeId4}><h4 data-v-b2657184${_scopeId4}>${ssrInterpolate(result.title)}</h4><p data-v-b2657184${_scopeId4}>${ssrInterpolate(result.description)}</p></div></div>`);
|
||||
});
|
||||
_push5(`<!--]--></div>`);
|
||||
} else {
|
||||
_push5(ssrRenderComponent(_component_a_empty, { description: "暂无研究成果" }, null, _parent5, _scopeId4));
|
||||
}
|
||||
_push5(`</div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expert).researchResults && unref(expert).researchResults.length ? (openBlock(), createBlock("div", { key: 0 }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).researchResults, (result, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "research-item"
|
||||
}, [
|
||||
createVNode("span", { class: "research-year" }, toDisplayString(result.year), 1),
|
||||
createVNode("div", { class: "research-content" }, [
|
||||
createVNode("h4", null, toDisplayString(result.title), 1),
|
||||
createVNode("p", null, toDisplayString(result.description), 1)
|
||||
])
|
||||
]);
|
||||
}), 128))
|
||||
])) : (openBlock(), createBlock(_component_a_empty, {
|
||||
key: 1,
|
||||
description: "暂无研究成果"
|
||||
}))
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent4, _scopeId3));
|
||||
} else {
|
||||
return [
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "intro",
|
||||
tab: "专家简介"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
createVNode("h3", { class: "section-title" }, "个人简介"),
|
||||
createVNode("p", { class: "intro-text" }, toDisplayString(unref(expert).introduction || "暂无简介"), 1),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "主要成就"),
|
||||
createVNode("ul", { class: "achievement-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).achievements, (item, idx) => {
|
||||
return openBlock(), createBlock("li", { key: idx }, toDisplayString(item), 1);
|
||||
}), 128))
|
||||
]),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "荣誉奖项"),
|
||||
createVNode("div", { class: "honors-grid" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).honors, (honor, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "honor-item"
|
||||
}, [
|
||||
createVNode("span", { class: "honor-icon" }, "🏆"),
|
||||
createVNode("span", null, toDisplayString(honor), 1)
|
||||
]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "articles",
|
||||
tab: "专家文章"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expertArticles).length === 0 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "empty-state"
|
||||
}, [
|
||||
createVNode(_component_a_empty, { description: "暂无文章" })
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expertArticles), (item) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: item.id,
|
||||
class: "article-item",
|
||||
onClick: ($event) => goArticle(item)
|
||||
}, [
|
||||
item.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "article-thumb"
|
||||
}, [
|
||||
createVNode("img", {
|
||||
src: item.image,
|
||||
alt: item.title
|
||||
}, null, 8, ["src", "alt"])
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-info" }, [
|
||||
createVNode("h4", { class: "article-title" }, toDisplayString(item.title), 1),
|
||||
createVNode("p", { class: "article-overview" }, toDisplayString(item.overview), 1),
|
||||
createVNode("span", { class: "article-date" }, toDisplayString(item.date), 1)
|
||||
])
|
||||
], 8, ["onClick"]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "research",
|
||||
tab: "研究成果"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expert).researchResults && unref(expert).researchResults.length ? (openBlock(), createBlock("div", { key: 0 }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).researchResults, (result, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "research-item"
|
||||
}, [
|
||||
createVNode("span", { class: "research-year" }, toDisplayString(result.year), 1),
|
||||
createVNode("div", { class: "research-content" }, [
|
||||
createVNode("h4", null, toDisplayString(result.title), 1),
|
||||
createVNode("p", null, toDisplayString(result.description), 1)
|
||||
])
|
||||
]);
|
||||
}), 128))
|
||||
])) : (openBlock(), createBlock(_component_a_empty, {
|
||||
key: 1,
|
||||
description: "暂无研究成果"
|
||||
}))
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent3, _scopeId2));
|
||||
_push3(`</div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "expert-content-card" }, [
|
||||
createVNode(_component_a_tabs, {
|
||||
activeKey: unref(activeTab),
|
||||
"onUpdate:activeKey": ($event) => isRef(activeTab) ? activeTab.value = $event : null
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "intro",
|
||||
tab: "专家简介"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
createVNode("h3", { class: "section-title" }, "个人简介"),
|
||||
createVNode("p", { class: "intro-text" }, toDisplayString(unref(expert).introduction || "暂无简介"), 1),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "主要成就"),
|
||||
createVNode("ul", { class: "achievement-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).achievements, (item, idx) => {
|
||||
return openBlock(), createBlock("li", { key: idx }, toDisplayString(item), 1);
|
||||
}), 128))
|
||||
]),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "荣誉奖项"),
|
||||
createVNode("div", { class: "honors-grid" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).honors, (honor, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "honor-item"
|
||||
}, [
|
||||
createVNode("span", { class: "honor-icon" }, "🏆"),
|
||||
createVNode("span", null, toDisplayString(honor), 1)
|
||||
]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "articles",
|
||||
tab: "专家文章"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expertArticles).length === 0 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "empty-state"
|
||||
}, [
|
||||
createVNode(_component_a_empty, { description: "暂无文章" })
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expertArticles), (item) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: item.id,
|
||||
class: "article-item",
|
||||
onClick: ($event) => goArticle(item)
|
||||
}, [
|
||||
item.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "article-thumb"
|
||||
}, [
|
||||
createVNode("img", {
|
||||
src: item.image,
|
||||
alt: item.title
|
||||
}, null, 8, ["src", "alt"])
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-info" }, [
|
||||
createVNode("h4", { class: "article-title" }, toDisplayString(item.title), 1),
|
||||
createVNode("p", { class: "article-overview" }, toDisplayString(item.overview), 1),
|
||||
createVNode("span", { class: "article-date" }, toDisplayString(item.date), 1)
|
||||
])
|
||||
], 8, ["onClick"]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "research",
|
||||
tab: "研究成果"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expert).researchResults && unref(expert).researchResults.length ? (openBlock(), createBlock("div", { key: 0 }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).researchResults, (result, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "research-item"
|
||||
}, [
|
||||
createVNode("span", { class: "research-year" }, toDisplayString(result.year), 1),
|
||||
createVNode("div", { class: "research-content" }, [
|
||||
createVNode("h4", null, toDisplayString(result.title), 1),
|
||||
createVNode("p", null, toDisplayString(result.description), 1)
|
||||
])
|
||||
]);
|
||||
}), 128))
|
||||
])) : (openBlock(), createBlock(_component_a_empty, {
|
||||
key: 1,
|
||||
description: "暂无研究成果"
|
||||
}))
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["activeKey", "onUpdate:activeKey"])
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent2, _scopeId));
|
||||
} else {
|
||||
return [
|
||||
createVNode(_component_a_col, {
|
||||
xs: 24,
|
||||
lg: 7
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "expert-card" }, [
|
||||
createVNode("div", { class: "expert-avatar-wrapper" }, [
|
||||
unref(expert).avatar ? (openBlock(), createBlock("img", {
|
||||
key: 0,
|
||||
src: unref(expert).avatar,
|
||||
alt: unref(expert).name,
|
||||
class: "expert-avatar"
|
||||
}, null, 8, ["src", "alt"])) : (openBlock(), createBlock("div", {
|
||||
key: 1,
|
||||
class: "expert-avatar-placeholder"
|
||||
}, toDisplayString(unref(expert).name?.charAt(0)), 1))
|
||||
]),
|
||||
createVNode("h2", { class: "expert-name" }, toDisplayString(unref(expert).name), 1),
|
||||
createVNode("div", { class: "expert-title-tag" }, toDisplayString(unref(expert).title), 1),
|
||||
createVNode("div", { class: "expert-org" }, toDisplayString(unref(expert).organization), 1),
|
||||
createVNode("div", { class: "expert-info-list" }, [
|
||||
unref(expert).researchArea ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "研究领域"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).researchArea), 1)
|
||||
])) : createCommentVNode("", true),
|
||||
unref(expert).education ? (openBlock(), createBlock("div", {
|
||||
key: 1,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "学历"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).education), 1)
|
||||
])) : createCommentVNode("", true),
|
||||
unref(expert).joinTime ? (openBlock(), createBlock("div", {
|
||||
key: 2,
|
||||
class: "info-item"
|
||||
}, [
|
||||
createVNode("span", { class: "info-label" }, "入库时间"),
|
||||
createVNode("span", { class: "info-value" }, toDisplayString(unref(expert).joinTime), 1)
|
||||
])) : createCommentVNode("", true)
|
||||
]),
|
||||
createVNode(_component_a_button, {
|
||||
type: "primary",
|
||||
block: "",
|
||||
size: "large",
|
||||
class: "mt-4",
|
||||
onClick: handleConsult
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createTextVNode(" 预约咨询 ")
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_col, {
|
||||
xs: 24,
|
||||
lg: 17
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "expert-content-card" }, [
|
||||
createVNode(_component_a_tabs, {
|
||||
activeKey: unref(activeTab),
|
||||
"onUpdate:activeKey": ($event) => isRef(activeTab) ? activeTab.value = $event : null
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "intro",
|
||||
tab: "专家简介"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
createVNode("h3", { class: "section-title" }, "个人简介"),
|
||||
createVNode("p", { class: "intro-text" }, toDisplayString(unref(expert).introduction || "暂无简介"), 1),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "主要成就"),
|
||||
createVNode("ul", { class: "achievement-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).achievements, (item, idx) => {
|
||||
return openBlock(), createBlock("li", { key: idx }, toDisplayString(item), 1);
|
||||
}), 128))
|
||||
]),
|
||||
createVNode("h3", { class: "section-title mt-6" }, "荣誉奖项"),
|
||||
createVNode("div", { class: "honors-grid" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).honors, (honor, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "honor-item"
|
||||
}, [
|
||||
createVNode("span", { class: "honor-icon" }, "🏆"),
|
||||
createVNode("span", null, toDisplayString(honor), 1)
|
||||
]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "articles",
|
||||
tab: "专家文章"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expertArticles).length === 0 ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "empty-state"
|
||||
}, [
|
||||
createVNode(_component_a_empty, { description: "暂无文章" })
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-list" }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expertArticles), (item) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: item.id,
|
||||
class: "article-item",
|
||||
onClick: ($event) => goArticle(item)
|
||||
}, [
|
||||
item.image ? (openBlock(), createBlock("div", {
|
||||
key: 0,
|
||||
class: "article-thumb"
|
||||
}, [
|
||||
createVNode("img", {
|
||||
src: item.image,
|
||||
alt: item.title
|
||||
}, null, 8, ["src", "alt"])
|
||||
])) : createCommentVNode("", true),
|
||||
createVNode("div", { class: "article-info" }, [
|
||||
createVNode("h4", { class: "article-title" }, toDisplayString(item.title), 1),
|
||||
createVNode("p", { class: "article-overview" }, toDisplayString(item.overview), 1),
|
||||
createVNode("span", { class: "article-date" }, toDisplayString(item.date), 1)
|
||||
])
|
||||
], 8, ["onClick"]);
|
||||
}), 128))
|
||||
])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_a_tab_pane, {
|
||||
key: "research",
|
||||
tab: "研究成果"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode("div", { class: "tab-content" }, [
|
||||
unref(expert).researchResults && unref(expert).researchResults.length ? (openBlock(), createBlock("div", { key: 0 }, [
|
||||
(openBlock(true), createBlock(Fragment, null, renderList(unref(expert).researchResults, (result, idx) => {
|
||||
return openBlock(), createBlock("div", {
|
||||
key: idx,
|
||||
class: "research-item"
|
||||
}, [
|
||||
createVNode("span", { class: "research-year" }, toDisplayString(result.year), 1),
|
||||
createVNode("div", { class: "research-content" }, [
|
||||
createVNode("h4", null, toDisplayString(result.title), 1),
|
||||
createVNode("p", null, toDisplayString(result.description), 1)
|
||||
])
|
||||
]);
|
||||
}), 128))
|
||||
])) : (openBlock(), createBlock(_component_a_empty, {
|
||||
key: 1,
|
||||
description: "暂无研究成果"
|
||||
}))
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["activeKey", "onUpdate:activeKey"])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div>`);
|
||||
}
|
||||
_push(`</div></div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
const _sfc_setup = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/expert/[id].vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
const _id_ = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b2657184"]]);
|
||||
|
||||
export { _id_ as default };
|
||||
//# sourceMappingURL=_id_-BqOla5il.mjs.map
|
||||
Reference in New Issue
Block a user