diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue index 6f4dbbc4c..0d4ca65e3 100755 --- a/resources/assets/js/App.vue +++ b/resources/assets/js/App.vue @@ -290,6 +290,7 @@ export default { // APP进入前台 window.__onAppActive = () => { this.autoTheme() + $A.IDBTest() } // 页面失活 window.__onPagePause = () => { diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index ae7b64037..e7c1ca73f 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -541,7 +541,7 @@ const localforage = require("localforage"); if (height !== tmpHeight || width !== tmpWidth) { height = tmpHeight; width = tmpWidth; - console.log(width, height); + $A.openLog && console.log(width, height); if (typeof callback === 'function') callback(); } }, 250); @@ -1371,6 +1371,17 @@ const localforage = require("localforage"); $.extend({ __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) { if (typeof this.__IDBTimer[key] !== "undefined") { clearTimeout(this.__IDBTimer[key]) diff --git a/resources/assets/sass/pages/page-messenger.scss b/resources/assets/sass/pages/page-messenger.scss index 402d74567..5d717d6cb 100644 --- a/resources/assets/sass/pages/page-messenger.scss +++ b/resources/assets/sass/pages/page-messenger.scss @@ -224,6 +224,7 @@ .ivu-tag { margin: 0 4px 0 0; padding: 0 5px; + box-sizing: content-box; &.ivu-tag-success { padding: 0 6px; }