no message

This commit is contained in:
kuaifan
2025-07-30 21:25:04 +08:00
parent 1b242dc04e
commit a437e3cbd3
3 changed files with 22 additions and 1 deletions

View File

@@ -612,11 +612,13 @@ export default {
if (!this.$isEEUIApp) {
return;
}
$A.eeuiAppHideWebviewSnapshot()
// APP进入前台
window.__onAppActive = () => {
this.autoTheme()
$A.updateTimezone()
$A.IDBTest()
$A.eeuiAppHideWebviewSnapshot()
this.$store.dispatch("safeAreaInsets")
const nowYmd = $A.daytz().format('YYYY-MM-DD')
if (this.lastCheckUpgradeYmd != nowYmd) {
@@ -624,6 +626,10 @@ export default {
$A.eeuiAppCheckUpdate();
}
}
// APP进入后台
window.__onAppDeactive = () => {
$A.eeuiAppGetWebviewSnapshot(ok => ok && $A.eeuiAppShowWebviewSnapshot());
}
// 页面失活
window.__onPagePause = () => {
this.$store.state.windowActive = false;

View File

@@ -121,6 +121,21 @@ import {languageName} from "../language";
$A.eeuiModule("webview")?.setUrl(url);
},
// 生成webview快照
eeuiAppGetWebviewSnapshot(callback) {
$A.eeuiModule("webview")?.createSnapshot(callback);
},
// 显示webview快照
eeuiAppShowWebviewSnapshot() {
$A.eeuiModule("webview")?.showSnapshot();
},
// 隐藏webview快照
eeuiAppHideWebviewSnapshot() {
$A.eeuiModule("webview")?.hideSnapshot();
},
// 扫码
eeuiAppScan(callback) {
$A.eeuiModule()?.openScaner({}, (res) => {