Files
console-dev/app/pages/official-site.vue
T

1093 lines
50 KiB
Vue

<script>
/**
* 官网内容页:从公共站点内容模型读取主题、版块顺序、产品及卖点;使用 official-site 布局,主题值与外链展示通过公共工具约束。
*/
definePageMeta({
layout: `official-site`,
});
import { toDisplayString } from "vue";
import { renderList } from "vue";
import { onMounted } from "vue";
import { createStaticVNode } from "vue";
import { createBlock } from "vue";
import { withCtx } from "vue";
import { createCommentVNode } from "vue";
import { computed } from "vue";
import { createElementBlock } from "vue";
import { Fragment } from "vue";
import { createElementVNode } from "vue";
import { createTextVNode } from "vue";
import { unref } from "vue";
import { defineComponent } from "vue";
import { createVNode } from "vue";
import { openBlock } from "vue";
import { normalizeStyle } from "vue";
import { useHead } from "#app";
import { NuxtLink } from "#components";
import { Icon } from "#components";
import { i as useOfficialSiteContent_i } from "~/lib/useOfficialSiteContent.js";
import { n as useOfficialSiteContent_n } from "~/lib/useOfficialSiteContent.js";
import { r as useOfficialSiteContent_r } from "~/lib/useOfficialSiteContent.js";
import { t as useOfficialSiteContent_t } from "~/lib/useOfficialSiteContent.js";
import { t as composables_t } from "~/lib/composables-2.js";
var x = {
class: `official-hero`,
"aria-labelledby": `official-hero-title`,
},
S = {
class: `official-hero-top`,
},
C = {
class: `official-hero-heading`,
},
w = {
class: `official-eyebrow`,
},
T = {
id: `official-hero-title`,
},
E = {
class: `official-hero-intro`,
},
D = {
key: 0,
class: `official-hero-features`,
},
O = {
class: `official-hero-actions`,
},
k = [`href`],
A = {
class: `official-hero-visual`,
},
j = {
class: `official-art-caption`,
},
M = {
class: `official-hero-stat home-card`,
},
N = {
class: `official-stat-kicker`,
},
P = {
class: `official-stat-value`,
},
F = {
class: `official-floating-label`,
},
I = {
key: 0,
id: `products`,
class: `official-section official-products`,
},
L = {
class: `official-section-head`,
},
R = {
class: `official-section-eyebrow`,
},
z = {
class: `official-section-badges`,
},
B = {
class: `official-product-grid`,
},
V = {
class: `official-product-icon`,
},
H = {
key: 1,
class: `pi pi-box`,
"aria-hidden": `true`,
},
U = {
class: `official-product-title-row`,
},
W = {
class: `official-product-description`,
},
G = {
class: `official-product-price`,
},
K = {
class: `official-product-features`,
},
q = {
key: 0,
class: `home-card official-empty-card`,
},
ie = {
key: 1,
id: `infrastructure`,
class: `official-section official-infrastructure`,
},
J = {
class: `official-infra-panel home-card`,
},
Y = {
class: `official-infra-copy`,
},
ae = {
class: `official-section-eyebrow`,
},
oe = {
class: `official-infra-stats`,
},
se = {
class: `official-infra-visual`,
},
ce = {
class: `official-infra-card home-card`,
},
le = {
class: `official-infra-card-kicker`,
},
ue = {
class: `official-resource-track`,
},
de = {
key: 2,
id: `reviews`,
class: `official-section official-reviews`,
},
fe = {
class: `official-section-head official-reviews-head`,
},
pe = {
class: `official-section-eyebrow`,
},
me = {
class: `official-review-grid`,
},
he = {
class: `official-review-person`,
},
ge = [`src`, `alt`],
_e = {
key: 1,
class: `official-review-avatar`,
},
ve = {
key: 3,
id: `contact`,
class: `official-section official-contact-section`,
},
ye = {
class: `official-contact-panel home-card`,
},
be = {
class: `official-section-eyebrow`,
},
xe = {
class: `official-contact-actions`,
},
X = defineComponent({
__name: `official-site`,
setup(f) {
composables_t({
layout: `official-site`,
});
let { content: X, load: Se } = useOfficialSiteContent_t(),
Z = computed(() =>
useOfficialSiteContent_n(X.value.theme.primary, `#0052d9`),
),
Ce = computed(() =>
useOfficialSiteContent_n(X.value.theme.accent, `#eff6ff`),
),
we = computed(() => ({
"--official-primary": Z.value,
"--official-accent": Ce.value,
})),
Te = computed(() => [...new Set(X.value.sectionOrder)]),
Q = computed(() =>
X.value.products.items.filter((e) => e.is_show !== !1),
),
$ = computed(() =>
X.value.hero.features.filter((e) => e.is_show !== !1),
);
return (
useHead(() => ({
title: X.value.meta.title,
meta: [
{
name: `description`,
content: X.value.meta.description,
},
],
})),
onMounted(() => Se()),
// 按配置中的 sectionOrder 渲染官网版块,隐藏条目不显示,富文本/外链使用公共内容工具处理。
(n, o) => {
let f = NuxtLink,
g = Icon;
return (
openBlock(),
createElementBlock(
`div`,
{
class: `official-page`,
style: normalizeStyle(unref(we)),
},
[
createElementVNode(`section`, x, [
createElementVNode(`div`, S, [
createElementVNode(`div`, C, [
createElementVNode(`span`, w, [
(o[0] ||= createElementVNode(`span`, null, null, -1)),
createTextVNode(toDisplayString(unref(X).hero.tag), 1),
]),
createElementVNode(
`h1`,
T,
toDisplayString(unref(X).hero.title),
1,
),
createElementVNode(
`h2`,
null,
toDisplayString(unref(X).hero.subtitle),
1,
),
]),
createElementVNode(`div`, E, [
createElementVNode(
`p`,
null,
toDisplayString(unref(X).hero.description),
1,
),
unref($).length
? (openBlock(),
createElementBlock(`div`, D, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref($),
(t) => (
openBlock(),
createElementBlock(
`span`,
{
key: t.text,
},
[
(o[1] ||= createElementVNode(
`i`,
{
class: `pi pi-check`,
"aria-hidden": `true`,
},
null,
-1,
)),
createTextVNode(
toDisplayString(t.text),
1,
),
],
)
),
),
128,
)),
]))
: createCommentVNode(``, !0),
createElementVNode(`div`, O, [
createVNode(
f,
{
class: `official-button primary`,
to: unref(useOfficialSiteContent_r)(
unref(X).hero.buttonHref,
),
},
{
default: withCtx(() => [
createTextVNode(
toDisplayString(unref(X).hero.buttonLabel) +
` `,
1,
),
(o[2] ||= createElementVNode(
`i`,
{
class: `pi pi-arrow-right`,
"aria-hidden": `true`,
},
null,
-1,
)),
]),
_: 1,
},
8,
[`to`],
),
createElementVNode(
`a`,
{
class: `official-button secondary`,
href: unref(useOfficialSiteContent_r)(
unref(X).hero.secondaryHref,
),
},
toDisplayString(unref(X).hero.secondaryLabel),
9,
k,
),
]),
]),
]),
createElementVNode(`div`, A, [
(o[5] ||= createStaticVNode(
`<div class="official-visual-grid" aria-hidden="true"></div><div class="official-visual-orbit orbit-one" aria-hidden="true"></div><div class="official-visual-orbit orbit-two" aria-hidden="true"></div><div class="official-visual-network" aria-hidden="true"><span class="network-line line-one"></span><span class="network-line line-two"></span><span class="network-node node-one"></span><span class="network-node node-two"></span><span class="network-node node-three"></span><span class="network-node node-four"></span></div>`,
4,
)),
createElementVNode(`div`, j, [
(o[3] ||= createElementVNode(
`span`,
{
class: `official-art-pulse`,
},
null,
-1,
)),
createTextVNode(
toDisplayString(unref(X).hero.artCaption),
1,
),
]),
createElementVNode(`div`, M, [
createElementVNode(
`span`,
N,
toDisplayString(unref(X).hero.metric.title),
1,
),
createElementVNode(`div`, P, [
createTextVNode(
toDisplayString(unref(X).hero.metric.value),
1,
),
createElementVNode(
`small`,
null,
toDisplayString(unref(X).hero.metric.unit),
1,
),
]),
createElementVNode(
`strong`,
null,
toDisplayString(unref(X).hero.metric.label),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(unref(X).hero.metric.description),
1,
),
]),
createElementVNode(`div`, F, [
(o[4] ||= createElementVNode(
`i`,
{
class: `pi pi-sparkles`,
"aria-hidden": `true`,
},
null,
-1,
)),
createTextVNode(
toDisplayString(unref(X).hero.floatingText),
1,
),
]),
]),
]),
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(Te),
(n) => (
openBlock(),
createElementBlock(
Fragment,
{
key: n,
},
[
n === `products` && unref(X).products.is_show
? (openBlock(),
createElementBlock(`section`, I, [
createElementVNode(`div`, L, [
createElementVNode(`div`, null, [
createElementVNode(
`span`,
R,
toDisplayString(
unref(X).products.eyebrow,
),
1,
),
createElementVNode(
`h2`,
null,
toDisplayString(unref(X).products.title),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(
unref(X).products.description,
),
1,
),
]),
createElementVNode(`div`, z, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(X).products.badges.filter(
(e) => e.is_show !== !1,
),
(t) => (
openBlock(),
createElementBlock(
`span`,
{
key: t.label,
},
[
(o[6] ||= createElementVNode(
`i`,
{
class: `pi pi-check`,
"aria-hidden": `true`,
},
null,
-1,
)),
createTextVNode(
toDisplayString(t.label),
1,
),
],
)
),
),
128,
)),
]),
]),
createElementVNode(`div`, B, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(Q),
(n, r) => (
openBlock(),
createElementBlock(
`article`,
{
key: n.title + n.subtitle,
class: `home-card official-product-card`,
style: normalizeStyle({
"--card-index": r,
}),
},
[
createElementVNode(`div`, V, [
n.icon
? (openBlock(),
createBlock(
g,
{
key: 0,
name: n.icon,
},
null,
8,
[`name`],
))
: (openBlock(),
createElementBlock(`i`, H)),
]),
createElementVNode(`div`, U, [
createElementVNode(`div`, null, [
createElementVNode(
`h3`,
null,
toDisplayString(n.title),
1,
),
createElementVNode(
`span`,
null,
toDisplayString(n.subtitle),
1,
),
]),
(o[7] ||= createElementVNode(
`i`,
{
class: `pi pi-arrow-up-right`,
"aria-hidden": `true`,
},
null,
-1,
)),
]),
createElementVNode(
`p`,
W,
toDisplayString(n.description),
1,
),
createElementVNode(`div`, G, [
createTextVNode(
toDisplayString(n.price),
1,
),
createElementVNode(
`small`,
null,
toDisplayString(n.period),
1,
),
]),
createElementVNode(`ul`, K, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
n.features.filter(
(e) => e.is_show !== !1,
),
(t) => (
openBlock(),
createElementBlock(
`li`,
{
key: t.label,
},
[
createElementVNode(
`span`,
null,
toDisplayString(
t.label,
),
1,
),
(o[8] ||=
createElementVNode(
`i`,
{
class: `pi pi-check`,
"aria-hidden": `true`,
},
null,
-1,
)),
],
)
),
),
128,
)),
]),
createVNode(
f,
{
class: `official-product-link`,
to: unref(
useOfficialSiteContent_r,
)(n.href),
},
{
default: withCtx(() => [
createTextVNode(
toDisplayString(
n.buttonLabel,
),
1,
),
(o[9] ||= createElementVNode(
`i`,
{
class: `pi pi-arrow-right`,
"aria-hidden": `true`,
},
null,
-1,
)),
]),
_: 2,
},
1032,
[`to`],
),
],
4,
)
),
),
128,
)),
unref(Q).length
? createCommentVNode(``, !0)
: (openBlock(),
createElementBlock(`div`, q, [
...(o[10] ||= [
createElementVNode(
`i`,
{
class: `pi pi-box`,
"aria-hidden": `true`,
},
null,
-1,
),
createElementVNode(
`span`,
null,
`产品方案正在整理中`,
-1,
),
]),
])),
]),
]))
: n === `infrastructure` &&
unref(X).infrastructure.is_show
? (openBlock(),
createElementBlock(`section`, ie, [
createElementVNode(`div`, J, [
createElementVNode(`div`, Y, [
createElementVNode(
`span`,
ae,
toDisplayString(
unref(X).infrastructure.eyebrow,
),
1,
),
createElementVNode(
`h2`,
null,
toDisplayString(
unref(X).infrastructure.title,
),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(
unref(X).infrastructure.description,
),
1,
),
createElementVNode(`dl`, oe, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(
X,
).infrastructure.stats.filter(
(e) => e.is_show !== !1,
),
(t) => (
openBlock(),
createElementBlock(
`div`,
{
key: t.label,
},
[
createElementVNode(
`dt`,
null,
toDisplayString(t.label),
1,
),
createElementVNode(
`dd`,
null,
[
createTextVNode(
toDisplayString(
t.value,
),
1,
),
createElementVNode(
`small`,
null,
toDisplayString(t.unit),
1,
),
],
),
],
)
),
),
128,
)),
]),
]),
createElementVNode(`div`, se, [
(o[11] ||= createElementVNode(
`div`,
{
class: `official-infra-world`,
"aria-hidden": `true`,
},
[
createElementVNode(`span`),
createElementVNode(`span`),
createElementVNode(`span`),
createElementVNode(`span`),
createElementVNode(`span`),
],
-1,
)),
createElementVNode(`div`, ce, [
createElementVNode(
`span`,
le,
toDisplayString(
unref(X).infrastructure.visualLabel,
),
1,
),
createElementVNode(
`strong`,
null,
toDisplayString(
unref(X).infrastructure
.visualCaption,
),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(
unref(X).infrastructure.nodeTitle,
) +
` · ` +
toDisplayString(
unref(X).infrastructure
.nodeSubtitle,
),
1,
),
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(
X,
).infrastructure.nodes.filter(
(e) => e.is_show !== !1,
),
(t) => (
openBlock(),
createElementBlock(
`div`,
{
key: t.label,
class: `official-resource-row`,
},
[
createElementVNode(
`span`,
null,
toDisplayString(t.label),
1,
),
createElementVNode(
`span`,
ue,
[
createElementVNode(
`i`,
{
style: normalizeStyle(
{
width: `${Math.max(0, Math.min(100, Number(t.progress) || 0))}%`,
},
),
},
null,
4,
),
],
),
createElementVNode(
`b`,
null,
toDisplayString(t.value),
1,
),
],
)
),
),
128,
)),
]),
]),
]),
]))
: n === `reviews` && unref(X).reviews.is_show
? (openBlock(),
createElementBlock(`section`, de, [
createElementVNode(`div`, fe, [
createElementVNode(`div`, null, [
createElementVNode(
`span`,
pe,
toDisplayString(
unref(X).reviews.eyebrow,
),
1,
),
createElementVNode(
`h2`,
null,
toDisplayString(
unref(X).reviews.title,
),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(
unref(X).reviews.description,
),
1,
),
]),
]),
createElementVNode(`div`, me, [
(openBlock(!0),
createElementBlock(
Fragment,
null,
renderList(
unref(X).reviews.items.filter(
(e) => e.is_show !== !1,
),
(t) => (
openBlock(),
createElementBlock(
`article`,
{
key: t.author + t.company,
class: `home-card official-review-card`,
},
[
(o[12] ||= createElementVNode(
`div`,
{
class: `official-review-mark`,
"aria-hidden": `true`,
},
`“`,
-1,
)),
createElementVNode(
`p`,
null,
toDisplayString(t.quote),
1,
),
createElementVNode(`div`, he, [
unref(
useOfficialSiteContent_i,
)(t.avatar)
? (openBlock(),
createElementBlock(
`img`,
{
key: 0,
src: unref(
useOfficialSiteContent_i,
)(t.avatar),
alt: t.author,
},
null,
8,
ge,
))
: (openBlock(),
createElementBlock(
`span`,
_e,
toDisplayString(
t.author.slice(
0,
1,
) || `客`,
),
1,
)),
createElementVNode(
`div`,
null,
[
createElementVNode(
`strong`,
null,
toDisplayString(
t.author,
),
1,
),
createElementVNode(
`small`,
null,
toDisplayString(
t.company,
),
1,
),
],
),
]),
],
)
),
),
128,
)),
]),
]))
: n === `contact` && unref(X).contact.is_show
? (openBlock(),
createElementBlock(`section`, ve, [
createElementVNode(`div`, ye, [
createElementVNode(`div`, null, [
createElementVNode(
`span`,
be,
toDisplayString(
unref(X).contact.eyebrow,
),
1,
),
createElementVNode(
`h2`,
null,
toDisplayString(
unref(X).contact.title,
),
1,
),
createElementVNode(
`p`,
null,
toDisplayString(
unref(X).contact.description,
),
1,
),
]),
createElementVNode(`div`, xe, [
createVNode(
f,
{
class: `official-button primary`,
to: unref(
useOfficialSiteContent_r,
)(unref(X).contact.buttonHref),
},
{
default: withCtx(() => [
createTextVNode(
toDisplayString(
unref(X).contact
.buttonLabel,
),
1,
),
(o[13] ||= createElementVNode(
`i`,
{
class: `pi pi-arrow-right`,
"aria-hidden": `true`,
},
null,
-1,
)),
]),
_: 1,
},
8,
[`to`],
),
createVNode(
f,
{
class: `official-button secondary`,
to: unref(
useOfficialSiteContent_r,
)(unref(X).contact.secondaryHref),
},
{
default: withCtx(() => [
createTextVNode(
toDisplayString(
unref(X).contact
.secondaryLabel,
),
1,
),
]),
_: 1,
},
8,
[`to`],
),
]),
]),
]))
: createCommentVNode(``, !0),
],
64,
)
),
),
128,
)),
],
4,
)
);
}
);
},
});
export {};
export default X;
</script>