feat:修改样式和去除多余的清理内存方式

This commit is contained in:
zheng020 2026-07-31 17:07:01 +08:00
parent 407ca10dce
commit d9e3ff9eae
7 changed files with 20 additions and 77 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 699 B

View File

@ -25,9 +25,6 @@
import {
onDeepLinkTo
} from '@/utils/scanLaunch.js'
import {
clearAllSandboxTmpFiles
} from '@/utils/ioPath.js'
// storage key
const HIDE_TIME_KEY = "app_last_hide_time";
@ -158,16 +155,10 @@
console.warn('[preload] init failed:', e.message)
}
// : doc/<>/tmp/ ()
// fire-and-forget, onLaunch
// #ifdef APP-PLUS
clearAllSandboxTmpFiles().catch((e) => {
console.warn('[App] clearAllSandboxTmpFiles failed:', e?.message)
})
// #endif
// upgrade-popup.vue:_downloads/upgrade_*.wgt
this.cleanupUpgradePackages();
// 2026-07-31 App.vue
// - doc/<>/tmp/ " "
// - _downloads/upgrade_*.{wgt,apk,ipa}" "
// upgrade-popup#cleanupAfterInstall
this.setPermissions();
@ -284,62 +275,6 @@
const globalSocket = getGlobalSocket();
globalSocket.closeAll();
},
/**
* 清理历史下载的更新包_downloads/upgrade_*.{wgt,apk,ipa}
* - uni-upgrade-center-app 插件的 plus.downloader 默认把包放在 _downloads/upgrade_${ts}.{wgt|apk}
* - 升级弹窗关闭/下载中断/未点击安装时,这些临时包不会自动清理,会持续累积
* - 已通过 saveFile() 持久化的包在 _doc/ 目录下(路径不同),由升级弹窗 checkLocalStoragePackage 控制
*
* 各平台实际会产生哪些文件:
* - Android 整包更新 .apk
* - Android wgt 热更新 .wgt
* - iOS wgt 热更新 .wgt (iOS 整包 (ipa) App Store,不下载本地)
* - ipa 加入正则仅作防御:防止后端配置错误/silent update 误推到本地
*
* 启动期清理一次即可(App 正常运行期间只要不离 _downloads/ 目录就不会有新遗留)
* APP-PLUS 有效
*/
cleanupUpgradePackages() {
// #ifdef APP-PLUS
try {
const dirUrl = plus.io.convertLocalFileSystemURL("_downloads/");
plus.io.resolveLocalFileSystemURL(
dirUrl,
(dirEntry) => {
const reader = dirEntry.createReader();
reader.readEntries(
(entries) => {
entries.forEach((entry) => {
// : uni-upgrade-center-app/pages/upgrade-popup.vue:_downloads/upgrade_${Date.now()}.{wgt|apk}
// ipa ,
if (!/^upgrade_\d+\.(wgt|apk|ipa)$/i.test(entry.name)) return;
entry.remove(
() => {},
(e) =>
console.warn(
"[UPGRADE-CLEANUP] 删包失败:",
entry.fullPath,
e?.message,
),
);
});
},
(e) =>
console.warn(
"[UPGRADE-CLEANUP] 枚举 _downloads 失败:",
e?.message,
),
);
},
() => {
// _downloads (),
},
);
} catch (e) {
console.warn("[UPGRADE-CLEANUP] 初始化失败:", e?.message);
}
// #endif
},
/**
* 处理"从后台切回前台"事件
* 通过 storage 中的上次隐藏时间判断本次 onShow 是否由后台返回触发
@ -644,17 +579,25 @@
font-display: swap;
}
/* 引入 ZaoZiGongFangJianHei-1 字体 */
/* JDLTYuanTiJian
*
* OSS 上的 JDLTYuanTiJian.ttf 存在 7 OpenType 规范违规表未 4 字节对齐
* cmap format4 子表 length 2 字节loca 缺哨兵glyf 尾部混入填充垃圾等
* Android WebView OTS 校验器拒绝解码控制台报
* "OTS parsing error: cmap: misaligned table"字体静默回退到系统字体
*
* 已用 frontend/scripts/fix-broken-ttf.py 修复并转为 woff23.57MB -> 2.01MB
* 产物通过 ots-sanitize 0 error / 0 warning 校验字形轮廓与原字体完全一致
* 改为本地加载免去首屏网络下载且不再依赖 OSS
*/
@font-face {
font-family: "JDLTYuanTiJian";
src: url("/static/fonts/JDLTYuanTiJian.ttf") format("truetype");
src: url("/static/fonts/JDLTYuanTiJian.woff2") format("woff2");
font-weight: normal;
font-style: normal;
font-display: swap;
}
/* 圆体 JDLTYuanTiJian.ttf 在部分 Android WebView 上报 OTS/cmap 解析失败,暂不 @font-face 加载,避免控制台告警与渲染异常 */
/* 全局字体设置 */
body {
font-family:

View File

@ -23,7 +23,7 @@
</html>
<style>
html,body,#app,page{
html,body,#app,uni-app,uni-page,page{
height: 100%;
overscroll-behavior: none;/* 阻止系统橡皮筋 */
-webkit-overflow-scrolling: auto;

View File

@ -167,12 +167,12 @@ function formatDate(ts) {
display: flex;
align-items: center;
height: 88rpx;
padding: 0 24rpx;
/* padding: 0 24rpx; */
color: #fff;
position: relative;
top: 96rpx;
top: 80rpx;
z-index: 1;
margin-bottom: 24rpx;
/* margin-bottom: 24rpx; */
}
.nav-back {

Binary file not shown.