import { _ as __nuxt_component_0 } from './HeaderImage-92nFA80c.mjs'; import { _ as __nuxt_component_1 } from './TabsHeader-C0yMA2hS.mjs'; import { _ as __nuxt_component_1$1 } from './CustomTitle-2eWUrzRV.mjs'; import { defineComponent, computed, withAsyncContext, mergeProps, isRef, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderAttr } from 'vue/server-renderer'; import { u as useRequest } from './useRequest-pSRZvR3u.mjs'; import { u as useRoute, n as navigateTo } from './server.mjs'; import { u as useAsyncData } from './asyncData-D5wEK86T.mjs'; import { u as useSeoMeta } from './composables-2BFBRDmB.mjs'; import './virtual_public-Ch4_18y6.mjs'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; 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 'unhead/server'; import 'devalue'; import 'unhead/plugins'; import 'unhead/utils'; import 'vue-router'; import 'axios'; import 'perfect-debounce'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "[id]", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const route = useRoute(); const request = useRequest(); const cateId = computed(() => String(route.params.id || "")); const { data: tabsRes } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData( "business-tabs", async () => await request.get("/api/project_cates") )), __temp = await __temp, __restore(), __temp); const tabList = computed(() => { const res = tabsRes.value; if (!res || res.code !== 200 || !Array.isArray(res.data)) return []; return res.data.map((item) => ({ id: String(item.id), name: item.title })); }); const activeTabModel = computed({ get: () => cateId.value, set: (val) => { const next = String(val || ""); if (!next || next === cateId.value) return; navigateTo(`/business/${next}`); } }); const { data: detailRes } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData( () => `business-detail-${cateId.value}`, async () => await request.get( `/api/project_cates/${cateId.value}` ), { watch: [cateId] } )), __temp = await __temp, __restore(), __temp); const currentTabInfoData = computed(() => { const res = detailRes.value; if (!res || res.code !== 200 || !res.data) return null; const d = res.data; return { name: d.title, description: d.description, dataList: (d.children || []).map((c) => ({ title: c.title, content: c.description || "", url: c.cover })), serviceProcess: d.flows?.cover || "", professionalEquipments: (d.photos || []).map((p) => p.cover), coreAdvantages: (d.advances || []).map((a) => ({ title: a.title, content: a.description || "", url: a.cover })) }; }); useSeoMeta({ title: () => currentTabInfoData.value?.name ? `${currentTabInfoData.value.name} - 业务范围` : "业务范围", description: () => { const first = currentTabInfoData.value?.dataList?.[0]?.content; return first ? first : "业务范围"; }, ogTitle: () => currentTabInfoData.value?.name ? `${currentTabInfoData.value.name} - 业务范围` : "业务范围", ogDescription: () => { const first = currentTabInfoData.value?.dataList?.[0]?.content; return first ? first : "业务范围"; }, ogImage: () => { const first = currentTabInfoData.value?.professionalEquipments?.[0] || currentTabInfoData.value?.serviceProcess || ""; return first || void 0; } }); return (_ctx, _push, _parent, _attrs) => { const _component_HeaderImage = __nuxt_component_0; const _component_TabsHeader = __nuxt_component_1; const _component_CustomTitle = __nuxt_component_1$1; _push(`
${ssrInterpolate(unref(currentTabInfoData)?.description || "")}
`); } else { _push(``); } _push(`${ssrInterpolate(data.content)}
${ssrInterpolate(coreAdvantage.content)}