king
2023-08-23 53b68578c161561700bd77759629daa1608e05ca
src/tabviews/custom/components/code/sand-box/index.jsx
@@ -48,7 +48,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'
@@ -106,13 +106,13 @@
  }
  initExec = () => {
    const { config } = this.state
    const { config, BID } = this.state
    if (config.wrap.datatype !== 'static') {
      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')
@@ -130,7 +130,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
      
              this.setState({data: res.data}, () => {
@@ -160,14 +160,14 @@
  }
  transferSyncData = (syncId) => {
    const { config } = this.state
    const { config, BID } = this.state
    if (config.$syncId !== syncId) return
    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)
    }
    if (!is(fromJS(this.state.data), fromJS(_data))) {
@@ -243,7 +243,7 @@
      this.loaded = true
      if (config.$cache && type === 'init') {
        Api.writeCacheConfig(config.uuid, result.data || [])
        Api.writeCacheConfig(config.uuid, result.data || [], BID)
      }
      if (!is(fromJS(this.state.data), fromJS(_data))) {