diff --git a/mini/src/layout/thread/comment/index.jsx b/mini/src/layout/thread/comment/index.jsx index d616ada60f26b5a10a5ce321df2e786091bd1f9a..2fda37120080445d979ef44ba2f5f8b5c58c53c2 100644 --- a/mini/src/layout/thread/comment/index.jsx +++ b/mini/src/layout/thread/comment/index.jsx @@ -611,21 +611,20 @@ class CommentH5Page extends React.Component { + {isReady && ( {/* 评论区触发 */} - {this.props.site.webConfig.setSite.siteComment[2].value && ( - this.onInputClick()}> - - - )} + this.onInputClick()}> + + {/* 操作区 */} diff --git a/mini/src/layout/thread/components/comment-list/index.jsx b/mini/src/layout/thread/components/comment-list/index.jsx index 1e6b9d1ab9133dfce5f78a11a47716dd9c1a8620..3700a1ebc0fa61036baeab08c3b3d2df98d8e3b0 100644 --- a/mini/src/layout/thread/components/comment-list/index.jsx +++ b/mini/src/layout/thread/components/comment-list/index.jsx @@ -221,18 +221,14 @@ class CommentList extends React.Component { {!isApproved ? 审核中 : } {/* 评论内容 */} - {site.webConfig.setSite.siteComment[2].value && ( - <> - - this.toCommentDetail()} - useShowMore={!!this.state.isShowOne} - content={this.props?.data?.content} - customHoverBg - > - - - )} + + this.toCommentDetail()} + useShowMore={!!this.state.isShowOne} + content={this.props?.data?.content} + customHoverBg + > + {/* { + console.log('readThreadPoster222222222222') console.log(res) this.setState({ loading:false, diff --git a/web/components/q-poster-s/pc/index.jsx b/web/components/q-poster-s/pc/index.jsx index 9de15c34fa4962090a63bfc15ab036b9ad0e54fd..8dc1fd4be46f7c1ea971e3efe06ec800e920f131 100644 --- a/web/components/q-poster-s/pc/index.jsx +++ b/web/components/q-poster-s/pc/index.jsx @@ -24,14 +24,15 @@ class Index extends React.Component { page: 1 }, }).then((res) => { - console.log(res) + console.log('readThreadPoster222222') + console.log(res) this.setState({ loading:false, list:res.data.pageData }) }); console.log('readThreadPoster') - console.log(this.state.list) + } gothead = (tid) => { Router.push({url: `/thread/${tid}`}); diff --git a/web/layout/thread/pc/index.jsx b/web/layout/thread/pc/index.jsx index 7e6b82f30f0d600f3365b536bf8588953b5ed9ff..84bc52b1872d69f7e8f8b3fb3af3d7b128666390 100644 --- a/web/layout/thread/pc/index.jsx +++ b/web/layout/thread/pc/index.jsx @@ -91,20 +91,20 @@ class ThreadPCPage extends React.Component { if (threadBodyRef && threadBodyRef.current) { // 加载评论列表 const scrollDistance = threadBodyRef?.current?.scrollTop; - // const offsetHeight = threadBodyRef?.current?.offsetHeight; - // const scrollHeight = threadBodyRef?.current?.scrollHeight; - // const { isCommentReady, isNoMore } = this.props.thread; + const offsetHeight = threadBodyRef?.current?.offsetHeight; + const scrollHeight = threadBodyRef?.current?.scrollHeight; + const { isCommentReady, isNoMore } = this.props.thread; // 记录当前的滚动位置 this.props.thread.setScrollDistance(scrollDistance); - // if ( - // scrollDistance + offsetHeight >= scrollHeight - 20 && - // !this.state.isCommentLoading && - // isCommentReady && - // !isNoMore - // ) { - // this.page = this.page + 1; - // this.loadCommentList(); - // } + if ( + scrollDistance + offsetHeight >= scrollHeight - 20 && + !this.state.isCommentLoading && + isCommentReady && + !isNoMore + ) { + this.page = this.page + 1; + this.loadCommentList(); + } } } @@ -819,57 +819,55 @@ class ThreadPCPage extends React.Component { )} - {/*/!* 回复详情内容 *!/*/} - {/*{webConfig.setSite.siteComment[0].value && (*/} - {/*
*/} - {/* {isCommentReady && isApproved ? (*/} - {/* */} - {/* /!* 第一段列表 *!/*/} - {/* {isCommentReady && isShowCommentList && (*/} - {/* */} - {/* this.onSortChange(flag)}*/} - {/* replyAvatarClick={(comment, reply, floor) => this.replyAvatarClick(comment, reply, floor)}*/} - {/* >*/} - {/* {!isCommentPositionNoMore && (*/} - {/* // this.onLoadMoreClick()}*/} - {/* // noMoreType="line"*/} - {/* // loadingText="点击加载更多"*/} - {/* // isError={isCommentListError}*/} - {/* // noMore={isCommentPositionNoMore}*/} - {/* // >*/} - {/* */} - {/*
this.onLoadMoreClick()}>*/} - {/*
展开更多评论
*/} - {/* */} - {/*
*/} - {/* )}*/} - {/*
*/} - {/* )}*/} - {/* */} - {/* this.onSortChange(flag)}*/} - {/* onEditClick={comment => this.onEditClick(comment)}*/} - {/* onPublishClick={(value, imageList) => this.onPublishClick(value, imageList)}*/} - {/* onReportClick={comment => this.onReportClick(comment)}*/} - {/* >*/} - {/* /!* {this.state.isCommentLoading && } *!/*/} - {/*
*/} - {/* ) : (*/} - {/* isApproved && */} - {/* )}*/} - {/*
*/} - {/*)}*/} + {/* 回复详情内容 */} +
+ {isCommentReady && isApproved ? ( + + {/* 第一段列表 */} + {isCommentReady && isShowCommentList && ( + + this.onSortChange(flag)} + replyAvatarClick={(comment, reply, floor) => this.replyAvatarClick(comment, reply, floor)} + > + {!isCommentPositionNoMore && ( + // this.onLoadMoreClick()} + // noMoreType="line" + // loadingText="点击加载更多" + // isError={isCommentListError} + // noMore={isCommentPositionNoMore} + // > + +
this.onLoadMoreClick()}> +
展开更多评论
+ +
+ )} +
+ )} + + this.onSortChange(flag)} + onEditClick={comment => this.onEditClick(comment)} + onPublishClick={(value, imageList) => this.onPublishClick(value, imageList)} + onReportClick={comment => this.onReportClick(comment)} + > + {/* {this.state.isCommentLoading && } */} +
+ ) : ( + isApproved && + )} +
- {/* {isNoMore && } */} + {/*{isNoMore && }*/} ); }