chenqs

fix |> 修复进入大专题卡,少了更多按钮问题

... ... @@ -97,13 +97,13 @@ export struct SpacialTopicPageComponent {
this.contentDetailData.shareInfo = this.shareInfo
console.log('contentDetailData111', JSON.stringify(this.contentDetailData))
if(this.topicInfo.shareOpen === 1){
if (!this.operationButtonList.includes('share')) {
this.operationButtonList.push('share');
}
} else {
this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
}
// if(this.topicInfo.shareOpen === 1){
// if (!this.operationButtonList.includes('share')) {
// this.operationButtonList.push('share');
// }
// } else {
// this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
// }
// 转换评论数据
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
... ...
... ... @@ -96,6 +96,7 @@ export struct OperRowListView {
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
@Prop topicInfo?: TopicInfo = {} as TopicInfo
private shareOpen = 0;
async aboutToAppear() {
console.info(TAG, 'this.needLike', this.needLike)
... ... @@ -137,6 +138,7 @@ export struct OperRowListView {
if (!this.contentDetailData) {
return
}
this.shareOpen = this.contentDetailData.shareInfo.shareOpen;
const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
if (user_id) {
this.getInteractDataStatus()
... ... @@ -393,10 +395,11 @@ export struct OperRowListView {
*/
@Builder
builderShare() {
if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
Column() {
Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :
$r('app.media.iv_live_comment_share_white'))
Image(this.styleType == 1 ? (this.shareOpen == 1?$r('app.media.iv_live_comment_share'):$r('app.media.more_icon_black')) :
(this.shareOpen == 1?$r('app.media.iv_live_comment_share_white'):$r('app.media.more_icon_white')))
.width(24)
.height(24)
.aspectRatio(1)
... ... @@ -411,7 +414,9 @@ export struct OperRowListView {
.borderRadius(18)
.backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
}
}
// if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
//
// }
handleStyle() {
if (this.styleType == 1) {
... ... @@ -440,7 +445,7 @@ export struct OperRowListView {
appCustomTargetRelType: this.topicInfo?.relType,
appCustomShowReport: false,
appCustomShowLike: -1,
shareOpen: 1,
shareOpen: this.shareOpen,
sharePosterOpen: this.topicInfo?.posterFlag,
appCustomShowPoster: this.topicInfo?.posterFlag && this.topicInfo?.posterFlag > 0 ? 1 : -1,
}
... ...