douaojie

Merge remote-tracking branch 'origin/main'

@@ -340,6 +340,11 @@ export class HttpUrlUtils { @@ -340,6 +340,11 @@ export class HttpUrlUtils {
340 static readonly SEND_MESSAGE_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/touch?createTime="; 340 static readonly SEND_MESSAGE_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/touch?createTime=";
341 341
342 /** 342 /**
  343 + * 点击具体某个消息
  344 + */
  345 + static readonly ENTER_MESSAGE_PATH: string = "/api/rmrb-inside-mail/zh/c/inside-mail/private/readAll?contentType=";
  346 +
  347 + /**
343 * 推送消息 348 * 推送消息
344 */ 349 */
345 static readonly HISTORY_PUSH_MESSAGE_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/push"; 350 static readonly HISTORY_PUSH_MESSAGE_PATH: string = "/api/rmrb-bff-display-zh/content/zh/c/push";
@@ -780,4 +785,10 @@ export class HttpUrlUtils { @@ -780,4 +785,10 @@ export class HttpUrlUtils {
780 let url = HttpUrlUtils.getHost() + HttpUrlUtils.HISTORY_PUSH_MESSAGE_PATH 785 let url = HttpUrlUtils.getHost() + HttpUrlUtils.HISTORY_PUSH_MESSAGE_PATH
781 return url 786 return url
782 } 787 }
  788 +
  789 + //点击具体某个消息
  790 + static getEnterClickMessageUrl() {
  791 + let url = HttpUrlUtils.getHost() + HttpUrlUtils.ENTER_MESSAGE_PATH
  792 + return url
  793 + }
783 } 794 }
@@ -52,35 +52,11 @@ export struct ImageAndTextPageComponent { @@ -52,35 +52,11 @@ export struct ImageAndTextPageComponent {
52 @State isNetConnected: boolean = true 52 @State isNetConnected: boolean = true
53 @State info: Area | null = null 53 @State info: Area | null = null
54 @State likeNum: number = 0 54 @State likeNum: number = 0
55 - @State reachEndIncreament : number = 0 55 + @State reachEndIncreament: number = 0
  56 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
56 57
57 build() { 58 build() {
58 - Column() {  
59 - // 发布时间  
60 - Row() {  
61 - Image(this.contentDetailData?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))  
62 - .width(80)  
63 - .height(28)  
64 - Text(this.publishTime)  
65 - .fontColor($r('app.color.color_B0B0B0'))  
66 - .fontSize(13)  
67 - }  
68 - .width(CommonConstants.FULL_WIDTH)  
69 - .height(32)  
70 - .padding({ left: 15, right: 15, })  
71 - .justifyContent(FlexAlign.SpaceBetween)  
72 - .alignItems(VerticalAlign.Bottom)  
73 -  
74 - Row() {  
75 - Image($r('app.media.line'))  
76 - .width('100%')  
77 - .height(6)  
78 - .objectFit(ImageFit.Cover)  
79 - .margin({ top: 10 })  
80 - }  
81 - .padding({ left: 15, right: 15 })  
82 - .backgroundColor(Color.White)  
83 - 59 + Stack({ alignContent: Alignment.Top }) {
84 Stack({ alignContent: Alignment.Bottom }) { 60 Stack({ alignContent: Alignment.Bottom }) {
85 Scroll(this.scroller) { 61 Scroll(this.scroller) {
86 Column() { 62 Column() {
@@ -89,7 +65,7 @@ export struct ImageAndTextPageComponent { @@ -89,7 +65,7 @@ export struct ImageAndTextPageComponent {
89 action: this.action, 65 action: this.action,
90 isPageEnd: $isPageEnd 66 isPageEnd: $isPageEnd
91 }) 67 })
92 - .padding({ bottom: 10 }) 68 + .padding({ top: 15, bottom: 10 })
93 Column() { 69 Column() {
94 // 点赞 70 // 点赞
95 if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) { 71 if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
@@ -156,11 +132,9 @@ export struct ImageAndTextPageComponent { @@ -156,11 +132,9 @@ export struct ImageAndTextPageComponent {
156 } 132 }
157 } 133 }
158 } 134 }
159 -  
160 } 135 }
161 .width(CommonConstants.FULL_WIDTH) 136 .width(CommonConstants.FULL_WIDTH)
162 - // .height(CommonConstants.FULL_HEIGHT)  
163 - .padding({ bottom: 76 }) 137 + .height(CommonConstants.FULL_HEIGHT)
164 .scrollBar(BarState.Off) 138 .scrollBar(BarState.Off)
165 .align(Alignment.Top) 139 .align(Alignment.Top)
166 .onReachEnd(() => { 140 .onReachEnd(() => {
@@ -177,11 +151,10 @@ export struct ImageAndTextPageComponent { @@ -177,11 +151,10 @@ export struct ImageAndTextPageComponent {
177 }).padding({ bottom: 200 }) 151 }).padding({ bottom: 200 })
178 } else { 152 } else {
179 if (!this.isPageEnd) { 153 if (!this.isPageEnd) {
180 - detailedSkeleton() 154 + detailedSkeleton().padding({ bottom: this.bottomSafeHeight })
181 } 155 }
182 } 156 }
183 - //底部交互区  
184 - if (this.operationButtonList.length) { 157 + // 底部交互区
185 OperRowListView({ 158 OperRowListView({
186 contentDetailData: this.contentDetailData, 159 contentDetailData: this.contentDetailData,
187 publishCommentModel: this.publishCommentModel, 160 publishCommentModel: this.publishCommentModel,
@@ -189,12 +162,41 @@ export struct ImageAndTextPageComponent { @@ -189,12 +162,41 @@ export struct ImageAndTextPageComponent {
189 styleType: 1, 162 styleType: 1,
190 }) 163 })
191 } 164 }
  165 + .width(CommonConstants.FULL_WIDTH)
  166 + .height(CommonConstants.FULL_HEIGHT)
  167 + .padding({ top: 38 })
  168 +
  169 + // 发布时间
  170 + Column() {
  171 + Row() {
  172 + Image(this.contentDetailData?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))
  173 + .width(80)
  174 + .height(28)
  175 + Text(this.publishTime)
  176 + .fontColor($r('app.color.color_B0B0B0'))
  177 + .fontSize(13)
192 } 178 }
  179 + .width(CommonConstants.FULL_WIDTH)
  180 + .height(32)
  181 + .padding({ left: 15, right: 15, })
  182 + .justifyContent(FlexAlign.SpaceBetween)
  183 + .alignItems(VerticalAlign.Bottom)
193 184
  185 + Row() {
  186 + Image($r('app.media.line'))
  187 + .width('100%')
  188 + .height(6)
  189 + .objectFit(ImageFit.Cover)
  190 + .margin({ top: 10 })
  191 + }
  192 + .padding({ left: 15, right: 15 })
  193 + .backgroundColor(Color.White)
  194 + }.backgroundColor(Color.White)
194 } 195 }
195 .width(CommonConstants.FULL_WIDTH) 196 .width(CommonConstants.FULL_WIDTH)
196 .height(CommonConstants.FULL_HEIGHT) 197 .height(CommonConstants.FULL_HEIGHT)
197 .backgroundColor(Color.White) 198 .backgroundColor(Color.White)
  199 +
198 } 200 }
199 201
200 private async getDetail() { 202 private async getDetail() {
@@ -260,7 +262,11 @@ export struct ImageAndTextPageComponent { @@ -260,7 +262,11 @@ export struct ImageAndTextPageComponent {
260 channelId: String(this.contentDetailData?.reLInfo?.channelId) 262 channelId: String(this.contentDetailData?.reLInfo?.channelId)
261 } 263 }
262 let recommendList = await DetailViewModel.postRecommendList(params) 264 let recommendList = await DetailViewModel.postRecommendList(params)
263 - this.recommendList = recommendList; 265 + if (recommendList.length > 0) {
  266 + //推荐列表过滤音频和活动入口
  267 + this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
  268 + }
  269 +
264 } 270 }
265 271
266 // 已登录->查询用户对作品点赞、收藏状态 272 // 已登录->查询用户对作品点赞、收藏状态
@@ -8,6 +8,8 @@ import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5 @@ -8,6 +8,8 @@ import { NativeCallH5Type } from 'wdWebComponent/src/main/ets/pages/NativeCallH5
8 import { OperRowListView } from './view/OperRowListView'; 8 import { OperRowListView } from './view/OperRowListView';
9 import DetailViewModel from '../viewmodel/DetailViewModel'; 9 import DetailViewModel from '../viewmodel/DetailViewModel';
10 import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; 10 import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
  11 +import { EmptyComponent } from '../components/view/EmptyComponent';
  12 +import { NetworkUtil } from 'wdKit';
11 13
12 const TAG: string = 'SpacialTopicPageComponent' 14 const TAG: string = 'SpacialTopicPageComponent'
13 15
@@ -24,6 +26,8 @@ export struct SpacialTopicPageComponent { @@ -24,6 +26,8 @@ export struct SpacialTopicPageComponent {
24 private dataPrepared = false; 26 private dataPrepared = false;
25 @State publishCommentModel: publishCommentModel = new publishCommentModel() 27 @State publishCommentModel: publishCommentModel = new publishCommentModel()
26 @State operationButtonList: string[] = ['comment', 'collect', 'share'] 28 @State operationButtonList: string[] = ['comment', 'collect', 'share']
  29 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
  30 + @State isNetConnected: boolean = true
27 31
28 private trySendData2H5() { 32 private trySendData2H5() {
29 if (!this.webPrepared || !this.dataPrepared) { 33 if (!this.webPrepared || !this.dataPrepared) {
@@ -45,6 +49,8 @@ export struct SpacialTopicPageComponent { @@ -45,6 +49,8 @@ export struct SpacialTopicPageComponent {
45 } 49 }
46 50
47 private async getDetail() { 51 private async getDetail() {
  52 + this.isNetConnected = NetworkUtil.isNetConnected()
  53 +
48 let contentId: string = '' 54 let contentId: string = ''
49 let relId: string = '' 55 let relId: string = ''
50 let relType: string = '' 56 let relType: string = ''
@@ -95,15 +101,28 @@ export struct SpacialTopicPageComponent { @@ -95,15 +101,28 @@ export struct SpacialTopicPageComponent {
95 .height(CommonConstants.FULL_HEIGHT) 101 .height(CommonConstants.FULL_HEIGHT)
96 .padding({ bottom: 75 }) 102 .padding({ bottom: 75 })
97 103
  104 + if (!this.isNetConnected) {
  105 + EmptyComponent({
  106 + emptyType: 1,
  107 + emptyButton: true,
  108 + retry: () => {
  109 + this.getDetail()
  110 + }
  111 + }).padding({ bottom: 200 })
  112 + } else {
98 if (!this.isPageEnd) { 113 if (!this.isPageEnd) {
99 detailedSkeleton() 114 detailedSkeleton()
100 } 115 }
  116 + }
101 //底部交互区 117 //底部交互区
102 OperRowListView({ 118 OperRowListView({
103 contentDetailData: this.contentDetailData, 119 contentDetailData: this.contentDetailData,
104 publishCommentModel: this.publishCommentModel, 120 publishCommentModel: this.publishCommentModel,
105 operationButtonList: this.operationButtonList, 121 operationButtonList: this.operationButtonList,
106 }) 122 })
  123 + .padding({
  124 + bottom: `${this.bottomSafeHeight}px`
  125 + })
107 } 126 }
108 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 127 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
109 } 128 }
1 import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index' 1 import { DateTimeUtils, StringUtils, ToastUtils } from 'wdKit/Index'
2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 2 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  3 +import { WDMessageCenterMessageType } from '../../../model/InteractMessageModel'
3 import MinePageDatasModel from '../../../model/MinePageDatasModel' 4 import MinePageDatasModel from '../../../model/MinePageDatasModel'
4 import { MessageItem } from '../../../viewmodel/MessageItem' 5 import { MessageItem } from '../../../viewmodel/MessageItem'
5 import { CustomTitleUI } from '../../reusable/CustomTitleUI' 6 import { CustomTitleUI } from '../../reusable/CustomTitleUI'
@@ -146,9 +147,15 @@ export struct MessageListUI { @@ -146,9 +147,15 @@ export struct MessageListUI {
146 .onClick(() => { 147 .onClick(() => {
147 switch (index) { 148 switch (index) {
148 case 0: //互动消息 149 case 0: //互动消息
  150 + if(item.unReadCount > 0){
  151 + this.sendEnterEvent(WDMessageCenterMessageType.WDMessageCenterMessageType_Interact)
  152 + }
149 WDRouterRule.jumpWithPage(WDRouterPage.interactMessagePage) 153 WDRouterRule.jumpWithPage(WDRouterPage.interactMessagePage)
150 break; 154 break;
151 case 1: //预约消息 155 case 1: //预约消息
  156 + if(item.unReadCount > 0){
  157 + this.sendEnterEvent(WDMessageCenterMessageType.WDMessageCenterMessageType_Subscribe)
  158 + }
152 WDRouterRule.jumpWithPage(WDRouterPage.subscribeMessagePage) 159 WDRouterRule.jumpWithPage(WDRouterPage.subscribeMessagePage)
153 break; 160 break;
154 case 2: //历史推送 161 case 2: //历史推送
@@ -166,4 +173,12 @@ export struct MessageListUI { @@ -166,4 +173,12 @@ export struct MessageListUI {
166 .height('100%') 173 .height('100%')
167 .width('100%') 174 .width('100%')
168 } 175 }
  176 +
  177 + sendEnterEvent(type:number){
  178 + MinePageDatasModel.sendEnterMessageData(type).then((value) => {
  179 + console.log(TAG, "消息已读")
  180 + }).catch((err: Error) => {
  181 + console.log(TAG, JSON.stringify(err))
  182 + })
  183 + }
169 } 184 }
@@ -61,7 +61,7 @@ export struct OperRowListView { @@ -61,7 +61,7 @@ export struct OperRowListView {
61 @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口 61 @Prop componentType: number = 1 //1: 底部栏目样式 2: 新闻页中间位置样式 3:动态Tab内容下的互动入口
62 @Prop pageComponentType: number = -1 //1:视频详情页 62 @Prop pageComponentType: number = -1 //1:视频详情页
63 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 63 @State likesStyle: number = this.contentDetailData.likesStyle // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
64 - @State operationButtonList: string[] = ['comment', 'collect', 'share'] // 组件展示条件 64 + @Prop operationButtonList?: string[] = ['comment', 'collect', 'share'] // 组件展示条件
65 @State needLike: boolean = true 65 @State needLike: boolean = true
66 @ObjectLink publishCommentModel: publishCommentModel 66 @ObjectLink publishCommentModel: publishCommentModel
67 @State styleType: number = 1 67 @State styleType: number = 1
@@ -138,7 +138,7 @@ export struct OperRowListView { @@ -138,7 +138,7 @@ export struct OperRowListView {
138 }) 138 })
139 .width(42) 139 .width(42)
140 140
141 - if (this.contentDetailData) { 141 + if (this.contentDetailData?.newsId) {
142 ForEach(this.operationButtonList, (item: string, index: number) => { 142 ForEach(this.operationButtonList, (item: string, index: number) => {
143 if (item == 'comment') { 143 if (item == 'comment') {
144 this.builderComment() 144 this.builderComment()
@@ -162,7 +162,8 @@ export struct OperRowListView { @@ -162,7 +162,8 @@ export struct OperRowListView {
162 .backgroundColor(this.bgColor) 162 .backgroundColor(this.bgColor)
163 .padding({ 163 .padding({
164 top: 10, 164 top: 10,
165 - bottom: `${this.bottomSafeHeight}px` 165 + bottom: 10
  166 + // bottom: `${this.bottomSafeHeight}px`
166 // bottom: 50 167 // bottom: 50
167 }) 168 })
168 169
@@ -701,6 +701,29 @@ class MinePageDatasModel{ @@ -701,6 +701,29 @@ class MinePageDatasModel{
701 }; 701 };
702 702
703 703
  704 + /**
  705 + * 点击预约消息(进入预约页面) 主要为了 未读 变出 已读
  706 + * @returns
  707 + */
  708 + sendEnterMessageData(type:number): Promise<String> {
  709 + return new Promise<String>((success, error) => {
  710 + this.fetchEnterMessageData(type).then((navResDTO: ResponseDTO<String>) => {
  711 + if (!navResDTO || navResDTO.code != 0) {
  712 + error(null)
  713 + return
  714 + }
  715 + success("1");
  716 + }).catch((err: Error) => {
  717 + error(err)
  718 + })
  719 + })
  720 + }
  721 +
  722 + fetchEnterMessageData(type:number) {
  723 + let url = HttpUrlUtils.getEnterClickMessageUrl() + `${type}`
  724 + return WDHttp.get<ResponseDTO<String>>(url)
  725 + };
  726 +
704 } 727 }
705 728
706 const minePageDatasModel = MinePageDatasModel.getInstance() 729 const minePageDatasModel = MinePageDatasModel.getInstance()
@@ -65,6 +65,8 @@ export struct MultiPictureListPage { @@ -65,6 +65,8 @@ export struct MultiPictureListPage {
65 .height(px2vp(this.picHeight) + 32) 65 .height(px2vp(this.picHeight) + 32)
66 .vertical(false) 66 .vertical(false)
67 .autoPlay(false) 67 .autoPlay(false)
  68 + .loop(false)
  69 + .effectMode(EdgeEffect.None)
68 .cachedCount(3) 70 .cachedCount(3)
69 .indicator(false) 71 .indicator(false)
70 .displayCount(1) 72 .displayCount(1)
1 import { SubscribeMessageComponent } from '../components/mine/message/subscribe/SubscribeMessageComponent' 1 import { SubscribeMessageComponent } from '../components/mine/message/subscribe/SubscribeMessageComponent'
2 2
  3 +const TAG = "SubscribeMessagePage"
3 //预约消息 页面 4 //预约消息 页面
4 @Entry 5 @Entry
5 @Component 6 @Component