mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-07 13:18:16 +00:00
perf: 优化app新版本提示
This commit is contained in:
parent
5962a593da
commit
65c398880b
@ -62,6 +62,7 @@ export default {
|
|||||||
routePath: null,
|
routePath: null,
|
||||||
appInter: null,
|
appInter: null,
|
||||||
countDown: Math.min(30, 60 - $A.daytz().second()),
|
countDown: Math.min(30, 60 - $A.daytz().second()),
|
||||||
|
lastCheckUpgradeYmd: $A.daytz().format('YYYY-MM-DD')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -331,6 +332,10 @@ export default {
|
|||||||
this.autoTheme()
|
this.autoTheme()
|
||||||
$A.updateTimezone()
|
$A.updateTimezone()
|
||||||
$A.IDBTest()
|
$A.IDBTest()
|
||||||
|
if (this.lastCheckUpgradeYmd != $A.daytz().format('YYYY-MM-DD')) {
|
||||||
|
this.lastCheckUpgradeYmd = $A.daytz().format('YYYY-MM-DD')
|
||||||
|
$A.eeuiAppCheckUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 页面失活
|
// 页面失活
|
||||||
window.__onPagePause = () => {
|
window.__onPagePause = () => {
|
||||||
@ -434,8 +439,12 @@ export default {
|
|||||||
// 取消长按振动
|
// 取消长按振动
|
||||||
$A.eeuiAppSetHapticBackEnabled(false)
|
$A.eeuiAppSetHapticBackEnabled(false)
|
||||||
// 设置语言
|
// 设置语言
|
||||||
$A.eeuiAppSetVariate("languageWebBrowser", this.$L("浏览器打开"))
|
$A.eeuiAppSetCachesString("languageWebBrowser", this.$L("浏览器打开"))
|
||||||
$A.eeuiAppSetVariate("languageWebRefresh", this.$L("刷新"))
|
$A.eeuiAppSetCachesString("languageWebRefresh", this.$L("刷新"))
|
||||||
|
$A.eeuiAppSetCachesString("updateDefaultTitle", this.$L("发现新版本"))
|
||||||
|
$A.eeuiAppSetCachesString("updateDefaultContent", this.$L("暂无更新介绍!"))
|
||||||
|
$A.eeuiAppSetCachesString("updateDefaultCancelText", this.$L("以后再说"))
|
||||||
|
$A.eeuiAppSetCachesString("updateDefaultUpdateText", this.$L("立即更新"))
|
||||||
},
|
},
|
||||||
|
|
||||||
otherEvents() {
|
otherEvents() {
|
||||||
|
|||||||
14
resources/assets/js/functions/eeui.js
vendored
14
resources/assets/js/functions/eeui.js
vendored
@ -156,6 +156,14 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 检查更新
|
||||||
|
eeuiAppCheckUpdate() {
|
||||||
|
if (!$A.isEEUiApp) return;
|
||||||
|
$A.eeuiModule("eeui").then(obj => {
|
||||||
|
obj.checkUpdate();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 获取主题名称 light|dark
|
// 获取主题名称 light|dark
|
||||||
eeuiAppGetThemeName() {
|
eeuiAppGetThemeName() {
|
||||||
if (!$A.isEEUiApp) return;
|
if (!$A.isEEUiApp) return;
|
||||||
@ -174,6 +182,12 @@
|
|||||||
$A.eeuiModuleSync("eeui").setVariate(key, value);
|
$A.eeuiModuleSync("eeui").setVariate(key, value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 设置缓存数据
|
||||||
|
eeuiAppSetCachesString(key, value, expired = 0) {
|
||||||
|
if (!$A.isEEUiApp) return;
|
||||||
|
$A.eeuiModuleSync("eeui").setCachesString(key, value, expired);
|
||||||
|
},
|
||||||
|
|
||||||
// 长按内容震动(仅支持android、iOS无效)
|
// 长按内容震动(仅支持android、iOS无效)
|
||||||
eeuiAppSetHapticBackEnabled(val) {
|
eeuiAppSetHapticBackEnabled(val) {
|
||||||
if (!$A.isEEUiApp) return;
|
if (!$A.isEEUiApp) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user