king
2022-08-15 794fea9181a6987c51e8621ef9e9bcfee586c620
2022-08-15
2个文件已修改
41 ■■■■■ 已修改文件
src/tabviews/custom/components/card/prop-card/index.jsx 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/timeline/normal-timeline/index.jsx 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/custom/components/card/prop-card/index.jsx
@@ -117,7 +117,7 @@
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
      } else if ((!_sync || _config.wrap.priKeyType === 'static') && selected !== 'false') {
      } else if (!_sync && selected !== 'false') {
        setTimeout(() => {
          this.checkTopLine()
        }, 200)
@@ -168,7 +168,7 @@
      _data.$$uuid = _data[config.setting.primaryKey] || ''
      this.setState({sync: false, data: _data}, () => {
        if (config.wrap.priKeyType !== 'static' && selected !== 'false') {
        if (selected !== 'false') {
          setTimeout(() => {
            this.checkTopLine()
          }, 200)
@@ -368,7 +368,7 @@
        data: _data,
        loading: false
      }, () => {
        if (config.wrap.priKeyType !== 'static' && selected !== 'false') {
        if (selected !== 'false') {
          this.checkTopLine()
        }
      })
src/tabviews/custom/components/timeline/normal-timeline/index.jsx
@@ -240,6 +240,11 @@
      return
    }
    // if (config.setting.interType === 'inner' && config.setting.innerFunc === 'z_mk_express') {
    //   this.getExpress()
    //   return
    // }
    this.setState({
      loading: true
    })
@@ -272,6 +277,36 @@
    }
  }
  getExpress = () => {
    this.setState({
      loading: true
    })
    Api.wxNginxRequest(`express/yuantong/YT6590674317601`, 'get').then(res => {
      if (!res || typeof(res) !== 'string') {
        notification.error({
          top: 92,
          message: '未获取到快递信息',
          duration: 10
        })
      } else {
        let data = res.split(/\n/).filter(Boolean)
        data = data.map((item, i) => {
          return {
            $Index: i,
            date: item.substr(0, 19),
            content: item.substr(20)
          }
        })
        this.setState({
          data: data,
          loading: false
        })
      }
    })
  }
  getnodes = (data) => {
    const { config, card } = this.state