king
2022-08-15 794fea9181a6987c51e8621ef9e9bcfee586c620
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