陈剑华

Merge remote-tracking branch 'origin/main'

Showing 19 changed files with 182 additions and 94 deletions
@@ -53,28 +53,36 @@ export class HttpRequest { @@ -53,28 +53,36 @@ export class HttpRequest {
53 53
54 static get<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> { 54 static get<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> {
55 let config: AxiosRequestConfig = { 55 let config: AxiosRequestConfig = {
56 - headers: HttpRequest.buildHeaderWithGlobalHeader(headers) 56 + headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
  57 + timeout:10000,
  58 + timeoutErrorMessage:"当前无网络,请重试"
57 } 59 }
58 return service.get(url, config) 60 return service.get(url, config)
59 } 61 }
60 62
61 static post<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> { 63 static post<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> {
62 let config: AxiosRequestConfig = { 64 let config: AxiosRequestConfig = {
63 - headers: HttpRequest.buildHeaderWithGlobalHeader(headers) 65 + headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
  66 + timeout:10000,
  67 + timeoutErrorMessage:"当前无网络,请重试"
64 } 68 }
65 return service.post(url, data, config) 69 return service.post(url, data, config)
66 } 70 }
67 71
68 static put<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> { 72 static put<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> {
69 let config: AxiosRequestConfig = { 73 let config: AxiosRequestConfig = {
70 - headers: HttpRequest.buildHeaderWithGlobalHeader(headers) 74 + headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
  75 + timeout:10000,
  76 + timeoutErrorMessage:"当前无网络,请重试"
71 } 77 }
72 return service.put(url, data, config) 78 return service.put(url, data, config)
73 } 79 }
74 80
75 static delete<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> { 81 static delete<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> {
76 let config: AxiosRequestConfig = { 82 let config: AxiosRequestConfig = {
77 - headers: HttpRequest.buildHeaderWithGlobalHeader(headers) 83 + headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
  84 + timeout:10000,
  85 + timeoutErrorMessage:"当前无网络,请重试"
78 } 86 }
79 return service.delete(url, config) 87 return service.delete(url, config)
80 } 88 }
@@ -42,7 +42,7 @@ export struct H5NewsWebPageComponent { @@ -42,7 +42,7 @@ export struct H5NewsWebPageComponent {
42 action: Action = {} as Action 42 action: Action = {} as Action
43 @State webUrl: string = ''; 43 @State webUrl: string = '';
44 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 44 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
45 - @State recommendList: ContentDTO[] = [] 45 + // @State recommendList: ContentDTO[] = []
46 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态 46 @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
47 @State interactData: InteractDataDTO = {} as InteractDataDTO 47 @State interactData: InteractDataDTO = {} as InteractDataDTO
48 @State isPageEnd: boolean = false 48 @State isPageEnd: boolean = false
@@ -58,7 +58,7 @@ export struct H5NewsWebPageComponent { @@ -58,7 +58,7 @@ export struct H5NewsWebPageComponent {
58 @State showCommentList: boolean = false 58 @State showCommentList: boolean = false
59 @State index: number = 0 59 @State index: number = 0
60 @State currentIndex: number = 0 60 @State currentIndex: number = 0
61 - private navTitle = '人民日报'; 61 + @State navTitle: string = ""
62 62
63 build() { 63 build() {
64 Stack({ alignContent: Alignment.Top }){ 64 Stack({ alignContent: Alignment.Top }){
@@ -137,13 +137,14 @@ export struct H5NewsWebPageComponent { @@ -137,13 +137,14 @@ export struct H5NewsWebPageComponent {
137 console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0])) 137 console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0]))
138 if (detailBeans && detailBeans.length > 0) { 138 if (detailBeans && detailBeans.length > 0) {
139 this.contentDetailData = detailBeans[0]; 139 this.contentDetailData = detailBeans[0];
  140 + this.navTitle = this.contentDetailData.newsTitle
140 let dateTime = 141 let dateTime =
141 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); 142 DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
142 // let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) 143 // let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
143 // this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime) 144 // this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
144 - if (this.contentDetailData?.recommendShow === 1) {  
145 - this.getRecommend()  
146 - } 145 + // if (this.contentDetailData?.recommendShow === 1) {
  146 + // this.getRecommend()
  147 + // }
147 if (this.contentDetailData?.openLikes === 1) { 148 if (this.contentDetailData?.openLikes === 1) {
148 console.log(TAG, '点赞this.getInteractDataStatus()') 149 console.log(TAG, '点赞this.getInteractDataStatus()')
149 this.getInteractDataStatus() 150 this.getInteractDataStatus()
@@ -167,10 +168,10 @@ export struct H5NewsWebPageComponent { @@ -167,10 +168,10 @@ export struct H5NewsWebPageComponent {
167 if (this.contentDetailData.openLikes === 1) { 168 if (this.contentDetailData.openLikes === 1) {
168 this.operationButtonList.push('like') 169 this.operationButtonList.push('like')
169 } 170 }
170 - if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&  
171 - this.contentDetailData?.audioList[0].audioUrl) {  
172 - this.operationButtonList.push('listen')  
173 - } 171 + // if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
  172 + // this.contentDetailData?.audioList[0].audioUrl) {
  173 + // this.operationButtonList.push('listen')
  174 + // }
174 this.operationButtonList.push('collect') 175 this.operationButtonList.push('collect')
175 if (this.contentDetailData.shareInfo?.shareOpen === 1) { 176 if (this.contentDetailData.shareInfo?.shareOpen === 1) {
176 this.operationButtonList.push('share') 177 this.operationButtonList.push('share')
@@ -179,23 +180,23 @@ export struct H5NewsWebPageComponent { @@ -179,23 +180,23 @@ export struct H5NewsWebPageComponent {
179 } 180 }
180 } 181 }
181 182
182 - private async getRecommend() {  
183 - let params: postRecommendListParams = {  
184 - imei: HttpUtils.getImei(),  
185 - userId: HttpUtils.getUserId(),  
186 - contentId: String(this.contentDetailData?.newsId),  
187 - recType: 1,  
188 - contentType: this.contentDetailData?.newsType,  
189 - relId: this.contentDetailData?.reLInfo?.relId,  
190 - // channelId: String(this.contentDetailData?.reLInfo?.channelId)  
191 - }  
192 - let recommendList = await DetailViewModel.postRecommendList(params)  
193 - if (recommendList.length > 0) {  
194 - //推荐列表过滤音频和活动入口  
195 - this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');  
196 - }  
197 -  
198 - } 183 + // private async getRecommend() {
  184 + // let params: postRecommendListParams = {
  185 + // imei: HttpUtils.getImei(),
  186 + // userId: HttpUtils.getUserId(),
  187 + // contentId: String(this.contentDetailData?.newsId),
  188 + // recType: 1,
  189 + // contentType: this.contentDetailData?.newsType,
  190 + // relId: this.contentDetailData?.reLInfo?.relId,
  191 + // // channelId: String(this.contentDetailData?.reLInfo?.channelId)
  192 + // }
  193 + // let recommendList = await DetailViewModel.postRecommendList(params)
  194 + // if (recommendList.length > 0) {
  195 + // //推荐列表过滤音频和活动入口
  196 + // this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
  197 + // }
  198 + //
  199 + // }
199 200
200 // 已登录->查询用户对作品点赞、收藏状态 201 // 已登录->查询用户对作品点赞、收藏状态
201 private async getInteractDataStatus() { 202 private async getInteractDataStatus() {
@@ -87,7 +87,7 @@ export struct CommentComponent { @@ -87,7 +87,7 @@ export struct CommentComponent {
87 dx: 0, 87 dx: 0,
88 dy: -20 88 dy: -20
89 }, 89 },
90 - backgroundColor: "#50000000", 90 + maskColor: "#50000000",
91 }) 91 })
92 92
93 this.getData(); 93 this.getData();
@@ -48,7 +48,7 @@ export struct CommentTabComponent { @@ -48,7 +48,7 @@ export struct CommentTabComponent {
48 dx: 0, 48 dx: 0,
49 dy: -20 49 dy: -20
50 }, 50 },
51 - backgroundColor: "#50000000", 51 + maskColor: "#50000000",
52 }) 52 })
53 53
54 this.onLoad(this.dialogController) 54 this.onLoad(this.dialogController)
@@ -75,7 +75,7 @@ export struct QualityCommentsComponent { @@ -75,7 +75,7 @@ export struct QualityCommentsComponent {
75 dx: 0, 75 dx: 0,
76 dy: -20 76 dy: -20
77 }, 77 },
78 - backgroundColor: "#50000000", 78 + maskColor: "#50000000",
79 }) 79 })
80 } 80 }
81 81
1 import { Action, ContentDTO, Params, InteractDataDTO } from 'wdBean'; 1 import { Action, ContentDTO, Params, InteractDataDTO } from 'wdBean';
2 import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant'; 2 import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
3 -import { Logger, ToastUtils, DateTimeUtils } from 'wdKit'; 3 +import { Logger, ToastUtils, DateTimeUtils, DisplayUtils } from 'wdKit';
4 import { CompUtils } from '../../utils/CompUtils'; 4 import { CompUtils } from '../../utils/CompUtils';
5 import { ProcessUtils, WDRouterRule } from 'wdRouter'; 5 import { ProcessUtils, WDRouterRule } from 'wdRouter';
6 import { TrackConstants, 6 import { TrackConstants,
@@ -446,8 +446,11 @@ export struct PaperSingleColumn999CardView { @@ -446,8 +446,11 @@ export struct PaperSingleColumn999CardView {
446 Image(this.loadImg?this.item?.coverUrl:'') 446 Image(this.loadImg?this.item?.coverUrl:'')
447 .borderRadius(5) 447 .borderRadius(5)
448 .objectFit(ImageFit.Fill) 448 .objectFit(ImageFit.Fill)
449 - .aspectRatio(319 / 179) ///图片设计比例 449 + // .aspectRatio(319 / 179) ///图片设计比例
450 .padding({ top: 10 }) 450 .padding({ top: 10 })
  451 + .backgroundColor('#f5f5f5')
  452 + .width('100%')
  453 + .height((DisplayUtils.getDeviceWidth() - 66)*(179 / 319))
451 //视频 454 //视频
452 if (this.item?.videoInfo) { 455 if (this.item?.videoInfo) {
453 Row() { 456 Row() {
@@ -480,18 +483,14 @@ export struct PaperSingleColumn999CardView { @@ -480,18 +483,14 @@ export struct PaperSingleColumn999CardView {
480 //直播 483 //直播
481 if (this.item?.objectType === '2') { 484 if (this.item?.objectType === '2') {
482 Row() { 485 Row() {
483 - Image(this.buildLiveStateImage())  
484 - .width(14)  
485 - .height(14)  
486 - .objectFit(ImageFit.Contain)  
487 - // LottieView({  
488 - // name: 'MorningPaper_live_status',  
489 - // path: "lottie/live_detail_living.json",  
490 - // lottieWidth: 14,  
491 - // lottieHeight: 14,  
492 - // autoplay: true,  
493 - // loop: true,  
494 - // }) 486 + LottieView({
  487 + name: 'MorningPaper_live_status+'+this.item.objectId,
  488 + path: "lottie/live_detail_living.json",
  489 + lottieWidth: 14,
  490 + lottieHeight: 14,
  491 + autoplay: true,
  492 + loop: true,
  493 + })
495 494
496 Text(this.buildLiveStateString()) 495 Text(this.buildLiveStateString())
497 .fontColor(Color.White) 496 .fontColor(Color.White)
@@ -3,7 +3,7 @@ import router from '@ohos.router' @@ -3,7 +3,7 @@ import router from '@ohos.router'
3 @Component 3 @Component
4 export struct CustomTitleUI { 4 export struct CustomTitleUI {
5 imgBack:boolean = true 5 imgBack:boolean = true
6 - titleName:ResourceStr = "默认标题" 6 + @Prop titleName: ResourceStr = ""
7 @Prop percent:number = 1 7 @Prop percent:number = 1
8 isShowBottomLine:boolean = false 8 isShowBottomLine:boolean = false
9 9
@@ -377,7 +377,7 @@ export struct LiveOperRowListView { @@ -377,7 +377,7 @@ export struct LiveOperRowListView {
377 dx: 0, 377 dx: 0,
378 dy: -20 378 dy: -20
379 }, 379 },
380 - backgroundColor: "#50000000", 380 + maskColor: "#50000000",
381 }) 381 })
382 this.publishCommentModel.rootCommentId = '-1'; 382 this.publishCommentModel.rootCommentId = '-1';
383 this.publishCommentModel.parentId = '-1'; 383 this.publishCommentModel.parentId = '-1';
@@ -147,7 +147,7 @@ export struct MultiPictureListPage { @@ -147,7 +147,7 @@ export struct MultiPictureListPage {
147 // ImageDownloadComponent({ url: this.currentUrl }) 147 // ImageDownloadComponent({ url: this.currentUrl })
148 SaveNetWorkPictures({ url: this.currentUrl }) 148 SaveNetWorkPictures({ url: this.currentUrl })
149 } 149 }
150 - .margin({ 150 + .padding({
151 top: 14, 151 top: 14,
152 left: 20, 152 left: 20,
153 bottom: 14, 153 bottom: 14,
@@ -155,6 +155,11 @@ export struct MultiPictureListPage { @@ -155,6 +155,11 @@ export struct MultiPictureListPage {
155 }) 155 })
156 // .backgroundColor(Color.Blue) 156 // .backgroundColor(Color.Blue)
157 .id('e_swiper_titles') 157 .id('e_swiper_titles')
  158 + .linearGradient({
  159 + direction: GradientDirection.Bottom, // 渐变方向
  160 + colors: [['rgba(18, 18, 18, 0)', 0],
  161 + ['rgba(18, 18, 18, 0.8)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
  162 + })
158 .alignRules({ 163 .alignRules({
159 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, 164 bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
160 middle: { anchor: "__container__", align: HorizontalAlign.Center } 165 middle: { anchor: "__container__", align: HorizontalAlign.Center }
@@ -156,7 +156,7 @@ export class PageHelper { @@ -156,7 +156,7 @@ export class PageHelper {
156 } 156 }
157 // Logger.debug(TAG, 'getPageInfo go on') 157 // Logger.debug(TAG, 'getPageInfo go on')
158 this.parseGroup(pageModel, cacheIsSame) 158 this.parseGroup(pageModel, cacheIsSame)
159 - }).catch(() => { 159 + }).catch((err:Error) => {
160 this.refreshUIEnd(pageModel, false) 160 this.refreshUIEnd(pageModel, false)
161 if (this.isPageLoaded(pageModel)) { 161 if (this.isPageLoaded(pageModel)) {
162 return 162 return
@@ -15,7 +15,7 @@ import { @@ -15,7 +15,7 @@ import {
15 } from 'wdBean'; 15 } from 'wdBean';
16 import { CompStyle } from 'wdConstant/Index'; 16 import { CompStyle } from 'wdConstant/Index';
17 17
18 -import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit'; 18 +import { CollectionUtils, Logger, ResourcesUtils, StringUtils, ToastUtils } from 'wdKit';
19 import { CacheData, ResponseDTO, } from 'wdNetwork'; 19 import { CacheData, ResponseDTO, } from 'wdNetwork';
20 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean'; 20 import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
21 import { PageRepository } from '../repository/PageRepository'; 21 import { PageRepository } from '../repository/PageRepository';
@@ -240,6 +240,9 @@ export class PageViewModel extends BaseViewModel { @@ -240,6 +240,9 @@ export class PageViewModel extends BaseViewModel {
240 }).catch((err: Error) => { 240 }).catch((err: Error) => {
241 Logger.error(TAG, `getPageInfo then,error.name : ${err.name}, error.message:${err.message}`); 241 Logger.error(TAG, `getPageInfo then,error.name : ${err.name}, error.message:${err.message}`);
242 error(err); 242 error(err);
  243 + if(err.message == "网络出小差了,请检查网络后重试"){
  244 + ToastUtils.shortToast(err.message)
  245 + }
243 }); 246 });
244 }); 247 });
245 } 248 }
@@ -151,7 +151,7 @@ export struct DetailPlayLiveCommon { @@ -151,7 +151,7 @@ export struct DetailPlayLiveCommon {
151 .catch((error:Error) => { 151 .catch((error:Error) => {
152 Logger.debug(TAG + "error",error.message,error.name) 152 Logger.debug(TAG + "error",error.message,error.name)
153 this.isHideLoading = true; 153 this.isHideLoading = true;
154 - ToastUtils.shortToast('内容不存在'); 154 + ToastUtils.shortToast('网络出小差了,请检查网络后重试');
155 router.back(); 155 router.back();
156 reject(); 156 reject();
157 }); 157 });
@@ -87,9 +87,12 @@ export struct DetailPlayLivePage { @@ -87,9 +87,12 @@ export struct DetailPlayLivePage {
87 this.getLiveDetails() 87 this.getLiveDetails()
88 this.getLiveRoomData() 88 this.getLiveRoomData()
89 89
90 - if(!await onlyWifiLoadVideo()){  
91 - this.showToastTip(this.toastText) 90 + if (this.liveDetailPageLogic.dealOrShowToast()) {
  91 + if(!await onlyWifiLoadVideo()){
  92 + this.showToastTip(this.toastText)
  93 + }
92 } 94 }
  95 +
93 this.configChatRoom() 96 this.configChatRoom()
94 } 97 }
95 98
@@ -92,4 +92,21 @@ export class LiveDetailPageLogic { @@ -92,4 +92,21 @@ export class LiveDetailPageLogic {
92 } 92 }
93 return '' 93 return ''
94 } 94 }
  95 +
  96 + dealOrShowToast(): boolean {
  97 + if (this.liveState == 'wait') {
  98 + if (this.contentDetailData.liveInfo
  99 + && this.contentDetailData.liveInfo.previewUrl.length > 0
  100 + && this.contentDetailData.liveInfo.previewType == 1) { ///预告视频
  101 + return true
  102 + }
  103 + }
  104 + if (this.liveState == 'running') {
  105 + if (this.contentDetailData.liveInfo.liveWay == 0) { ///直播视频
  106 + return true
  107 + }
  108 + }
  109 + return false
  110 + }
  111 +
95 } 112 }
@@ -34,6 +34,7 @@ export struct TabChatComponent { @@ -34,6 +34,7 @@ export struct TabChatComponent {
34 updateData() { 34 updateData() {
35 35
36 if (this.index === this.parentComponentIndex && this.initUI) { 36 if (this.index === this.parentComponentIndex && this.initUI) {
  37 + this.initUI = false
37 this.getLiveList() 38 this.getLiveList()
38 } 39 }
39 40
@@ -87,7 +88,7 @@ export struct TabChatComponent { @@ -87,7 +88,7 @@ export struct TabChatComponent {
87 this.ListLayout() 88 this.ListLayout()
88 }, 89 },
89 onRefresh: (resolve) => { 90 onRefresh: (resolve) => {
90 - this.pageModel.currentPage = 1 91 + this.pageModel.currentPage ++
91 this.getLiveList(resolve) 92 this.getLiveList(resolve)
92 }, 93 },
93 94
@@ -136,7 +137,6 @@ export struct TabChatComponent { @@ -136,7 +137,6 @@ export struct TabChatComponent {
136 return 137 return
137 } 138 }
138 this.pageModel.isLoading = true 139 this.pageModel.isLoading = true
139 - this.pageModel.currentPage = 1  
140 this.liveViewModel.getLiveChatList( 140 this.liveViewModel.getLiveChatList(
141 this.pageModel.currentPage, 141 this.pageModel.currentPage,
142 this.contentDetailData?.liveInfo?.mlive?.mliveId, 142 this.contentDetailData?.liveInfo?.mlive?.mliveId,
@@ -152,34 +152,37 @@ export struct TabChatComponent { @@ -152,34 +152,37 @@ export struct TabChatComponent {
152 resolve('') 152 resolve('')
153 } 153 }
154 } 154 }
155 - if (this.pageModel.currentPage === 1) {  
156 - this.liveChatList.clear()  
157 - } 155 + // if (this.pageModel.currentPage === 1) {
  156 + // this.liveChatList.clear()
  157 + // }
158 Logger.debug(TAG, `${JSON.stringify(data)}`) 158 Logger.debug(TAG, `${JSON.stringify(data)}`)
159 if (data.barrageResponses && data.barrageResponses.length > 0) { 159 if (data.barrageResponses && data.barrageResponses.length > 0) {
160 this.pageModel.viewType = ViewType.LOADED; 160 this.pageModel.viewType = ViewType.LOADED;
161 this.liveChatList.push(...data.barrageResponses) 161 this.liveChatList.push(...data.barrageResponses)
162 162
163 - if (this.initUI) {  
164 - this.initUI = false 163 + if (this.pageModel.currentPage === 1) {
165 setTimeout(() => { 164 setTimeout(() => {
166 this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1) 165 this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1)
167 }, 300) 166 }, 300)
168 } 167 }
169 -  
170 - if (data.barrageResponses.length === this.pageModel.pageSize) {  
171 - this.pageModel.currentPage++;  
172 - this.pageModel.hasMore = true;  
173 - } else {  
174 - this.pageModel.hasMore = false;  
175 - } 168 + // this.pageModel.currentPage++;
  169 + // if (data.barrageResponses.length === this.pageModel.pageSize) {
  170 + //
  171 + // this.pageModel.hasMore = true;
  172 + // } else {
  173 + // this.pageModel.hasMore = false;
  174 + // }
176 } else { 175 } else {
177 - this.pageModel.viewType = ViewType.EMPTY; 176 + if (this.liveChatList.totalCount() == 0 ) {
  177 + this.pageModel.viewType = ViewType.EMPTY;
  178 + }
178 } 179 }
179 }, 180 },
180 () => { 181 () => {
181 Logger.debug(TAG, `error`) 182 Logger.debug(TAG, `error`)
182 - this.pageModel.viewType = ViewType.ERROR; 183 + if (this.liveChatList.totalCount() == 0) {
  184 + this.pageModel.viewType = ViewType.ERROR;
  185 + }
183 }) 186 })
184 } 187 }
185 188
@@ -11,17 +11,20 @@ export struct TabInfoComponent { @@ -11,17 +11,20 @@ export struct TabInfoComponent {
11 } 11 }
12 12
13 build() { 13 build() {
14 - Column() {  
15 - this.showLiveTitle()  
16 - this.showLiveDetails()  
17 - LiveCountdownComponent({liveDetailsBean:this.contentDetailData})  
18 - }.margin({  
19 - top: 13,  
20 - left: 16,  
21 - right: 16  
22 - })  
23 - .height('100%')  
24 - .alignItems(HorizontalAlign.Start) 14 + Scroll(){
  15 + Column() {
  16 + this.showLiveTitle()
  17 + this.showLiveDetails()
  18 + LiveCountdownComponent({liveDetailsBean:this.contentDetailData})
  19 + }.margin({
  20 + top: 13,
  21 + left: 16,
  22 + right: 16
  23 + })
  24 + .alignItems(HorizontalAlign.Start)
  25 + }.layoutWeight(1)
  26 + .width("100%")
  27 + .scrollBar(BarState.Off)
25 } 28 }
26 29
27 aboutToDisappear(): void { 30 aboutToDisappear(): void {
@@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from @@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from
6 import { DisplayDirection } from 'wdConstant/Index' 6 import { DisplayDirection } from 'wdConstant/Index'
7 import { window } from '@kit.ArkUI' 7 import { window } from '@kit.ArkUI'
8 8
  9 +const TAG = 'PlayerFullScreenView'
9 @Component 10 @Component
10 export struct PlayerFullScreenView { 11 export struct PlayerFullScreenView {
11 private playerController?: WDPlayerController; 12 private playerController?: WDPlayerController;
@@ -33,7 +34,11 @@ export struct PlayerFullScreenView { @@ -33,7 +34,11 @@ export struct PlayerFullScreenView {
33 } 34 }
34 35
35 share() { 36 share() {
  37 + this.playerController?.switchPlayOrPause()
36 WDShare.shareContent(this.contentDetailData) 38 WDShare.shareContent(this.contentDetailData)
  39 + // WDShare.shareContent(this.contentDetailData).then(() => {
  40 + // this.playerController?.switchPlayOrPause()
  41 + // })
37 } 42 }
38 43
39 updateProgress() { 44 updateProgress() {
@@ -150,11 +155,13 @@ export struct PlayerFullScreenView { @@ -150,11 +155,13 @@ export struct PlayerFullScreenView {
150 Image($r(`app.media.ic_play_2`)).height(24).width(24) 155 Image($r(`app.media.ic_play_2`)).height(24).width(24)
151 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible) 156 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
152 .onClick(() => { 157 .onClick(() => {
  158 + // console.log(TAG, `ic_play_2 onClick`, this.status )
153 this.playerController?.switchPlayOrPause() 159 this.playerController?.switchPlayOrPause()
154 }) 160 })
155 Image($r(`app.media.ic_pause_2`)).height(24).width(24) 161 Image($r(`app.media.ic_pause_2`)).height(24).width(24)
156 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible) 162 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
157 .onClick(() => { 163 .onClick(() => {
  164 + // console.log(TAG, `ic_pause_2 onClick`, this.status )
158 this.playerController?.switchPlayOrPause() 165 this.playerController?.switchPlayOrPause()
159 }) 166 })
160 167
@@ -12,7 +12,19 @@ const DAILY_NEWSPAPER_DEEP_LINK = "rmrbapp://rmrb.app/openwith?type=topic&subTyp @@ -12,7 +12,19 @@ const DAILY_NEWSPAPER_DEEP_LINK = "rmrbapp://rmrb.app/openwith?type=topic&subTyp
12 struct DailyNewspaperWidgetCard { 12 struct DailyNewspaperWidgetCard {
13 @LocalStorageProp('paperType') paperType: FormNewspaperPaperType = FormNewspaperPaperType.unknown; 13 @LocalStorageProp('paperType') paperType: FormNewspaperPaperType = FormNewspaperPaperType.unknown;
14 @LocalStorageProp('paperInfo') paperInfo: FormNewspaperPaperInfo = {} as FormNewspaperPaperInfo; 14 @LocalStorageProp('paperInfo') paperInfo: FormNewspaperPaperInfo = {} as FormNewspaperPaperInfo;
15 - @LocalStorageProp('paperContents') paperContents: FormNewspaperPaperContent[] = []; 15 + @LocalStorageProp('paperContents') @Watch("paperContentsUpdates") paperContents: FormNewspaperPaperContent[] = [];
  16 + @State needShowNumber: boolean = false
  17 +
  18 + aboutToAppear(): void {
  19 +
  20 + }
  21 +
  22 + paperContentsUpdates() {
  23 + const hasAnyRightImages = this.paperContents.filter((content) => {
  24 + return content.coverUrl && content.coverUrl.length > 0
  25 + }).length > 0
  26 + this.needShowNumber = !this.paperInfo.showLeftImage && !hasAnyRightImages
  27 + }
16 28
17 build() { 29 build() {
18 30
@@ -73,7 +85,12 @@ struct DailyNewspaperWidgetCard { @@ -73,7 +85,12 @@ struct DailyNewspaperWidgetCard {
73 List() { 85 List() {
74 ForEach(this.paperContents, (item: FormNewspaperPaperContent, index: number) => { 86 ForEach(this.paperContents, (item: FormNewspaperPaperContent, index: number) => {
75 ListItem() { 87 ListItem() {
76 - ContentCellView({content: item, index: index, hasImage: (item.coverUrl && item.coverUrl.length > 0 ? true : false)}) 88 + ContentCellView({
  89 + content: item,
  90 + index: index,
  91 + needShowNumber: this.needShowNumber,
  92 + hasImage: (item.coverUrl && item.coverUrl.length > 0 ? true : false)
  93 + })
77 } 94 }
78 }, (item: FormNewspaperPaperContent, index) => index + JSON.stringify(item)) 95 }, (item: FormNewspaperPaperContent, index) => index + JSON.stringify(item))
79 } 96 }
@@ -90,11 +107,17 @@ struct DailyNewspaperWidgetCard { @@ -90,11 +107,17 @@ struct DailyNewspaperWidgetCard {
90 107
91 @Component 108 @Component
92 struct ContentCellView { 109 struct ContentCellView {
  110 + @Prop needShowNumber: boolean = false
93 @Prop content: FormNewspaperPaperContent 111 @Prop content: FormNewspaperPaperContent
94 private index : number = 0 112 private index : number = 0
95 private hasImage: boolean = false 113 private hasImage: boolean = false
96 build() { 114 build() {
97 Row() { 115 Row() {
  116 + if (this.needShowNumber) {
  117 + Text((this.index + 1) + "")
  118 + .fontColor("#ED2800")
  119 + .margin({left: 4, right: 4})
  120 + }
98 Text(this.content.title) 121 Text(this.content.title)
99 .maxLines((this.content.coverUrl && this.content.coverUrl.length > 0 ? 2 : 1)) 122 .maxLines((this.content.coverUrl && this.content.coverUrl.length > 0 ? 2 : 1))
100 .textOverflow({ overflow: TextOverflow.Ellipsis }) 123 .textOverflow({ overflow: TextOverflow.Ellipsis })
@@ -48,6 +48,7 @@ export struct VideoChannelPage { @@ -48,6 +48,7 @@ export struct VideoChannelPage {
48 @State isShowAudioCom: boolean = false 48 @State isShowAudioCom: boolean = false
49 // 国殇灰度管理 49 // 国殇灰度管理
50 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage') 50 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
  51 + @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
51 52
52 async aboutToAppear() { 53 async aboutToAppear() {
53 // 背景图高度 54 // 背景图高度
@@ -161,15 +162,30 @@ export struct VideoChannelPage { @@ -161,15 +162,30 @@ export struct VideoChannelPage {
161 .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize)) 162 .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize))
162 .enabled(false) 163 .enabled(false)
163 } else { 164 } else {
164 - Text(item.name)  
165 - .fontSize($r('app.float.selected_text_size'))  
166 - .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)  
167 - .fontColor(this.getTopNavFontColor(item, index))  
168 - .padding({  
169 - top: $r('app.float.top_tab_item_padding_top'),  
170 - bottom: $r('app.float.top_tab_item_padding_bottom')  
171 - })  
172 - .maxLines(this.MAX_LINE) 165 + Stack({ alignContent: Alignment.TopEnd }){
  166 + Text(item.name)
  167 + .fontSize($r('app.float.selected_text_size'))
  168 + .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
  169 + .fontColor(this.getTopNavFontColor(item, index))
  170 + .maxLines(this.MAX_LINE)
  171 + if (item.name == '直播') {
  172 + Button()
  173 + .type(ButtonType.Circle)
  174 + .width(6)
  175 + .height(6)
  176 + .backgroundColor('#ED2800')
  177 + .position({
  178 + x: 36,
  179 + y: -4
  180 + })
  181 + .visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
  182 + }
  183 + }
  184 + .padding({
  185 + top: $r('app.float.top_tab_item_padding_top'),
  186 + bottom: $r('app.float.top_tab_item_padding_bottom')
  187 + })
  188 +
173 189
174 Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) 190 Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
175 .width(20) 191 .width(20)
@@ -186,7 +202,7 @@ export struct VideoChannelPage { @@ -186,7 +202,7 @@ export struct VideoChannelPage {
186 // 视频tab埋点 202 // 视频tab埋点
187 const tab = this.topNavList[index] 203 const tab = this.topNavList[index]
188 this.handleAudio(tab) 204 this.handleAudio(tab)
189 - Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`); 205 + // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
190 const params: ParamType = { 206 const params: ParamType = {
191 "pageName": tab.name, 207 "pageName": tab.name,
192 "tabName": tab.name, 208 "tabName": tab.name,