From 5e1d4d5155c57c43739d61914e2d29a64f9bb683 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 17:40:38 +0800 Subject: [PATCH] Merge branch 'develop' --- src/tabviews/custom/components/card/prop-card/index.jsx | 22 +++++++++++++--------- 1 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index f8dcefe..f114efa 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -55,7 +55,7 @@ _data = window.GLOB.SyncData.get(_config.dataName) || [] if (_config.$cache) { - Api.writeCacheConfig(_config.uuid, fromJS(_data).toJS()) + Api.writeCacheConfig(_config.uuid, fromJS(_data).toJS(), BID) } _config.setting.sync = 'false' @@ -172,13 +172,13 @@ } initExec = () => { - const { config, selected, data } = this.state + const { config, selected, data, BID } = this.state if (config.wrap.datatype === 'dynamic') { if (config.$cache) { if (config.$time) { if (!this.loaded) { - Api.getLCacheConfig(config.uuid, config.$time).then(res => { + Api.getLCacheConfig(config.uuid, config.$time, BID).then(res => { if (!res.valid && config.setting.onload === 'true') { setTimeout(() => { this.loadData('init') @@ -190,7 +190,11 @@ let _data = res.data[0] || {$$empty: true} _data.$$uuid = _data[config.setting.primaryKey] || '' - this.setState({data: _data}) + this.setState({data: _data}, () => { + if (selected !== 'false') { + this.checkTopLine() + } + }) }) } else { if (config.wrap.goback === 'true' && data.$$empty) { @@ -208,7 +212,7 @@ } } else { if (!this.loaded) { - Api.getLCacheConfig(config.uuid, 0).then(res => { + Api.getLCacheConfig(config.uuid, 0, BID).then(res => { if (!res.data || this.loaded) return let _data = res.data[0] || {$$empty: true} @@ -276,12 +280,12 @@ } if (config.$cache && config.$time && config.wrap.autoExec) { - Api.getLCacheConfig(config.uuid, config.$time).then(res => { + Api.getLCacheConfig(config.uuid, config.$time, BID).then(res => { if (res.valid) return this.autoExec() - Api.writeCacheConfig(config.uuid, []) + Api.writeCacheConfig(config.uuid, [], BID) }) } else { this.autoExec() @@ -299,7 +303,7 @@ let _data = window.GLOB.SyncData.get(config.dataName) || [] if (config.$cache) { - Api.writeCacheConfig(config.uuid, fromJS(_data).toJS()) + Api.writeCacheConfig(config.uuid, fromJS(_data).toJS(), BID) } _data = _data[0] || {$$empty: true} @@ -533,7 +537,7 @@ this.loaded = true if (config.$cache && type === 'init') { - Api.writeCacheConfig(config.uuid, result.data || []) + Api.writeCacheConfig(config.uuid, result.data || [], BID) } if (!result.data || !result.data[0]) { -- Gitblit v1.8.0