generated from liutk/owl-admin-base
1588 lines
55 KiB
JavaScript
1588 lines
55 KiB
JavaScript
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import { hasInjectionContext, inject, defineComponent, ref, mergeProps, unref, getCurrentInstance, useSSRContext, h, Suspense, Fragment, createApp, watch, withCtx, createVNode, createTextVNode, toDisplayString, provide, shallowReactive, computed, onErrorCaptured, onServerPrefetch, resolveDynamicComponent, reactive, effectScope, getCurrentScope, shallowRef, resolveComponent, toRef, isReadonly, isRef, isShallow, isReactive, toRaw } from 'vue';
|
|
import { c as createError$1, k as hasProtocol, l as isScriptProtocol, h as joinURL, w as withQuery, s as sanitizeStatusCode, p as parseURL, m as encodePath, n as decodePath, o as getContext, $ as $fetch, q as createHooks, r as parseQuery, t as withTrailingSlash, v as withoutTrailingSlash, x as executeAsync, y as defu } from '../nitro/nitro.mjs';
|
|
import { b as baseURL, p as publicAssetsURL } from '../routes/renderer.mjs';
|
|
import { RouterView, createMemoryHistory, createRouter, START_LOCATION } from 'vue-router';
|
|
import axios from 'axios';
|
|
import { ssrRenderAttrs, ssrRenderAttr, ssrRenderList, ssrInterpolate, ssrRenderComponent, ssrRenderClass, ssrRenderSuspense, ssrRenderVNode } from 'vue/server-renderer';
|
|
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 'vue-bundle-renderer/runtime';
|
|
import 'unhead/server';
|
|
import 'devalue';
|
|
import 'unhead/plugins';
|
|
import 'unhead/utils';
|
|
|
|
if (!globalThis.$fetch) {
|
|
globalThis.$fetch = $fetch.create({
|
|
baseURL: baseURL()
|
|
});
|
|
}
|
|
if (!("global" in globalThis)) {
|
|
globalThis.global = globalThis;
|
|
}
|
|
const nuxtLinkDefaults = { "componentName": "NuxtLink" };
|
|
const asyncDataDefaults = { "deep": false };
|
|
const appId = "nuxt-app";
|
|
function getNuxtAppCtx(id = appId) {
|
|
return getContext(id, {
|
|
asyncContext: false
|
|
});
|
|
}
|
|
const NuxtPluginIndicator = "__nuxt_plugin";
|
|
function createNuxtApp(options) {
|
|
let hydratingCount = 0;
|
|
const nuxtApp = {
|
|
_id: options.id || appId || "nuxt-app",
|
|
_scope: effectScope(),
|
|
provide: void 0,
|
|
versions: {
|
|
get nuxt() {
|
|
return "4.3.1";
|
|
},
|
|
get vue() {
|
|
return nuxtApp.vueApp.version;
|
|
}
|
|
},
|
|
payload: shallowReactive({
|
|
...options.ssrContext?.payload || {},
|
|
data: shallowReactive({}),
|
|
state: reactive({}),
|
|
once: /* @__PURE__ */ new Set(),
|
|
_errors: shallowReactive({})
|
|
}),
|
|
static: {
|
|
data: {}
|
|
},
|
|
runWithContext(fn) {
|
|
if (nuxtApp._scope.active && !getCurrentScope()) {
|
|
return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn));
|
|
}
|
|
return callWithNuxt(nuxtApp, fn);
|
|
},
|
|
isHydrating: false,
|
|
deferHydration() {
|
|
if (!nuxtApp.isHydrating) {
|
|
return () => {
|
|
};
|
|
}
|
|
hydratingCount++;
|
|
let called = false;
|
|
return () => {
|
|
if (called) {
|
|
return;
|
|
}
|
|
called = true;
|
|
hydratingCount--;
|
|
if (hydratingCount === 0) {
|
|
nuxtApp.isHydrating = false;
|
|
return nuxtApp.callHook("app:suspense:resolve");
|
|
}
|
|
};
|
|
},
|
|
_asyncDataPromises: {},
|
|
_asyncData: shallowReactive({}),
|
|
_payloadRevivers: {},
|
|
...options
|
|
};
|
|
{
|
|
nuxtApp.payload.serverRendered = true;
|
|
}
|
|
if (nuxtApp.ssrContext) {
|
|
nuxtApp.payload.path = nuxtApp.ssrContext.url;
|
|
nuxtApp.ssrContext.nuxt = nuxtApp;
|
|
nuxtApp.ssrContext.payload = nuxtApp.payload;
|
|
nuxtApp.ssrContext.config = {
|
|
public: nuxtApp.ssrContext.runtimeConfig.public,
|
|
app: nuxtApp.ssrContext.runtimeConfig.app
|
|
};
|
|
}
|
|
nuxtApp.hooks = createHooks();
|
|
nuxtApp.hook = nuxtApp.hooks.hook;
|
|
{
|
|
const contextCaller = async function(hooks, args) {
|
|
for (const hook of hooks) {
|
|
await nuxtApp.runWithContext(() => hook(...args));
|
|
}
|
|
};
|
|
nuxtApp.hooks.callHook = (name, ...args) => nuxtApp.hooks.callHookWith(contextCaller, name, ...args);
|
|
}
|
|
nuxtApp.callHook = nuxtApp.hooks.callHook;
|
|
nuxtApp.provide = (name, value) => {
|
|
const $name = "$" + name;
|
|
defineGetter(nuxtApp, $name, value);
|
|
defineGetter(nuxtApp.vueApp.config.globalProperties, $name, value);
|
|
};
|
|
defineGetter(nuxtApp.vueApp, "$nuxt", nuxtApp);
|
|
defineGetter(nuxtApp.vueApp.config.globalProperties, "$nuxt", nuxtApp);
|
|
const runtimeConfig = options.ssrContext.runtimeConfig;
|
|
nuxtApp.provide("config", runtimeConfig);
|
|
return nuxtApp;
|
|
}
|
|
function registerPluginHooks(nuxtApp, plugin2) {
|
|
if (plugin2.hooks) {
|
|
nuxtApp.hooks.addHooks(plugin2.hooks);
|
|
}
|
|
}
|
|
async function applyPlugin(nuxtApp, plugin2) {
|
|
if (typeof plugin2 === "function") {
|
|
const { provide: provide2 } = await nuxtApp.runWithContext(() => plugin2(nuxtApp)) || {};
|
|
if (provide2 && typeof provide2 === "object") {
|
|
for (const key in provide2) {
|
|
nuxtApp.provide(key, provide2[key]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
async function applyPlugins(nuxtApp, plugins2) {
|
|
const resolvedPlugins = /* @__PURE__ */ new Set();
|
|
const unresolvedPlugins = [];
|
|
const parallels = [];
|
|
let error = void 0;
|
|
let promiseDepth = 0;
|
|
async function executePlugin(plugin2) {
|
|
const unresolvedPluginsForThisPlugin = plugin2.dependsOn?.filter((name) => plugins2.some((p) => p._name === name) && !resolvedPlugins.has(name)) ?? [];
|
|
if (unresolvedPluginsForThisPlugin.length > 0) {
|
|
unresolvedPlugins.push([new Set(unresolvedPluginsForThisPlugin), plugin2]);
|
|
} else {
|
|
const promise = applyPlugin(nuxtApp, plugin2).then(async () => {
|
|
if (plugin2._name) {
|
|
resolvedPlugins.add(plugin2._name);
|
|
await Promise.all(unresolvedPlugins.map(async ([dependsOn, unexecutedPlugin]) => {
|
|
if (dependsOn.has(plugin2._name)) {
|
|
dependsOn.delete(plugin2._name);
|
|
if (dependsOn.size === 0) {
|
|
promiseDepth++;
|
|
await executePlugin(unexecutedPlugin);
|
|
}
|
|
}
|
|
}));
|
|
}
|
|
}).catch((e) => {
|
|
if (!plugin2.parallel && !nuxtApp.payload.error) {
|
|
throw e;
|
|
}
|
|
error ||= e;
|
|
});
|
|
if (plugin2.parallel) {
|
|
parallels.push(promise);
|
|
} else {
|
|
await promise;
|
|
}
|
|
}
|
|
}
|
|
for (const plugin2 of plugins2) {
|
|
if (nuxtApp.ssrContext?.islandContext && plugin2.env?.islands === false) {
|
|
continue;
|
|
}
|
|
registerPluginHooks(nuxtApp, plugin2);
|
|
}
|
|
for (const plugin2 of plugins2) {
|
|
if (nuxtApp.ssrContext?.islandContext && plugin2.env?.islands === false) {
|
|
continue;
|
|
}
|
|
await executePlugin(plugin2);
|
|
}
|
|
await Promise.all(parallels);
|
|
if (promiseDepth) {
|
|
for (let i = 0; i < promiseDepth; i++) {
|
|
await Promise.all(parallels);
|
|
}
|
|
}
|
|
if (error) {
|
|
throw nuxtApp.payload.error || error;
|
|
}
|
|
}
|
|
// @__NO_SIDE_EFFECTS__
|
|
function defineNuxtPlugin(plugin2) {
|
|
if (typeof plugin2 === "function") {
|
|
return plugin2;
|
|
}
|
|
const _name = plugin2._name || plugin2.name;
|
|
delete plugin2.name;
|
|
return Object.assign(plugin2.setup || (() => {
|
|
}), plugin2, { [NuxtPluginIndicator]: true, _name });
|
|
}
|
|
function callWithNuxt(nuxt, setup, args) {
|
|
const fn = () => setup();
|
|
const nuxtAppCtx = getNuxtAppCtx(nuxt._id);
|
|
{
|
|
return nuxt.vueApp.runWithContext(() => nuxtAppCtx.callAsync(nuxt, fn));
|
|
}
|
|
}
|
|
function tryUseNuxtApp(id) {
|
|
let nuxtAppInstance;
|
|
if (hasInjectionContext()) {
|
|
nuxtAppInstance = getCurrentInstance()?.appContext.app.$nuxt;
|
|
}
|
|
nuxtAppInstance ||= getNuxtAppCtx(id).tryUse();
|
|
return nuxtAppInstance || null;
|
|
}
|
|
function useNuxtApp(id) {
|
|
const nuxtAppInstance = tryUseNuxtApp(id);
|
|
if (!nuxtAppInstance) {
|
|
{
|
|
throw new Error("[nuxt] instance unavailable");
|
|
}
|
|
}
|
|
return nuxtAppInstance;
|
|
}
|
|
// @__NO_SIDE_EFFECTS__
|
|
function useRuntimeConfig(_event) {
|
|
return useNuxtApp().$config;
|
|
}
|
|
function defineGetter(obj, key, val) {
|
|
Object.defineProperty(obj, key, { get: () => val });
|
|
}
|
|
const LayoutMetaSymbol = /* @__PURE__ */ Symbol("layout-meta");
|
|
const PageRouteSymbol = /* @__PURE__ */ Symbol("route");
|
|
globalThis._importMeta_.url.replace(/\/app\/.*$/, "/");
|
|
const useRouter = () => {
|
|
return useNuxtApp()?.$router;
|
|
};
|
|
const useRoute = () => {
|
|
if (hasInjectionContext()) {
|
|
return inject(PageRouteSymbol, useNuxtApp()._route);
|
|
}
|
|
return useNuxtApp()._route;
|
|
};
|
|
// @__NO_SIDE_EFFECTS__
|
|
function defineNuxtRouteMiddleware(middleware) {
|
|
return middleware;
|
|
}
|
|
const isProcessingMiddleware = () => {
|
|
try {
|
|
if (useNuxtApp()._processingMiddleware) {
|
|
return true;
|
|
}
|
|
} catch {
|
|
return false;
|
|
}
|
|
return false;
|
|
};
|
|
const URL_QUOTE_RE = /"/g;
|
|
const navigateTo = (to, options) => {
|
|
to ||= "/";
|
|
const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter().resolve(to).href;
|
|
const isExternalHost = hasProtocol(toPath, { acceptRelative: true });
|
|
const isExternal = options?.external || isExternalHost;
|
|
if (isExternal) {
|
|
if (!options?.external) {
|
|
throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");
|
|
}
|
|
const { protocol } = new URL(toPath, "http://localhost");
|
|
if (protocol && isScriptProtocol(protocol)) {
|
|
throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`);
|
|
}
|
|
}
|
|
const inMiddleware = isProcessingMiddleware();
|
|
const router = useRouter();
|
|
const nuxtApp = useNuxtApp();
|
|
{
|
|
if (nuxtApp.ssrContext) {
|
|
const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/";
|
|
const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath);
|
|
const redirect = async function(response) {
|
|
await nuxtApp.callHook("app:redirected");
|
|
const encodedLoc = location2.replace(URL_QUOTE_RE, "%22");
|
|
const encodedHeader = encodeURL(location2, isExternalHost);
|
|
nuxtApp.ssrContext["~renderResponse"] = {
|
|
statusCode: sanitizeStatusCode(options?.redirectCode || 302, 302),
|
|
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
|
|
headers: { location: encodedHeader }
|
|
};
|
|
return response;
|
|
};
|
|
if (!isExternal && inMiddleware) {
|
|
router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0);
|
|
return to;
|
|
}
|
|
return redirect(!inMiddleware ? void 0 : (
|
|
/* abort route navigation */
|
|
false
|
|
));
|
|
}
|
|
}
|
|
if (isExternal) {
|
|
nuxtApp._scope.stop();
|
|
if (options?.replace) {
|
|
(void 0).replace(toPath);
|
|
} else {
|
|
(void 0).href = toPath;
|
|
}
|
|
if (inMiddleware) {
|
|
if (!nuxtApp.isHydrating) {
|
|
return false;
|
|
}
|
|
return new Promise(() => {
|
|
});
|
|
}
|
|
return Promise.resolve();
|
|
}
|
|
const encodedTo = typeof to === "string" ? encodeRoutePath(to) : to;
|
|
return options?.replace ? router.replace(encodedTo) : router.push(encodedTo);
|
|
};
|
|
function resolveRouteObject(to) {
|
|
return withQuery(to.path || "", to.query || {}) + (to.hash || "");
|
|
}
|
|
function encodeURL(location2, isExternalHost = false) {
|
|
const url = new URL(location2, "http://localhost");
|
|
if (!isExternalHost) {
|
|
return url.pathname + url.search + url.hash;
|
|
}
|
|
if (location2.startsWith("//")) {
|
|
return url.toString().replace(url.protocol, "");
|
|
}
|
|
return url.toString();
|
|
}
|
|
function encodeRoutePath(url) {
|
|
const parsed = parseURL(url);
|
|
return encodePath(decodePath(parsed.pathname)) + parsed.search + parsed.hash;
|
|
}
|
|
const NUXT_ERROR_SIGNATURE = "__nuxt_error";
|
|
const useError = /* @__NO_SIDE_EFFECTS__ */ () => toRef(useNuxtApp().payload, "error");
|
|
const showError = (error) => {
|
|
const nuxtError = createError(error);
|
|
try {
|
|
const error2 = /* @__PURE__ */ useError();
|
|
if (false) ;
|
|
error2.value ||= nuxtError;
|
|
} catch {
|
|
throw nuxtError;
|
|
}
|
|
return nuxtError;
|
|
};
|
|
const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error;
|
|
const createError = (error) => {
|
|
if (typeof error !== "string" && error.statusText) {
|
|
error.message ??= error.statusText;
|
|
}
|
|
const nuxtError = createError$1(error);
|
|
Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, {
|
|
value: true,
|
|
configurable: false,
|
|
writable: false
|
|
});
|
|
Object.defineProperty(nuxtError, "status", {
|
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
get: () => nuxtError.statusCode,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(nuxtError, "statusText", {
|
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
get: () => nuxtError.statusMessage,
|
|
configurable: true
|
|
});
|
|
return nuxtError;
|
|
};
|
|
const unhead_L6ATTMiCskwJQXqoEsaAFroLoec0kjZ7lYmTqLEuiYE = /* @__PURE__ */ defineNuxtPlugin({
|
|
name: "nuxt:head",
|
|
enforce: "pre",
|
|
setup(nuxtApp) {
|
|
const head = nuxtApp.ssrContext.head;
|
|
nuxtApp.vueApp.use(head);
|
|
}
|
|
});
|
|
function toArray(value) {
|
|
return Array.isArray(value) ? value : [value];
|
|
}
|
|
const matcher = /* @__PURE__ */ (() => {
|
|
const $0 = { redirect: "/home" };
|
|
return (m, p) => {
|
|
let r = [];
|
|
if (p.charCodeAt(p.length - 1) === 47) p = p.slice(0, -1) || "/";
|
|
if (p === "/") {
|
|
r.unshift({ data: $0 });
|
|
}
|
|
return r;
|
|
};
|
|
})();
|
|
const _routeRulesMatcher = (path) => defu({}, ...matcher("", path).map((r) => r.data).reverse());
|
|
const routeRulesMatcher = _routeRulesMatcher;
|
|
function getRouteRules(arg) {
|
|
const path = typeof arg === "string" ? arg : arg.path;
|
|
try {
|
|
return routeRulesMatcher(path);
|
|
} catch (e) {
|
|
console.error("[nuxt] Error matching route rules.", e);
|
|
return {};
|
|
}
|
|
}
|
|
const __nuxt_page_meta = null;
|
|
const component_45stubhYy29gHe0uS0Vl3WgfYBob5B_Z1fc8hRSamSzXsJQwg = {};
|
|
const _routes = [
|
|
{
|
|
name: "news-id",
|
|
path: "/news/:id()",
|
|
component: () => import('./_id_-0mLHz3QR.mjs')
|
|
},
|
|
{
|
|
name: "home",
|
|
path: "/home",
|
|
component: () => import('./index-DrkkSDLH.mjs')
|
|
},
|
|
{
|
|
name: "news",
|
|
path: "/news",
|
|
component: () => import('./index-BIJrlrSw.mjs')
|
|
},
|
|
{
|
|
name: "about",
|
|
path: "/about",
|
|
component: () => import('./index-CAEscreM.mjs')
|
|
},
|
|
{
|
|
name: "detail-id",
|
|
path: "/detail/:id()",
|
|
component: () => import('./_id_-DhQKfcTt.mjs')
|
|
},
|
|
{
|
|
name: "service-id",
|
|
path: "/service/:id()",
|
|
component: () => import('./_id_-DRsxvGrY.mjs')
|
|
},
|
|
{
|
|
name: "business-id",
|
|
path: "/business/:id()",
|
|
component: () => import('./_id_-Drbm_L59.mjs')
|
|
},
|
|
{
|
|
name: "contact",
|
|
path: "/contact",
|
|
component: () => import('./index-DGcqjns9.mjs')
|
|
},
|
|
{
|
|
name: "service",
|
|
path: "/service",
|
|
component: () => import('./index-DDtxt1bx.mjs')
|
|
},
|
|
{
|
|
name: "business",
|
|
path: "/business",
|
|
component: () => import('./index-LDAB2eRI.mjs')
|
|
},
|
|
{
|
|
name: __nuxt_page_meta?.name,
|
|
path: "/",
|
|
component: component_45stubhYy29gHe0uS0Vl3WgfYBob5B_Z1fc8hRSamSzXsJQwg
|
|
}
|
|
];
|
|
const ROUTE_KEY_PARENTHESES_RE = /(:\w+)\([^)]+\)/g;
|
|
const ROUTE_KEY_SYMBOLS_RE = /(:\w+)[?+*]/g;
|
|
const ROUTE_KEY_NORMAL_RE = /:\w+/g;
|
|
function generateRouteKey(route) {
|
|
const source = route?.meta.key ?? route.path.replace(ROUTE_KEY_PARENTHESES_RE, "$1").replace(ROUTE_KEY_SYMBOLS_RE, "$1").replace(ROUTE_KEY_NORMAL_RE, (r) => route.params[r.slice(1)]?.toString() || "");
|
|
return typeof source === "function" ? source(route) : source;
|
|
}
|
|
function isChangingPage(to, from) {
|
|
if (to === from || from === START_LOCATION) {
|
|
return false;
|
|
}
|
|
if (generateRouteKey(to) !== generateRouteKey(from)) {
|
|
return true;
|
|
}
|
|
const areComponentsSame = to.matched.every(
|
|
(comp, index) => comp.components && comp.components.default === from.matched[index]?.components?.default
|
|
);
|
|
if (areComponentsSame) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
const routerOptions0 = {
|
|
scrollBehavior(to, from, savedPosition) {
|
|
const nuxtApp = useNuxtApp();
|
|
const hashScrollBehaviour = useRouter().options?.scrollBehaviorType ?? "auto";
|
|
if (to.path.replace(/\/$/, "") === from.path.replace(/\/$/, "")) {
|
|
if (from.hash && !to.hash) {
|
|
return { left: 0, top: 0 };
|
|
}
|
|
if (to.hash) {
|
|
return { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior: hashScrollBehaviour };
|
|
}
|
|
return false;
|
|
}
|
|
const routeAllowsScrollToTop = typeof to.meta.scrollToTop === "function" ? to.meta.scrollToTop(to, from) : to.meta.scrollToTop;
|
|
if (routeAllowsScrollToTop === false) {
|
|
return false;
|
|
}
|
|
const hookToWait = nuxtApp._runningTransition ? "page:transition:finish" : "page:loading:end";
|
|
return new Promise((resolve) => {
|
|
if (from === START_LOCATION) {
|
|
resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour));
|
|
return;
|
|
}
|
|
nuxtApp.hooks.hookOnce(hookToWait, () => {
|
|
requestAnimationFrame(() => resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour)));
|
|
});
|
|
});
|
|
}
|
|
};
|
|
function _getHashElementScrollMarginTop(selector) {
|
|
try {
|
|
const elem = (void 0).querySelector(selector);
|
|
if (elem) {
|
|
return (Number.parseFloat(getComputedStyle(elem).scrollMarginTop) || 0) + (Number.parseFloat(getComputedStyle((void 0).documentElement).scrollPaddingTop) || 0);
|
|
}
|
|
} catch {
|
|
}
|
|
return 0;
|
|
}
|
|
function _calculatePosition(to, from, savedPosition, defaultHashScrollBehaviour) {
|
|
if (savedPosition) {
|
|
return savedPosition;
|
|
}
|
|
const isPageNavigation = isChangingPage(to, from);
|
|
if (to.hash) {
|
|
return {
|
|
el: to.hash,
|
|
top: _getHashElementScrollMarginTop(to.hash),
|
|
behavior: isPageNavigation ? defaultHashScrollBehaviour : "instant"
|
|
};
|
|
}
|
|
return {
|
|
left: 0,
|
|
top: 0
|
|
};
|
|
}
|
|
const configRouterOptions = {
|
|
hashMode: false,
|
|
scrollBehaviorType: "auto"
|
|
};
|
|
const routerOptions = {
|
|
...configRouterOptions,
|
|
...routerOptions0
|
|
};
|
|
const validate = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to, from) => {
|
|
let __temp, __restore;
|
|
if (!to.meta?.validate) {
|
|
return;
|
|
}
|
|
const result = ([__temp, __restore] = executeAsync(() => Promise.resolve(to.meta.validate(to))), __temp = await __temp, __restore(), __temp);
|
|
if (result === true) {
|
|
return;
|
|
}
|
|
const error = createError({
|
|
fatal: false,
|
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
status: result && (result.status || result.statusCode) || 404,
|
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
statusText: result && (result.statusText || result.statusMessage) || `Page Not Found: ${to.fullPath}`,
|
|
data: {
|
|
path: to.fullPath
|
|
}
|
|
});
|
|
return error;
|
|
});
|
|
const manifest_45route_45rule = /* @__PURE__ */ defineNuxtRouteMiddleware((to) => {
|
|
{
|
|
return;
|
|
}
|
|
});
|
|
const globalMiddleware = [
|
|
validate,
|
|
manifest_45route_45rule
|
|
];
|
|
const namedMiddleware = {};
|
|
const plugin = /* @__PURE__ */ defineNuxtPlugin({
|
|
name: "nuxt:router",
|
|
enforce: "pre",
|
|
async setup(nuxtApp) {
|
|
let __temp, __restore;
|
|
let routerBase = (/* @__PURE__ */ useRuntimeConfig()).app.baseURL;
|
|
const history = routerOptions.history?.(routerBase) ?? createMemoryHistory(routerBase);
|
|
const routes = routerOptions.routes ? ([__temp, __restore] = executeAsync(() => routerOptions.routes(_routes)), __temp = await __temp, __restore(), __temp) ?? _routes : _routes;
|
|
let startPosition;
|
|
const router = createRouter({
|
|
...routerOptions,
|
|
scrollBehavior: (to, from, savedPosition) => {
|
|
if (from === START_LOCATION) {
|
|
startPosition = savedPosition;
|
|
return;
|
|
}
|
|
if (routerOptions.scrollBehavior) {
|
|
router.options.scrollBehavior = routerOptions.scrollBehavior;
|
|
if ("scrollRestoration" in (void 0).history) {
|
|
const unsub = router.beforeEach(() => {
|
|
unsub();
|
|
(void 0).history.scrollRestoration = "manual";
|
|
});
|
|
}
|
|
return routerOptions.scrollBehavior(to, START_LOCATION, startPosition || savedPosition);
|
|
}
|
|
},
|
|
history,
|
|
routes
|
|
});
|
|
nuxtApp.vueApp.use(router);
|
|
const previousRoute = shallowRef(router.currentRoute.value);
|
|
router.afterEach((_to, from) => {
|
|
previousRoute.value = from;
|
|
});
|
|
Object.defineProperty(nuxtApp.vueApp.config.globalProperties, "previousRoute", {
|
|
get: () => previousRoute.value
|
|
});
|
|
const initialURL = nuxtApp.ssrContext.url;
|
|
const _route = shallowRef(router.currentRoute.value);
|
|
const syncCurrentRoute = () => {
|
|
_route.value = router.currentRoute.value;
|
|
};
|
|
router.afterEach((to, from) => {
|
|
if (to.matched.at(-1)?.components?.default === from.matched.at(-1)?.components?.default) {
|
|
syncCurrentRoute();
|
|
}
|
|
});
|
|
const route = { sync: syncCurrentRoute };
|
|
for (const key in _route.value) {
|
|
Object.defineProperty(route, key, {
|
|
get: () => _route.value[key],
|
|
enumerable: true
|
|
});
|
|
}
|
|
nuxtApp._route = shallowReactive(route);
|
|
nuxtApp._middleware ||= {
|
|
global: [],
|
|
named: {}
|
|
};
|
|
const error = /* @__PURE__ */ useError();
|
|
if (!nuxtApp.ssrContext?.islandContext) {
|
|
router.afterEach(async (to, _from, failure) => {
|
|
delete nuxtApp._processingMiddleware;
|
|
if (failure) {
|
|
await nuxtApp.callHook("page:loading:end");
|
|
}
|
|
if (failure?.type === 4) {
|
|
return;
|
|
}
|
|
if (to.redirectedFrom && to.fullPath !== initialURL) {
|
|
await nuxtApp.runWithContext(() => navigateTo(to.fullPath || "/"));
|
|
}
|
|
});
|
|
}
|
|
try {
|
|
if (true) {
|
|
;
|
|
[__temp, __restore] = executeAsync(() => router.push(initialURL)), await __temp, __restore();
|
|
;
|
|
}
|
|
;
|
|
[__temp, __restore] = executeAsync(() => router.isReady()), await __temp, __restore();
|
|
;
|
|
} catch (error2) {
|
|
[__temp, __restore] = executeAsync(() => nuxtApp.runWithContext(() => showError(error2))), await __temp, __restore();
|
|
}
|
|
const resolvedInitialRoute = router.currentRoute.value;
|
|
syncCurrentRoute();
|
|
if (nuxtApp.ssrContext?.islandContext) {
|
|
return { provide: { router } };
|
|
}
|
|
const initialLayout = nuxtApp.payload.state._layout;
|
|
router.beforeEach(async (to, from) => {
|
|
await nuxtApp.callHook("page:loading:start");
|
|
to.meta = reactive(to.meta);
|
|
if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) {
|
|
to.meta.layout = initialLayout;
|
|
}
|
|
nuxtApp._processingMiddleware = true;
|
|
if (!nuxtApp.ssrContext?.islandContext) {
|
|
const middlewareEntries = /* @__PURE__ */ new Set([...globalMiddleware, ...nuxtApp._middleware.global]);
|
|
for (const component of to.matched) {
|
|
const componentMiddleware = component.meta.middleware;
|
|
if (!componentMiddleware) {
|
|
continue;
|
|
}
|
|
for (const entry2 of toArray(componentMiddleware)) {
|
|
middlewareEntries.add(entry2);
|
|
}
|
|
}
|
|
const routeRules = getRouteRules({ path: to.path });
|
|
if (routeRules.appMiddleware) {
|
|
for (const key in routeRules.appMiddleware) {
|
|
if (routeRules.appMiddleware[key]) {
|
|
middlewareEntries.add(key);
|
|
} else {
|
|
middlewareEntries.delete(key);
|
|
}
|
|
}
|
|
}
|
|
for (const entry2 of middlewareEntries) {
|
|
const middleware = typeof entry2 === "string" ? nuxtApp._middleware.named[entry2] || await namedMiddleware[entry2]?.().then((r) => r.default || r) : entry2;
|
|
if (!middleware) {
|
|
throw new Error(`Unknown route middleware: '${entry2}'.`);
|
|
}
|
|
try {
|
|
if (false) ;
|
|
const result = await nuxtApp.runWithContext(() => middleware(to, from));
|
|
if (true) {
|
|
if (result === false || result instanceof Error) {
|
|
const error2 = result || createError({
|
|
status: 404,
|
|
statusText: `Page Not Found: ${initialURL}`
|
|
});
|
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
return false;
|
|
}
|
|
}
|
|
if (result === true) {
|
|
continue;
|
|
}
|
|
if (result === false) {
|
|
return result;
|
|
}
|
|
if (result) {
|
|
if (isNuxtError(result) && result.fatal) {
|
|
await nuxtApp.runWithContext(() => showError(result));
|
|
}
|
|
return result;
|
|
}
|
|
} catch (err) {
|
|
const error2 = createError(err);
|
|
if (error2.fatal) {
|
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
}
|
|
return error2;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
router.onError(async () => {
|
|
delete nuxtApp._processingMiddleware;
|
|
await nuxtApp.callHook("page:loading:end");
|
|
});
|
|
router.afterEach((to) => {
|
|
if (to.matched.length === 0 && !error.value) {
|
|
return nuxtApp.runWithContext(() => showError(createError({
|
|
status: 404,
|
|
fatal: false,
|
|
statusText: `Page not found: ${to.fullPath}`,
|
|
data: {
|
|
path: to.fullPath
|
|
}
|
|
})));
|
|
}
|
|
});
|
|
nuxtApp.hooks.hookOnce("app:created", async () => {
|
|
try {
|
|
if ("name" in resolvedInitialRoute) {
|
|
resolvedInitialRoute.name = void 0;
|
|
}
|
|
await router.replace({
|
|
...resolvedInitialRoute,
|
|
force: true
|
|
});
|
|
router.options.scrollBehavior = routerOptions.scrollBehavior;
|
|
} catch (error2) {
|
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
}
|
|
});
|
|
return { provide: { router } };
|
|
}
|
|
});
|
|
function definePayloadReducer(name, reduce) {
|
|
{
|
|
useNuxtApp().ssrContext["~payloadReducers"][name] = reduce;
|
|
}
|
|
}
|
|
const reducers = [
|
|
["NuxtError", (data) => isNuxtError(data) && data.toJSON()],
|
|
["EmptyShallowRef", (data) => isRef(data) && isShallow(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
|
|
["EmptyRef", (data) => isRef(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")],
|
|
["ShallowRef", (data) => isRef(data) && isShallow(data) && data.value],
|
|
["ShallowReactive", (data) => isReactive(data) && isShallow(data) && toRaw(data)],
|
|
["Ref", (data) => isRef(data) && data.value],
|
|
["Reactive", (data) => isReactive(data) && toRaw(data)]
|
|
];
|
|
const revive_payload_server_eO08_s_CDELWNw9YU4gUSZDQ_17_r82ChCB2W0OE2LQ = /* @__PURE__ */ defineNuxtPlugin({
|
|
name: "nuxt:revive-payload:server",
|
|
setup() {
|
|
for (const [reducer, fn] of reducers) {
|
|
definePayloadReducer(reducer, fn);
|
|
}
|
|
}
|
|
});
|
|
const components_plugin_4kY4pyzJIYX99vmMAAIorFf3CnAaptHitJgf7JxiED8 = /* @__PURE__ */ defineNuxtPlugin({
|
|
name: "nuxt:global-components"
|
|
});
|
|
const easy_log_plus_BLi4CKd1UIOJeLWUt9_4D87ZzdCm_sM7rBwpEE3NMkE = () => {
|
|
};
|
|
function createRequest(config = {}) {
|
|
const {
|
|
baseURL: baseURL2 = "",
|
|
timeout = 15e3,
|
|
onRequest,
|
|
onResponse,
|
|
onError
|
|
} = config;
|
|
const instance = axios.create({
|
|
baseURL: baseURL2,
|
|
timeout,
|
|
headers: {
|
|
"Content-Type": "application/json"
|
|
}
|
|
});
|
|
instance.interceptors.request.use(
|
|
(req) => {
|
|
if (onRequest) return onRequest(req);
|
|
return Promise.resolve(req);
|
|
},
|
|
(err) => Promise.reject(err)
|
|
);
|
|
instance.interceptors.response.use(
|
|
(res) => {
|
|
if (onResponse) return onResponse(res);
|
|
return Promise.resolve(res.data);
|
|
},
|
|
(err) => {
|
|
if (onError) onError(err);
|
|
const message = err.response?.data?.message ?? err.message ?? "请求失败";
|
|
return Promise.reject(new Error(message));
|
|
}
|
|
);
|
|
return instance;
|
|
}
|
|
const request_server_WRsrnYK281ye8NRneq_PVW0dsGdo75HF9K_frLq2ONo = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => {
|
|
const config = /* @__PURE__ */ useRuntimeConfig();
|
|
const apiBase = config.public.apiBase || "";
|
|
const request = createRequest({
|
|
baseURL: apiBase,
|
|
timeout: 15e3,
|
|
onRequest(req) {
|
|
return req;
|
|
},
|
|
onResponse(res) {
|
|
return res.data;
|
|
},
|
|
onError(err) {
|
|
}
|
|
});
|
|
nuxtApp.provide("request", request);
|
|
});
|
|
const plugins = [
|
|
unhead_L6ATTMiCskwJQXqoEsaAFroLoec0kjZ7lYmTqLEuiYE,
|
|
plugin,
|
|
revive_payload_server_eO08_s_CDELWNw9YU4gUSZDQ_17_r82ChCB2W0OE2LQ,
|
|
components_plugin_4kY4pyzJIYX99vmMAAIorFf3CnAaptHitJgf7JxiED8,
|
|
easy_log_plus_BLi4CKd1UIOJeLWUt9_4D87ZzdCm_sM7rBwpEE3NMkE,
|
|
request_server_WRsrnYK281ye8NRneq_PVW0dsGdo75HF9K_frLq2ONo
|
|
];
|
|
const firstNonUndefined = (...args) => args.find((arg) => arg !== void 0);
|
|
// @__NO_SIDE_EFFECTS__
|
|
function defineNuxtLink(options) {
|
|
const componentName = options.componentName || "NuxtLink";
|
|
function isHashLinkWithoutHashMode(link) {
|
|
return typeof link === "string" && link.startsWith("#");
|
|
}
|
|
function resolveTrailingSlashBehavior(to, resolve, trailingSlash) {
|
|
const effectiveTrailingSlash = trailingSlash ?? options.trailingSlash;
|
|
if (!to || effectiveTrailingSlash !== "append" && effectiveTrailingSlash !== "remove") {
|
|
return to;
|
|
}
|
|
if (typeof to === "string") {
|
|
return applyTrailingSlashBehavior(to, effectiveTrailingSlash);
|
|
}
|
|
const path = "path" in to && to.path !== void 0 ? to.path : resolve(to).path;
|
|
const resolvedPath = {
|
|
...to,
|
|
name: void 0,
|
|
// named routes would otherwise always override trailing slash behavior
|
|
path: applyTrailingSlashBehavior(path, effectiveTrailingSlash)
|
|
};
|
|
return resolvedPath;
|
|
}
|
|
function useNuxtLink(props) {
|
|
const router = useRouter();
|
|
const config = /* @__PURE__ */ useRuntimeConfig();
|
|
const hasTarget = computed(() => !!props.target && props.target !== "_self");
|
|
const isAbsoluteUrl = computed(() => {
|
|
const path = props.to || props.href || "";
|
|
return typeof path === "string" && hasProtocol(path, { acceptRelative: true });
|
|
});
|
|
const builtinRouterLink = resolveComponent("RouterLink");
|
|
const useBuiltinLink = builtinRouterLink && typeof builtinRouterLink !== "string" ? builtinRouterLink.useLink : void 0;
|
|
const isExternal = computed(() => {
|
|
if (props.external) {
|
|
return true;
|
|
}
|
|
const path = props.to || props.href || "";
|
|
if (typeof path === "object") {
|
|
return false;
|
|
}
|
|
return path === "" || isAbsoluteUrl.value;
|
|
});
|
|
const to = computed(() => {
|
|
const path = props.to || props.href || "";
|
|
if (isExternal.value) {
|
|
return path;
|
|
}
|
|
return resolveTrailingSlashBehavior(path, router.resolve, props.trailingSlash);
|
|
});
|
|
const link = isExternal.value ? void 0 : useBuiltinLink?.({ ...props, to });
|
|
const href = computed(() => {
|
|
const effectiveTrailingSlash = props.trailingSlash ?? options.trailingSlash;
|
|
if (!to.value || isAbsoluteUrl.value || isHashLinkWithoutHashMode(to.value)) {
|
|
return to.value;
|
|
}
|
|
if (isExternal.value) {
|
|
const path = typeof to.value === "object" && "path" in to.value ? resolveRouteObject(to.value) : to.value;
|
|
const href2 = typeof path === "object" ? router.resolve(path).href : path;
|
|
return applyTrailingSlashBehavior(href2, effectiveTrailingSlash);
|
|
}
|
|
if (typeof to.value === "object") {
|
|
return router.resolve(to.value)?.href ?? null;
|
|
}
|
|
return applyTrailingSlashBehavior(joinURL(config.app.baseURL, to.value), effectiveTrailingSlash);
|
|
});
|
|
return {
|
|
to,
|
|
hasTarget,
|
|
isAbsoluteUrl,
|
|
isExternal,
|
|
//
|
|
href,
|
|
isActive: link?.isActive ?? computed(() => to.value === router.currentRoute.value.path),
|
|
isExactActive: link?.isExactActive ?? computed(() => to.value === router.currentRoute.value.path),
|
|
route: link?.route ?? computed(() => router.resolve(to.value)),
|
|
async navigate(_e) {
|
|
await navigateTo(href.value, { replace: props.replace, external: isExternal.value || hasTarget.value });
|
|
}
|
|
};
|
|
}
|
|
return defineComponent({
|
|
name: componentName,
|
|
props: {
|
|
// Routing
|
|
to: {
|
|
type: [String, Object],
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
href: {
|
|
type: [String, Object],
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Attributes
|
|
target: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
rel: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
noRel: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Prefetching
|
|
prefetch: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
prefetchOn: {
|
|
type: [String, Object],
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
noPrefetch: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Styling
|
|
activeClass: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
exactActiveClass: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
prefetchedClass: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Vue Router's `<RouterLink>` additional props
|
|
replace: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
ariaCurrentValue: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Edge cases handling
|
|
external: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Slot API
|
|
custom: {
|
|
type: Boolean,
|
|
default: void 0,
|
|
required: false
|
|
},
|
|
// Behavior
|
|
trailingSlash: {
|
|
type: String,
|
|
default: void 0,
|
|
required: false
|
|
}
|
|
},
|
|
useLink: useNuxtLink,
|
|
setup(props, { slots }) {
|
|
const router = useRouter();
|
|
const { to, href, navigate, isExternal, hasTarget, isAbsoluteUrl } = useNuxtLink(props);
|
|
shallowRef(false);
|
|
const el = void 0;
|
|
const elRef = void 0;
|
|
async function prefetch(nuxtApp = useNuxtApp()) {
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
return () => {
|
|
if (!isExternal.value && !hasTarget.value && !isHashLinkWithoutHashMode(to.value)) {
|
|
const routerLinkProps = {
|
|
ref: elRef,
|
|
to: to.value,
|
|
activeClass: props.activeClass || options.activeClass,
|
|
exactActiveClass: props.exactActiveClass || options.exactActiveClass,
|
|
replace: props.replace,
|
|
ariaCurrentValue: props.ariaCurrentValue,
|
|
custom: props.custom
|
|
};
|
|
if (!props.custom) {
|
|
routerLinkProps.rel = props.rel || void 0;
|
|
}
|
|
return h(
|
|
resolveComponent("RouterLink"),
|
|
routerLinkProps,
|
|
slots.default
|
|
);
|
|
}
|
|
const target = props.target || null;
|
|
const rel = firstNonUndefined(
|
|
// converts `""` to `null` to prevent the attribute from being added as empty (`rel=""`)
|
|
props.noRel ? "" : props.rel,
|
|
options.externalRelAttribute,
|
|
/*
|
|
* A fallback rel of `noopener noreferrer` is applied for external links or links that open in a new tab.
|
|
* This solves a reverse tabnapping security flaw in browsers pre-2021 as well as improving privacy.
|
|
*/
|
|
isAbsoluteUrl.value || hasTarget.value ? "noopener noreferrer" : ""
|
|
) || null;
|
|
if (props.custom) {
|
|
if (!slots.default) {
|
|
return null;
|
|
}
|
|
return slots.default({
|
|
href: href.value,
|
|
navigate,
|
|
prefetch,
|
|
get route() {
|
|
if (!href.value) {
|
|
return void 0;
|
|
}
|
|
const url = new URL(href.value, "http://localhost");
|
|
return {
|
|
path: url.pathname,
|
|
fullPath: url.pathname,
|
|
get query() {
|
|
return parseQuery(url.search);
|
|
},
|
|
hash: url.hash,
|
|
params: {},
|
|
name: void 0,
|
|
matched: [],
|
|
redirectedFrom: void 0,
|
|
meta: {},
|
|
href: href.value
|
|
};
|
|
},
|
|
rel,
|
|
target,
|
|
isExternal: isExternal.value || hasTarget.value,
|
|
isActive: false,
|
|
isExactActive: false
|
|
});
|
|
}
|
|
return h("a", {
|
|
ref: el,
|
|
href: href.value || null,
|
|
// converts `""` to `null` to prevent the attribute from being added as empty (`href=""`)
|
|
rel,
|
|
target,
|
|
onClick: async (event) => {
|
|
if (isExternal.value || hasTarget.value) {
|
|
return;
|
|
}
|
|
event.preventDefault();
|
|
try {
|
|
const encodedHref = encodeRoutePath(href.value);
|
|
return await (props.replace ? router.replace(encodedHref) : router.push(encodedHref));
|
|
} finally {
|
|
}
|
|
}
|
|
}, slots.default?.());
|
|
};
|
|
}
|
|
});
|
|
}
|
|
const __nuxt_component_0$1 = /* @__PURE__ */ defineNuxtLink(nuxtLinkDefaults);
|
|
function applyTrailingSlashBehavior(to, trailingSlash) {
|
|
const normalizeFn = trailingSlash === "append" ? withTrailingSlash : withoutTrailingSlash;
|
|
const hasProtocolDifferentFromHttp = hasProtocol(to) && !to.startsWith("http");
|
|
if (hasProtocolDifferentFromHttp) {
|
|
return to;
|
|
}
|
|
return normalizeFn(to, true);
|
|
}
|
|
const _imports_0 = "data:image/svg+xml,%3csvg%20t='1770904672074'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='3766'%20width='200'%20height='200'%3e%3cpath%20d='M369.5%20980.9l-81.8-73.6%20354.4-393.8-375-394.7L346.9%2043l445%20468.5z'%20p-id='3767'%3e%3c/path%3e%3c/svg%3e";
|
|
const _imports_1 = publicAssetsURL("/images/移动端/菜单展开logo.png");
|
|
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
__name: "AppHeader",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const route = useRoute();
|
|
const tabList = ref([]);
|
|
const tabActiveKey = ref("home");
|
|
const isShowMobileMenu = ref(false);
|
|
function updateActiveKey() {
|
|
tabActiveKey.value = route.path.split("/")[1] || "home";
|
|
}
|
|
updateActiveKey();
|
|
watch(() => route.path, updateActiveKey);
|
|
tabList.value = [
|
|
{
|
|
name: "首页",
|
|
key: "home",
|
|
path: "/home"
|
|
},
|
|
{
|
|
name: "关于我们",
|
|
key: "about",
|
|
path: "/about"
|
|
},
|
|
{
|
|
name: "业务范围",
|
|
key: "business",
|
|
path: "/business"
|
|
},
|
|
{
|
|
name: "服务案例",
|
|
key: "service",
|
|
path: "/service"
|
|
},
|
|
{
|
|
name: "企业资讯",
|
|
key: "news",
|
|
path: "/news"
|
|
},
|
|
{
|
|
name: "联系我们",
|
|
key: "contact",
|
|
path: "/contact"
|
|
}
|
|
];
|
|
watch(isShowMobileMenu, (newVal) => {
|
|
const body = (void 0).body;
|
|
if (newVal) {
|
|
body.classList.add("overflow-hidden");
|
|
} else {
|
|
body.classList.remove("overflow-hidden");
|
|
}
|
|
});
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NuxtLink = __nuxt_component_0$1;
|
|
_push(`<header${ssrRenderAttrs(mergeProps({
|
|
class: ["fixed top-0 left-0 right-0 bg-white z-[99] shadow-[0_2px_8px_rgba(0,0,0,0.08)] transition-shadow duration-200", { "shadow-[0_4px_12px_rgba(0,0,0,0.12)]": unref(isShowMobileMenu) }]
|
|
}, _attrs))} data-v-0bd92392><div class="h-full layout" data-v-0bd92392><div class="flex items-center justify-between h-14 sm:h-[64px] md:h-[80px] lg:h-[100px] xl:h-[135px]" data-v-0bd92392>`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
to: "/home",
|
|
class: "flex-shrink-0"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`<img${ssrRenderAttr("src", "/images/首页/logo.png")} alt="广西富琳" class="h-[36px] sm:h-[40px] md:h-[44px] lg:h-[48px] xl:h-[52px] w-auto object-contain object-left" data-v-0bd92392${_scopeId}>`);
|
|
} else {
|
|
return [
|
|
createVNode("img", {
|
|
src: "/images/首页/logo.png",
|
|
alt: "广西富琳",
|
|
class: "h-[36px] sm:h-[40px] md:h-[44px] lg:h-[48px] xl:h-[52px] w-auto object-contain object-left"
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`<nav class="hidden lg:flex items-center h-full gap-[24px] xl:gap-[40px]" data-v-0bd92392><!--[-->`);
|
|
ssrRenderList(unref(tabList), (tab) => {
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
key: tab.key,
|
|
to: tab.path,
|
|
class: ["nav-item text-[16px] xl:text-[24px] font-medium text-[#333] hover:text-[#2E75B5] transition-colors", {
|
|
"!text-[#2E75B5] is-active": tab.key === unref(tabActiveKey)
|
|
}],
|
|
onClick: ($event) => tabActiveKey.value = tab.key
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`${ssrInterpolate(tab.name)}`);
|
|
} else {
|
|
return [
|
|
createTextVNode(toDisplayString(tab.name), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
});
|
|
_push(`<!--]--></nav><button type="button" class="p-2 -mr-2 cursor-pointer select-none menu-trigger lg:hidden touch-manipulation" aria-label="菜单" data-v-0bd92392><span class="${ssrRenderClass([{ "menu-icon-open": unref(isShowMobileMenu) }, "inline-flex justify-center items-center transition-transform duration-300 ease-out menu-icon-wrap"])}" data-v-0bd92392><img${ssrRenderAttr("src", `/images/移动端/${unref(isShowMobileMenu) ? "关--闭-(1)" : "菜单"}.png`)} alt="" class="w-[24px] h-[24px] block" data-v-0bd92392></span></button></div></div>`);
|
|
if (unref(isShowMobileMenu)) {
|
|
_push(`<div class="menu-overlay fixed z-[9998] bg-white overflow-auto left-0 right-0 bottom-0 top-14 sm:top-[64px] md:top-[80px]" data-v-0bd92392><div class="layout pt-[24px] pb-[40px] min-h-full" data-v-0bd92392><nav class="flex flex-col menu-nav" data-v-0bd92392><!--[-->`);
|
|
ssrRenderList(unref(tabList), (menu, index) => {
|
|
_push(ssrRenderComponent(_component_NuxtLink, {
|
|
key: menu.key,
|
|
to: menu.path,
|
|
class: "menu-item flex items-center justify-between py-[20px] border-b border-[#E5E5E5] text-[15px] font-medium text-[#303030] active:text-[#2E75B5]",
|
|
style: { "--i": index },
|
|
onClick: ($event) => isShowMobileMenu.value = false
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`<span data-v-0bd92392${_scopeId}>${ssrInterpolate(menu.name)}</span><img class="w-[12px] h-[18px] opacity-60"${ssrRenderAttr("src", _imports_0)} alt="" data-v-0bd92392${_scopeId}>`);
|
|
} else {
|
|
return [
|
|
createVNode("span", null, toDisplayString(menu.name), 1),
|
|
createVNode("img", {
|
|
class: "w-[12px] h-[18px] opacity-60",
|
|
src: _imports_0,
|
|
alt: ""
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent));
|
|
});
|
|
_push(`<!--]--></nav><div class="flex justify-center mt-[40px]" data-v-0bd92392><img class="w-[167px] object-contain"${ssrRenderAttr("src", _imports_1)} alt="" srcset="" data-v-0bd92392></div></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</header>`);
|
|
};
|
|
}
|
|
});
|
|
const _export_sfc = (sfc, props) => {
|
|
const target = sfc.__vccOpts || sfc;
|
|
for (const [key, val] of props) {
|
|
target[key] = val;
|
|
}
|
|
return target;
|
|
};
|
|
const _sfc_setup$4 = _sfc_main$4.setup;
|
|
_sfc_main$4.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/AppHeader.vue");
|
|
return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
|
|
};
|
|
const __nuxt_component_0 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main$4, [["__scopeId", "data-v-0bd92392"]]), { __name: "AppHeader" });
|
|
const defineRouteProvider = (name = "RouteProvider") => defineComponent({
|
|
name,
|
|
props: {
|
|
route: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
vnode: Object,
|
|
vnodeRef: Object,
|
|
renderKey: String,
|
|
trackRootNodes: Boolean
|
|
},
|
|
setup(props) {
|
|
const previousKey = props.renderKey;
|
|
const previousRoute = props.route;
|
|
const route = {};
|
|
for (const key in props.route) {
|
|
Object.defineProperty(route, key, {
|
|
get: () => previousKey === props.renderKey ? props.route[key] : previousRoute[key],
|
|
enumerable: true
|
|
});
|
|
}
|
|
provide(PageRouteSymbol, shallowReactive(route));
|
|
return () => {
|
|
if (!props.vnode) {
|
|
return props.vnode;
|
|
}
|
|
return h(props.vnode, { ref: props.vnodeRef });
|
|
};
|
|
}
|
|
});
|
|
const RouteProvider = defineRouteProvider();
|
|
const __nuxt_component_1 = defineComponent({
|
|
name: "NuxtPage",
|
|
inheritAttrs: false,
|
|
props: {
|
|
name: {
|
|
type: String
|
|
},
|
|
transition: {
|
|
type: [Boolean, Object],
|
|
default: void 0
|
|
},
|
|
keepalive: {
|
|
type: [Boolean, Object],
|
|
default: void 0
|
|
},
|
|
route: {
|
|
type: Object
|
|
},
|
|
pageKey: {
|
|
type: [Function, String],
|
|
default: null
|
|
}
|
|
},
|
|
setup(props, { attrs, slots, expose }) {
|
|
const nuxtApp = useNuxtApp();
|
|
const pageRef = ref();
|
|
inject(PageRouteSymbol, null);
|
|
expose({ pageRef });
|
|
inject(LayoutMetaSymbol, null);
|
|
nuxtApp.deferHydration();
|
|
return () => {
|
|
return h(RouterView, { name: props.name, route: props.route, ...attrs }, {
|
|
default: (routeProps) => {
|
|
return h(Suspense, { suspensible: true }, {
|
|
default() {
|
|
return h(RouteProvider, {
|
|
vnode: slots.default ? normalizeSlot(slots.default, routeProps) : routeProps.Component,
|
|
route: routeProps.route,
|
|
vnodeRef: pageRef
|
|
});
|
|
}
|
|
});
|
|
}
|
|
});
|
|
};
|
|
}
|
|
});
|
|
function normalizeSlot(slot, data) {
|
|
const slotContent = slot(data);
|
|
return slotContent.length === 1 ? h(slotContent[0]) : h(Fragment, void 0, slotContent);
|
|
}
|
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
__name: "AppFooter",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const navList = ref([]);
|
|
const contactInfo = ref({
|
|
phone: "0771-00000000",
|
|
address: {
|
|
city: "广西壮族自治区防城港市",
|
|
detail: "港口区江山大道海港城1栋20楼"
|
|
}
|
|
});
|
|
navList.value = [
|
|
{
|
|
title: "关于我们",
|
|
key: "about",
|
|
data: [
|
|
{ name: "企业简介", key: "about", path: "/about/jj" },
|
|
{ name: "企业荣誉", key: "honor", path: "/about/honor" },
|
|
{ name: "企业价值观", key: "value", path: "/about/value" },
|
|
{
|
|
name: "企业资质与荣誉",
|
|
key: "qualification",
|
|
path: "/about/qualification"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
title: "业务范围",
|
|
key: "business",
|
|
data: [
|
|
{ name: "保洁服务", key: "cleaning", path: "/business/cleaning" },
|
|
{ name: "绿化养护", key: "greening", path: "/business/greening" },
|
|
{ name: "专业消杀", key: "disinfection", path: "/business/disinfection" },
|
|
{ name: "垃圾清理", key: "waste", path: "/business/waste" }
|
|
]
|
|
},
|
|
{
|
|
title: "服务案例",
|
|
key: "service",
|
|
data: [
|
|
{ name: "龙光", key: "lg", path: "/business/cleaning" },
|
|
{ name: "恒大", key: "hd", path: "/business/greening" },
|
|
{ name: "港务局", key: "gwbj", path: "/business/disinfection" },
|
|
{ name: "广旅白沙湾", key: "glbhw", path: "/business/waste" }
|
|
]
|
|
}
|
|
];
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-[#182141] w-full pt-[40px] xl:pt-0" }, _attrs))}><div class="layout"><div class="flex flex-row justify-center xl:border-b-[1px] xl:border-[#353F60] xl:pt-[12px] xl:pb-[10px]"><div class="hidden xl:block mr-[74px]"><img${ssrRenderAttr("src", "/images/首页/map.png")} alt="地图" class="w-[118px] h-[97px]"></div><div class="flex flex-row gap-[20px] xl:gap-[40px] mt-[8px]"><!--[-->`);
|
|
ssrRenderList(unref(navList), (nav) => {
|
|
_push(`<div class="hidden xl:block"><div class="text-[14px] xl:text-[16px] text-[#FFFFFF] font-medium">${ssrInterpolate(nav.title)}</div><div class="flex flex-col gap-[8px] mt-[8px] mb-[10px]"><!--[-->`);
|
|
ssrRenderList(nav.data, (item) => {
|
|
_push(`<div class="text-[#B6B4C0] text-[12px] xl:text-[14px] hover:text-[#2E75B5] cursor-pointer">${ssrInterpolate(item.name)}</div>`);
|
|
});
|
|
_push(`<!--]--></div></div>`);
|
|
});
|
|
_push(`<!--]--><div><div class="flex flex-col items-center xl:items-start"><div class="text-[12px] xl:text-[16px] text-[#FFFFFF] font-medium"> 联系电话 </div><div class="text-[#FEFEFE] text-[14px] xl:text-[16px] font-bold">${ssrInterpolate(unref(contactInfo).phone)}</div></div><div class="flex flex-col justify-center items-center xl:items-start mt-[24px] xl:mt-[17px]"><div class="text-[12px] xl:text-[16px] text-[#FFFFFF] font-medium"> 联系地址 </div><div class="text-[#FEFEFE] text-[12px] xl:text-[16px] font-bold">${ssrInterpolate(unref(contactInfo).address.city)}</div><div class="text-[#FEFEFE] text-[12px] xl:text-[16px] font-bold">${ssrInterpolate(unref(contactInfo).address.detail)}</div></div></div></div></div><div class="text-[11px] xl:text-[14px] text-[#B6B4C0] text-center pb-[40px] pt-[40px] xl:pt-[12px] xl:pb-[12px]"> Copyright©2018 www.xxxxxxxxxx.com <br class="xl:hidden">All Rights Reserved ICP备 </div></div></div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup$3 = _sfc_main$3.setup;
|
|
_sfc_main$3.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/AppFooter.vue");
|
|
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
|
};
|
|
const __nuxt_component_5 = Object.assign(_sfc_main$3, { __name: "AppFooter" });
|
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
__name: "app",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const route = useRoute();
|
|
const isHomePage = computed(() => route.path === "/" || route.path === "/home");
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_AppHeader = __nuxt_component_0;
|
|
const _component_NuxtPage = __nuxt_component_1;
|
|
const _component_AppFooter = __nuxt_component_5;
|
|
_push(`<!--[-->`);
|
|
_push(ssrRenderComponent(_component_AppHeader, null, null, _parent));
|
|
_push(ssrRenderComponent(_component_NuxtPage, { class: "mt-[56px] sm:mt-[64px] md:mt-[80px] lg:mt-[100px] xl:mt-[135px]" }, null, _parent));
|
|
if (!unref(isHomePage)) {
|
|
_push(ssrRenderComponent(_component_AppFooter, null, null, _parent));
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`<!--]-->`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup$2 = _sfc_main$2.setup;
|
|
_sfc_main$2.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("app.vue");
|
|
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
|
};
|
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
__name: "error",
|
|
__ssrInlineRender: true,
|
|
props: {
|
|
error: {}
|
|
},
|
|
setup(__props) {
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_NuxtLink = __nuxt_component_0$1;
|
|
_push(`<div${ssrRenderAttrs(_attrs)}><h1>${ssrInterpolate(__props.error.status)}</h1>`);
|
|
_push(ssrRenderComponent(_component_NuxtLink, { to: "/" }, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`Go back home`);
|
|
} else {
|
|
return [
|
|
createTextVNode("Go back home")
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup$1 = _sfc_main$1.setup;
|
|
_sfc_main$1.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("error.vue");
|
|
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
|
};
|
|
const _sfc_main = {
|
|
__name: "nuxt-root",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const IslandRenderer = () => null;
|
|
const nuxtApp = useNuxtApp();
|
|
nuxtApp.deferHydration();
|
|
nuxtApp.ssrContext.url;
|
|
const SingleRenderer = false;
|
|
provide(PageRouteSymbol, useRoute());
|
|
nuxtApp.hooks.callHookWith((hooks) => hooks.map((hook) => hook()), "vue:setup");
|
|
const error = /* @__PURE__ */ useError();
|
|
const abortRender = error.value && !nuxtApp.ssrContext.error;
|
|
onErrorCaptured((err, target, info) => {
|
|
nuxtApp.hooks.callHook("vue:error", err, target, info).catch((hookError) => console.error("[nuxt] Error in `vue:error` hook", hookError));
|
|
{
|
|
const p = nuxtApp.runWithContext(() => showError(err));
|
|
onServerPrefetch(() => p);
|
|
return false;
|
|
}
|
|
});
|
|
const islandContext = nuxtApp.ssrContext.islandContext;
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
ssrRenderSuspense(_push, {
|
|
default: () => {
|
|
if (unref(abortRender)) {
|
|
_push(`<div></div>`);
|
|
} else if (unref(error)) {
|
|
_push(ssrRenderComponent(unref(_sfc_main$1), { error: unref(error) }, null, _parent));
|
|
} else if (unref(islandContext)) {
|
|
_push(ssrRenderComponent(unref(IslandRenderer), { context: unref(islandContext) }, null, _parent));
|
|
} else if (unref(SingleRenderer)) {
|
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(unref(SingleRenderer)), null, null), _parent);
|
|
} else {
|
|
_push(ssrRenderComponent(unref(_sfc_main$2), null, null, _parent));
|
|
}
|
|
},
|
|
_: 1
|
|
});
|
|
};
|
|
}
|
|
};
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/nuxt@4.3.1_@parcel+watcher@2.5.6_@vue+compiler-sfc@3.5.28_cac@6.7.14_db0@0.3.4_ioredis@5.9.2__ijvbathwszhr3p54nzzm6w35uu/node_modules/nuxt/dist/app/components/nuxt-root.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
let entry;
|
|
{
|
|
entry = async function createNuxtAppServer(ssrContext) {
|
|
const vueApp = createApp(_sfc_main);
|
|
const nuxt = createNuxtApp({ vueApp, ssrContext });
|
|
try {
|
|
await applyPlugins(nuxt, plugins);
|
|
await nuxt.hooks.callHook("app:created", vueApp);
|
|
} catch (error) {
|
|
await nuxt.hooks.callHook("app:error", error);
|
|
nuxt.payload.error ||= createError(error);
|
|
}
|
|
if (ssrContext && (ssrContext["~renderResponse"] || ssrContext._renderResponse)) {
|
|
throw new Error("skipping render");
|
|
}
|
|
return vueApp;
|
|
};
|
|
}
|
|
const entry_default = ((ssrContext) => entry(ssrContext));
|
|
|
|
export { _export_sfc as _, __nuxt_component_5 as a, useRouter as b, useNuxtApp as c, asyncDataDefaults as d, entry_default as default, createError as e, navigateTo as n, useRoute as u };
|
|
//# sourceMappingURL=server.mjs.map
|