From a604ca39d9def3259299ec95da041bdc36d99227 Mon Sep 17 00:00:00 2001 From: cjw <792430652@qq.com> Date: Mon, 16 Feb 2026 01:35:58 +0800 Subject: [PATCH] deving --- static/history.js | 22 ++++++++++++++++++++++ templates/history.html | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/static/history.js b/static/history.js index 0b8dc3c..801b2e3 100644 --- a/static/history.js +++ b/static/history.js @@ -166,4 +166,26 @@ function formatFileSize(bytes) { const sizes = ['Bytes', 'KB', 'MB', 'GB']; const i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i]; +} + +// 跳转到上传页面 +async function goToUpload() { + try { + // 上传页面需要GET请求,直接跳转 + window.location.href = '/'; + } catch (error) { + console.error('跳转失败:', error); + window.location.href = '/'; + } +} + +// 跳转到主页 +async function goToHome() { + try { + // 主页需要GET请求,直接跳转 + window.location.href = '/'; + } catch (error) { + console.error('跳转失败:', error); + window.location.href = '/'; + } } \ No newline at end of file diff --git a/templates/history.html b/templates/history.html index 8e82a5b..ead0b6b 100644 --- a/templates/history.html +++ b/templates/history.html @@ -185,10 +185,10 @@
查看所有上传的STP文件分析记录