mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 03:52:50 +00:00
perf: 优化iOS端数据读取失败的情况
This commit is contained in:
parent
4038d9560f
commit
d34d94faa6
@ -290,6 +290,7 @@ export default {
|
|||||||
// APP进入前台
|
// APP进入前台
|
||||||
window.__onAppActive = () => {
|
window.__onAppActive = () => {
|
||||||
this.autoTheme()
|
this.autoTheme()
|
||||||
|
$A.IDBTest()
|
||||||
}
|
}
|
||||||
// 页面失活
|
// 页面失活
|
||||||
window.__onPagePause = () => {
|
window.__onPagePause = () => {
|
||||||
|
|||||||
13
resources/assets/js/functions/common.js
vendored
13
resources/assets/js/functions/common.js
vendored
@ -541,7 +541,7 @@ const localforage = require("localforage");
|
|||||||
if (height !== tmpHeight || width !== tmpWidth) {
|
if (height !== tmpHeight || width !== tmpWidth) {
|
||||||
height = tmpHeight;
|
height = tmpHeight;
|
||||||
width = tmpWidth;
|
width = tmpWidth;
|
||||||
console.log(width, height);
|
$A.openLog && console.log(width, height);
|
||||||
if (typeof callback === 'function') callback();
|
if (typeof callback === 'function') callback();
|
||||||
}
|
}
|
||||||
}, 250);
|
}, 250);
|
||||||
@ -1371,6 +1371,17 @@ const localforage = require("localforage");
|
|||||||
$.extend({
|
$.extend({
|
||||||
__IDBTimer: {},
|
__IDBTimer: {},
|
||||||
|
|
||||||
|
async IDBTest() {
|
||||||
|
try {
|
||||||
|
if ($A.isIos()) {
|
||||||
|
await localforage.setItem('__test__', $A.Time())
|
||||||
|
}
|
||||||
|
$A.openLog && console.log('IDBTest OK',)
|
||||||
|
} catch (error) {
|
||||||
|
$A.openLog && console.error('IDBTest Error: ', error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
IDBSave(key, value, delay = 100) {
|
IDBSave(key, value, delay = 100) {
|
||||||
if (typeof this.__IDBTimer[key] !== "undefined") {
|
if (typeof this.__IDBTimer[key] !== "undefined") {
|
||||||
clearTimeout(this.__IDBTimer[key])
|
clearTimeout(this.__IDBTimer[key])
|
||||||
|
|||||||
@ -224,6 +224,7 @@
|
|||||||
.ivu-tag {
|
.ivu-tag {
|
||||||
margin: 0 4px 0 0;
|
margin: 0 4px 0 0;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
|
box-sizing: content-box;
|
||||||
&.ivu-tag-success {
|
&.ivu-tag-success {
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user