feat: 更新蓝牙体重秤小程序页面,新增PRD文档,移除启动脚本
This commit is contained in:
@@ -75,14 +75,6 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica
|
||||
<img id="lightbox-img" src="" alt="放大预览">
|
||||
</div>
|
||||
<script>
|
||||
/* ===== file:// 协议 → 自动跳转到本地服务器 ===== */
|
||||
(function() {
|
||||
if (location.protocol === 'file:') {
|
||||
var search = location.search; /* 保留 ?file=...&title=... 参数 */
|
||||
location.href = 'http://localhost:8080/_templates/md-viewer.html' + search;
|
||||
}
|
||||
})();
|
||||
|
||||
const params = new URLSearchParams(location.search);
|
||||
const filePath = params.get('file');
|
||||
const title = params.get('title');
|
||||
@@ -242,7 +234,7 @@ if (filePath) {
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
document.getElementById('content').innerHTML = '<div class="loading error">❌ 加载失败:' + err.message + '<br><small style="color:var(--text-placeholder);margin-top:8px;display:block">📁 文件路径:' + filePath + '<br>🔗 请求地址:' + fetchUrl + '<br>💡 请确认服务器已启动(双击 启动服务器.bat),且文件路径正确</small></div>';
|
||||
document.getElementById('content').innerHTML = '<div class="loading error">❌ 加载失败:' + err.message + '<br><small style="color:var(--text-placeholder);margin-top:8px;display:block">📁 文件路径:' + filePath + '<br>🔗 请求地址:' + fetchUrl + '</small></div>';
|
||||
});
|
||||
} else {
|
||||
document.getElementById('content').innerHTML = '<div class="loading">未指定文件路径</div>';
|
||||
|
||||
Reference in New Issue
Block a user