fix: 修复文旅订单班资源路径和交互功能

详细说明:
- 修复app.js路由,支持/order-class/wenlu/*.html格式访问
- 修复所有子页面的资源路径(js/css/data从../改为相对路径)
- 为index.html添加图片点击放大查看功能
- 为精彩瞬间Gallery区域所有图片添加点击放大功能
- 优化展馆布置图尺寸,限制最大高度为600px
- 修复文件: budget.html, exhibition.html, marketing.html, operation.html, overview.html, risk.html, index.html
- 影响模块: 文旅订单班展示系统,路由系统,图片交互

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yep_Q
2025-10-09 12:00:43 +08:00
parent cb9d459db4
commit 60216833a0
8 changed files with 110 additions and 65 deletions

View File

@@ -19,9 +19,6 @@ const app = express();
const PORT = config.server.port || 4155;
// 静态文件服务
app.use('/css', express.static('css'));
app.use('/js', express.static('js'));
app.use('/data', express.static('data'));
app.use('/order-classes', express.static('order-classes'));
// 为所有订单班提供独立的静态文件服务
@@ -56,7 +53,20 @@ app.get('/', (req, res) => {
}
});
// 处理 /order-class/*.html 形式的请求wenlu 子页面)- 必须放在前面
// 处理 /order-class/wenlu/*.html 形式的请求
app.get('/order-class/wenlu/:page', (req, res) => {
const page = req.params.page;
const filePath = path.join(__dirname, 'order-classes', 'wenlu', page);
if (fs.existsSync(filePath)) {
let html = fs.readFileSync(filePath, 'utf8');
res.send(html);
} else {
res.status(404).send(generate404Page(`wenlu/${page}`));
}
});
// 处理 /order-class/*.html 形式的请求wenlu 子页面)- 兼容旧路径
app.get('/order-class/:page', (req, res, next) => {
const page = req.params.page;
// 只处理 .html 文件