王士厅
@@ -12,4 +12,5 @@ export interface commentInfo { @@ -12,4 +12,5 @@ export interface commentInfo {
12 relType: string; 12 relType: string;
13 newsType?: string, 13 newsType?: string,
14 objectType?: string, 14 objectType?: string,
  15 + userType?: number
15 } 16 }
@@ -186,8 +186,11 @@ export struct ZhSingleRow06 { @@ -186,8 +186,11 @@ export struct ZhSingleRow06 {
186 this.loadImg 186 this.loadImg
187 ? item.operDataList[0]?.commentInfo?.userHeaderUrl 187 ? item.operDataList[0]?.commentInfo?.userHeaderUrl
188 ? item.operDataList[0].commentInfo.userHeaderUrl 188 ? item.operDataList[0].commentInfo.userHeaderUrl
189 - : $r('app.media.icon_default_head_mater') 189 + : commentViewModel.adjustUserType(item.operDataList[0].commentInfo?.userType)
  190 + ? $r('app.media.WDAccountOwnerHedaerDefaultIcon')
  191 + : $r('app.media.WDAccountDefaultIcon')
190 : $r('app.media.icon_default_head_mater')) 192 : $r('app.media.icon_default_head_mater'))
  193 +
191 .width(32) 194 .width(32)
192 .height(32) 195 .height(32)
193 .borderRadius(16) 196 .borderRadius(16)
@@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI {
26 }else{ 26 }else{
27 this.headPhotoUrl = "" 27 this.headPhotoUrl = ""
28 this.levelHead = "" 28 this.levelHead = ""
  29 + this.userType = "1"
29 } 30 }
30 } 31 }
31 32
@@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI { @@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI {
33 Row(){ 34 Row(){
34 //头像 35 //头像
35 Stack(){ 36 Stack(){
  37 + if (this.headPhotoUrl.length > 0){
36 Image(this.headPhotoUrl) 38 Image(this.headPhotoUrl)
37 - .alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')) 39 + .alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
38 .width(`${this.calcHeight(100)}lpx`) 40 .width(`${this.calcHeight(100)}lpx`)
39 .height(`${this.calcHeight(100)}lpx`) 41 .height(`${this.calcHeight(100)}lpx`)
40 .objectFit(ImageFit.Cover) 42 .objectFit(ImageFit.Cover)
41 .borderRadius(50) 43 .borderRadius(50)
  44 + }else {
  45 + Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
  46 + .width(`${this.calcHeight(100)}lpx`)
  47 + .height(`${this.calcHeight(100)}lpx`)
  48 + .objectFit(ImageFit.Cover)
  49 + .borderRadius(50)
  50 + }
42 51
43 if(StringUtils.isNotEmpty(this.levelHead)){ 52 if(StringUtils.isNotEmpty(this.levelHead)){
44 Image(this.levelHead) 53 Image(this.levelHead)
1 -import { Action, CompDTO, ContentDTO } from 'wdBean';  
2 -import { CommonConstants, ViewType } from 'wdConstant';  
3 -import PageViewModel from '../../viewmodel/PageViewModel';  
4 -import PageModel from '../../viewmodel/PageModel'; 1 +import { Action } from 'wdBean';
5 import router from '@ohos.router'; 2 import router from '@ohos.router';
6 -import { CardParser } from '../CardParser';  
7 -import { channelSkeleton } from '../skeleton/channelSkeleton';  
8 -import { ErrorComponent } from '../view/ErrorComponent';  
9 -import { EmptyComponent } from '../view/EmptyComponent';  
10 -import { listTouchEvent } from '../../utils/PullDownRefresh';  
11 import PageAdModel from '../../viewmodel/PageAdvModel'; 3 import PageAdModel from '../../viewmodel/PageAdvModel';
12 -import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';  
13 -import RefreshLayout from '../refresh/RefreshLayout';  
14 -import PageNoMoreLayout from './PageNoMoreLayout';  
15 -import { NoMoreBean } from './NoMoreBean';  
16 import CommonPageTitle from './CommonPageTitle'; 4 import CommonPageTitle from './CommonPageTitle';
17 import TemplatePageComponent from './template/TemplatePageComponent'; 5 import TemplatePageComponent from './template/TemplatePageComponent';
18 import { TemplatePageConstant } from './template/TemplatePageConstant'; 6 import { TemplatePageConstant } from './template/TemplatePageConstant';
@@ -122,7 +122,6 @@ export default struct TemplatePageComponent { @@ -122,7 +122,6 @@ export default struct TemplatePageComponent {
122 LazyForEach(this.templatePage.compList, (compDTO: CompDTO, index: number) => { 122 LazyForEach(this.templatePage.compList, (compDTO: CompDTO, index: number) => {
123 ListItem() { 123 ListItem() {
124 Column() { 124 Column() {
125 -  
126 CompParser({ 125 CompParser({
127 compDTO: compDTO, 126 compDTO: compDTO,
128 nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, 127 nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO,
@@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp { @@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp {
38 this.treatDiffBusinessDataSource() 38 this.treatDiffBusinessDataSource()
39 } else if (pageModel.compList.size() > 0) { 39 } else if (pageModel.compList.size() > 0) {
40 // 加载缓存数据了,不用无网络提示 40 // 加载缓存数据了,不用无网络提示
  41 + this.closeAnimation(this.pageModel.resolve)
41 } else { 42 } else {
42 // 无网情况 43 // 无网情况
43 this.pageModel.pageCompType = TemplatePageStateType.OTHER 44 this.pageModel.pageCompType = TemplatePageStateType.OTHER
44 this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork 45 this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
  46 +
45 } 47 }
46 } 48 }
47 49
@@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp { @@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp {
293 } 295 }
294 296
295 } 297 }
  298 +
  299 + private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) {
  300 + if (resolve) {
  301 + resolve('')
  302 + }
  303 + }
296 } 304 }
297 305
298 306
@@ -44,9 +44,10 @@ export struct CustomPullToRefresh { @@ -44,9 +44,10 @@ export struct CustomPullToRefresh {
44 this.onRefresh(resolve) 44 this.onRefresh(resolve)
45 }).then((text) => { 45 }).then((text) => {
46 setTimeout(()=>{ 46 setTimeout(()=>{
  47 + this.refreshDestroy()
47 // 延时500,展示第二段动画 TODO 是否去掉? 48 // 延时500,展示第二段动画 TODO 是否去掉?
  49 + if(text){
48 this.refreshState = 3 50 this.refreshState = 3
49 - this.refreshDestroy()  
50 setTimeout(() => { 51 setTimeout(() => {
51 success(text) 52 success(text)
52 }, 500) 53 }, 500)
@@ -54,6 +55,11 @@ export struct CustomPullToRefresh { @@ -54,6 +55,11 @@ export struct CustomPullToRefresh {
54 this.refreshState = 4 55 this.refreshState = 4
55 // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时 56 // 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
56 }, 1200) 57 }, 1200)
  58 + }else {
  59 + success(text)
  60 + this.refreshState = 4
  61 + }
  62 +
57 },500) 63 },500)
58 }) 64 })
59 }); 65 });
@@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent { @@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent {
66 66
67 liveToMore() { 67 liveToMore() {
68 if (!!this.compDTO.dataSourceType) { 68 if (!!this.compDTO.dataSourceType) {
69 - if (this.compDTO.dataSourceType === 'OBJECT_POS') {  
70 - ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)  
71 - return;  
72 - } 69 + // if (this.compDTO.dataSourceType === 'OBJECT_POS') {
  70 + // ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
  71 + // return;
  72 + // }
73 if (this.compDTO.linkUrl) { 73 if (this.compDTO.linkUrl) {
74 let taskAction: Action = { 74 let taskAction: Action = {
75 type: 'JUMP_H5_BY_WEB_VIEW', 75 type: 'JUMP_H5_BY_WEB_VIEW',
@@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent { @@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent {
236 } else if (this.compDTO.operDataList.length) { 236 } else if (this.compDTO.operDataList.length) {
237 // 一个 237 // 一个
238 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] }) 238 LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
  239 + .onClick(() => {
  240 + InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
  241 + if (this.compDTO.operDataList[0].objectType != '0') {
  242 + console.log(this.compDTO.operDataList[0].objectId)
  243 + this.gotoLive(this.compDTO.operDataList[0])
  244 + }
  245 + })
239 } 246 }
240 } 247 }
241 // .width(CommonConstants.FULL_WIDTH) 248 // .width(CommonConstants.FULL_WIDTH)
@@ -4,7 +4,7 @@ import { WDRouterRule } from 'wdRouter/Index' @@ -4,7 +4,7 @@ import { WDRouterRule } from 'wdRouter/Index'
4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' 4 import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'
5 import { Logger } from 'wdKit'; 5 import { Logger } from 'wdKit';
6 import { font, window } from '@kit.ArkUI'; 6 import { font, window } from '@kit.ArkUI';
7 - 7 +const TAG: string = 'ENewspaperListDialog';
8 /** 8 /**
9 * 读报纸半屏弹窗 9 * 读报纸半屏弹窗
10 * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2) 10 * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2)
@@ -19,12 +19,16 @@ export struct ENewspaperListDialog { @@ -19,12 +19,16 @@ export struct ENewspaperListDialog {
19 @State scrollOffset: number = 0 19 @State scrollOffset: number = 0
20 @State isCurrentViewOpen: boolean = false 20 @State isCurrentViewOpen: boolean = false
21 @Consume bottomSafeHeight:number 21 @Consume bottomSafeHeight:number
  22 +
  23 + firstFlag : boolean = true
22 //文字版选择弹框 24 //文字版选择弹框
23 pageListDialogController: CustomDialogController = new CustomDialogController({ 25 pageListDialogController: CustomDialogController = new CustomDialogController({
24 builder: ENewspaperPageDialog({ 26 builder: ENewspaperPageDialog({
25 dialogType: 1, 27 dialogType: 1,
26 newspaperListBean: this.newspaperListBean, 28 newspaperListBean: this.newspaperListBean,
27 dialogVisibility: (visibility: boolean) => { 29 dialogVisibility: (visibility: boolean) => {
  30 +
  31 + console.log(TAG, "ENewspaperPageDialog visibility:", visibility)
28 this.isCurrentViewOpen = !visibility 32 this.isCurrentViewOpen = !visibility
29 } 33 }
30 }), 34 }),
@@ -47,10 +51,15 @@ export struct ENewspaperListDialog { @@ -47,10 +51,15 @@ export struct ENewspaperListDialog {
47 51
48 //watch监听报纸页码回调 52 //watch监听报纸页码回调
49 onCurrentPageNumUpdated(): void { 53 onCurrentPageNumUpdated(): void {
50 - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) 54 + this.firstFlag = false
  55 + console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum)
51 let _scrollIndex = Number.parseInt(this.currentPageNum) 56 let _scrollIndex = Number.parseInt(this.currentPageNum)
52 - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "_scrollIndex:", _scrollIndex) 57 + console.log(TAG, "onCurrentPageNumUpdated _scrollIndex:", _scrollIndex)
53 let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex 58 let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
  59 +
  60 + console.log(TAG, "onCurrentPageNumUpdated scrollIndexEnd:", scrollIndexEnd)
  61 +
  62 + console.log(TAG, "onCurrentPageNumUpdated (!this.isCurrentViewOpen):", ""+!this.isCurrentViewOpen)
54 if (!this.isCurrentViewOpen) { 63 if (!this.isCurrentViewOpen) {
55 this.listScroller.scrollToIndex(scrollIndexEnd) 64 this.listScroller.scrollToIndex(scrollIndexEnd)
56 } 65 }
@@ -69,9 +78,9 @@ export struct ENewspaperListDialog { @@ -69,9 +78,9 @@ export struct ENewspaperListDialog {
69 this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight 78 this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight
70 79
71 this.isCurrentViewOpen = true 80 this.isCurrentViewOpen = true
72 - console.log("ENewspaperListDialog-aboutToAppear", "currentPageNum:", this.currentPageNum) 81 + console.log(TAG, "aboutToAppear currentPageNum:", this.currentPageNum)
73 let _scrollIndex = Number.parseInt(this.currentPageNum) 82 let _scrollIndex = Number.parseInt(this.currentPageNum)
74 - console.log("ENewspaperListDialog-aboutToAppear", "_scrollIndex:", _scrollIndex) 83 + console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex)
75 this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex 84 this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
76 // this.listScroller.scrollToIndex(this.scrollIndex) 85 // this.listScroller.scrollToIndex(this.scrollIndex)
77 } 86 }
@@ -285,7 +294,12 @@ export struct ENewspaperListDialog { @@ -285,7 +294,12 @@ export struct ENewspaperListDialog {
285 // } 294 // }
286 // console.info(`this.scrollOffset:` + this.scrollOffset) 295 // console.info(`this.scrollOffset:` + this.scrollOffset)
287 // if (this.scrollOffset == 0) { 296 // if (this.scrollOffset == 0) {
  297 + if(this.firstFlag){
288 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` 298 this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
  299 + }else {
  300 + this.firstFlag = true
  301 + }
  302 +
289 // } 303 // }
290 }) 304 })
291 } 305 }
@@ -12,7 +12,7 @@ export struct ENewspaperPageDialog { @@ -12,7 +12,7 @@ export struct ENewspaperPageDialog {
12 public dialogVisibility?: (visibility: boolean) => void 12 public dialogVisibility?: (visibility: boolean) => void
13 13
14 onCurrentPageNumUpdated(): void { 14 onCurrentPageNumUpdated(): void {
15 - console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) 15 + console.log('ENewspaperListDialog',"ENewspaperPageDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
16 } 16 }
17 17
18 aboutToAppear(): void { 18 aboutToAppear(): void {
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
16 "wdConstant": "file:../../commons/wdConstant", 16 "wdConstant": "file:../../commons/wdConstant",
17 "wdDetailPlayApi": "file:../../features/wdDetailPlayApi", 17 "wdDetailPlayApi": "file:../../features/wdDetailPlayApi",
18 "wdRouter": "file:../../commons/wdRouter", 18 "wdRouter": "file:../../commons/wdRouter",
19 - "wdTracking": "file:../../features/wdTracking" 19 + "wdTracking": "file:../../features/wdTracking",
  20 + "wdShare": "file:../../features/wdShare"
20 } 21 }
21 } 22 }
@@ -6,6 +6,7 @@ import { DateFormatUtil, PlayerConstants, WDAliPlayerController } from 'wdPlayer @@ -6,6 +6,7 @@ import { DateFormatUtil, PlayerConstants, WDAliPlayerController } from 'wdPlayer
6 import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'; 6 import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
7 import { DisplayDirection } from 'wdConstant/Index'; 7 import { DisplayDirection } from 'wdConstant/Index';
8 import { LiveFollowComponent, LottieView } from 'wdComponent/Index'; 8 import { LiveFollowComponent, LottieView } from 'wdComponent/Index';
  9 +import { WDShare } from 'wdShare/Index';
9 //直播间播放器上层覆盖物 10 //直播间播放器上层覆盖物
10 @Component 11 @Component
11 export struct PlayUIComponent { 12 export struct PlayUIComponent {
@@ -123,6 +124,9 @@ export struct PlayUIComponent { @@ -123,6 +124,9 @@ export struct PlayUIComponent {
123 .width(24) 124 .width(24)
124 .aspectRatio(1) 125 .aspectRatio(1)
125 .visibility(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? Visibility.Visible : Visibility.None) 126 .visibility(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? Visibility.Visible : Visibility.None)
  127 + .onClick(() => {
  128 + WDShare.shareContent(this.contentDetailData)
  129 + })
126 } 130 }
127 .width('100%') 131 .width('100%')
128 .alignItems(VerticalAlign.Center) 132 .alignItems(VerticalAlign.Center)
@@ -5,6 +5,7 @@ import { NumberFormatterUtils, WindowModel } from 'wdKit/Index' @@ -5,6 +5,7 @@ import { NumberFormatterUtils, WindowModel } from 'wdKit/Index'
5 import { window } from '@kit.ArkUI' 5 import { window } from '@kit.ArkUI'
6 import { WDAliPlayerController } from 'wdPlayer/Index' 6 import { WDAliPlayerController } from 'wdPlayer/Index'
7 import { DisplayDirection } from 'wdConstant/Index' 7 import { DisplayDirection } from 'wdConstant/Index'
  8 +import { WDShare } from 'wdShare/Index'
8 9
9 /** 10 /**
10 * 沉浸式直播--- 头部标题 11 * 沉浸式直播--- 头部标题
@@ -76,6 +77,9 @@ export struct PlayerTitleComponent { @@ -76,6 +77,9 @@ export struct PlayerTitleComponent {
76 .aspectRatio(1) 77 .aspectRatio(1)
77 .visibility((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? Visibility.Visible : Visibility.None) 78 .visibility((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? Visibility.Visible : Visibility.None)
78 .margin({right:16}) 79 .margin({right:16})
  80 + .onClick(() => {
  81 + WDShare.shareContent(this.contentDetailData)
  82 + })
79 }.margin({ bottom: 10 }) 83 }.margin({ bottom: 10 })
80 84
81 Row() { 85 Row() {
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 "main": "", 7 "main": "",
8 "version": "1.0.0", 8 "version": "1.0.0",
9 "dependencies": { 9 "dependencies": {
10 - "@ohos/lottie": "2.0.10", 10 + "@ohos/lottie": "v2.0.11-rc.6",
11 "wdComponent": "file:../../features/wdComponent", 11 "wdComponent": "file:../../features/wdComponent",
12 "wdConstant": "file:../../commons/wdConstant", 12 "wdConstant": "file:../../commons/wdConstant",
13 "wdKit": "file:../../commons/wdKit", 13 "wdKit": "file:../../commons/wdKit",