Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上拉下拉时回调函数会执行多次 #2

Open
songshuzhong opened this issue Feb 20, 2019 · 2 comments
Open

上拉下拉时回调函数会执行多次 #2

songshuzhong opened this issue Feb 20, 2019 · 2 comments

Comments

@songshuzhong
Copy link

No description provided.

@javaLuo
Copy link
Owner

javaLuo commented Feb 20, 2019

你好,
我试了一下,貌似没发现这个问题。
能贴一下你的代码吗,或者可以检查一下代码里面是不是什么地方多次改变了数据

@songshuzhong
Copy link
Author

renderContentItem(contentList) {
    return contentList.map(item =>
        <li key={item.vId}>
            <div className="v-p-b-content">
                <span className={this.renderStatusColor(item.status)}>{item.status}</span>
                <img src={item.coverUrl} alt="" onClick={() => this.gotoLandingPage(item.vId)} />
                <span className="v-p-b-c-time-length">{this.formatSecond(item.duration)}</span>
                <div className="content-index">
                    <p className="v-p-b-c-title">{item.title}</p>
                    <div className="v-p-b-c-item">
                        <span>{this.formatDate(item.releaseTime)}</span>
                        <Button className="v-p-b-time" size="mini" icon="more" onClick={() => this.props.showMenuList(true)}/>
                    </div>
                </div>
            </div>
            { 0? <div className="audit-msg">与百家号<a target="_blank" href="">&nbsp;已有文章&nbsp;</a>高度相似。</div>: null }
            { this.renderRejectReason(item.status, item.rejectReason) }
            { this.renderMoreInfo(item) }
        </li>
    );
}

render() {
return(


<ReactIScroll
id='iScroll'
backgroundColor='#ECF6FD'
fontColor='#2E40C1'
onPullDownRefresh={() => this.updateContentList()}
onPullUpLoadMore={() => this.retrieveMoreContentList()}
options={{backgroundColor: 'white'}}>

    {
    contentList? this.renderContentItem(contentList): null
    }



);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants