| | |
| | | import {Component} from 'react' |
| | | import { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | |
| | | import Api from '@/api' |
| | |
| | | } |
| | | |
| | | loading = false |
| | | loadTimer = null |
| | | |
| | | state = { |
| | | BID: '' |
| | |
| | | } |
| | | |
| | | if (config.setting.onload !== 'false') { |
| | | setTimeout(() => { |
| | | this.loadData() |
| | | }, config.setting.delay) |
| | | this.loadData() |
| | | } else { |
| | | MKEmitter.addListener('initFinish', this.initFinish) |
| | | } |
| | |
| | | if (config.MenuID !== MenuID) return |
| | | |
| | | if (config.setting.onload === 'false') { |
| | | setTimeout(() => { |
| | | this.loadData() |
| | | }, config.setting.delay) |
| | | this.loadData() |
| | | } |
| | | } |
| | | |
| | |
| | | this.loadData() |
| | | } |
| | | |
| | | async loadData () { |
| | | loadData = () => { |
| | | const { config } = this.props |
| | | |
| | | this.loadTimer && clearTimeout(this.loadTimer) |
| | | |
| | | this.loadTimer = setTimeout(() => { |
| | | this.execLoadData() |
| | | }, config.setting.delay) |
| | | } |
| | | |
| | | async execLoadData () { |
| | | const { config } = this.props |
| | | const { BID } = this.state |
| | | |