张善主

Merge remote-tracking branch 'origin/main'

Showing 23 changed files with 306 additions and 120 deletions
@@ -54,7 +54,7 @@ export struct PaperTitleComponent { @@ -54,7 +54,7 @@ export struct PaperTitleComponent {
54 .margin({ left: 10 }) 54 .margin({ left: 10 })
55 .fontSize(22) 55 .fontSize(22)
56 .fontColor($r('app.color.white')) 56 .fontColor($r('app.color.white'))
57 - .fontWeight(900) 57 + .fontFamily('Source Han Serif CN')
58 .maxLines(1) 58 .maxLines(1)
59 59
60 60
@@ -133,7 +133,7 @@ export struct PaperTitleComponent { @@ -133,7 +133,7 @@ export struct PaperTitleComponent {
133 .linearGradient({ 133 .linearGradient({
134 direction: GradientDirection.Right, // 渐变方向 134 direction: GradientDirection.Right, // 渐变方向
135 repeating: false, // 渐变颜色是否重复 135 repeating: false, // 渐变颜色是否重复
136 - colors: [[0x4dffffff, 0.0], [0x33ffffff, 0.3], [0x1affffff,0.6], [0x03ffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果 136 + colors: [[0x4dffffff, 0.0], [0x33ffffff, 0.2], [0x1affffff,0.6], [0x03ffffff,1]] // 数组末尾元素占比小于1时满足重复着色效果
137 }) 137 })
138 .margin({ left:8, right: 0}) 138 .margin({ left:8, right: 0})
139 139
1 import { commentItemModel } from './CommentModel' 1 import { commentItemModel } from './CommentModel'
2 2
  3 +/**
  4 + * 发布评论
  5 + */
3 @Observed 6 @Observed
4 export class publishCommentModel { 7 export class publishCommentModel {
5 8
1 import { inputMethodEngine } from '@kit.IMEKit' 1 import { inputMethodEngine } from '@kit.IMEKit'
2 import { commentInfo } from 'wdBean/Index' 2 import { commentInfo } from 'wdBean/Index'
  3 +import { ToastUtils } from 'wdKit/Index'
  4 +import { HttpUtils } from 'wdNetwork/Index'
3 import { commentItemModel } from '../model/CommentModel' 5 import { commentItemModel } from '../model/CommentModel'
4 import { publishCommentModel } from '../model/PublishCommentModel' 6 import { publishCommentModel } from '../model/PublishCommentModel'
5 import commentViewModel from '../viewmodel/CommentViewModel' 7 import commentViewModel from '../viewmodel/CommentViewModel'
@@ -40,6 +42,17 @@ export struct CommentCustomDialog { @@ -40,6 +42,17 @@ export struct CommentCustomDialog {
40 } 42 }
41 } 43 }
42 44
  45 + // 未登录,游客评论未打开 则先登录
  46 + if (!HttpUtils.isLogin()) {
  47 + if (this.publishCommentModel.visitorComment != "1") {
  48 + ToastUtils.showToast("暂时无法评论", 3000)
  49 +
  50 + this.publishCommentModel.commentContent = ''
  51 + this.controller?.close()
  52 + return
  53 + }
  54 + }
  55 +
43 // 点击时 即可埋点 56 // 点击时 即可埋点
44 if (this.onPublishBtnClickTrack) { 57 if (this.onPublishBtnClickTrack) {
45 this.onPublishBtnClickTrack() 58 this.onPublishBtnClickTrack()
@@ -24,7 +24,10 @@ export struct CommentListDialogView { @@ -24,7 +24,10 @@ export struct CommentListDialogView {
24 pageInfo: this.pageInfo, 24 pageInfo: this.pageInfo,
25 onClose: this.onClose 25 onClose: this.onClose
26 }), 26 }),
27 - autoCancel: false, 27 + autoCancel: true,
  28 + cancel: () => {
  29 + PublicDialogManager.shareInstance().closeDialog(this.dialogController)
  30 + },
28 customStyle: true, 31 customStyle: true,
29 alignment: DialogAlignment.Bottom, 32 alignment: DialogAlignment.Bottom,
30 }) 33 })
@@ -128,13 +128,13 @@ export struct CommentTabComponent { @@ -128,13 +128,13 @@ export struct CommentTabComponent {
128 if(this.contentDetail.appstyle === 9) return 128 if(this.contentDetail.appstyle === 9) return
129 this.onCommentFocus && this.onCommentFocus() 129 this.onCommentFocus && this.onCommentFocus()
130 130
131 - // 未登录,游客评论未打开 则先登录  
132 - if (!HttpUtils.isLogin()) {  
133 - if (this.contentDetail.visitorComment != 1) {  
134 - WDRouterRule.jumpWithPage(WDRouterPage.loginPage)  
135 - return  
136 - }  
137 - } 131 + // 未登录,游客评论未打开 则先登录 ,这里逻辑 放到 发布按钮事件判断了
  132 + // if (!HttpUtils.isLogin()) {
  133 + // if (this.contentDetail.visitorComment != 1) {
  134 + // ToastUtils.showToast("暂时无法评论", 3000)
  135 + // return
  136 + // }
  137 + // }
138 138
139 if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) { 139 if (this.contentDetail.openComment != 1 && this.contentDetail.commentDisplay != 1) {
140 ToastUtils.showToast("暂时无法评论", 3000) 140 ToastUtils.showToast("暂时无法评论", 3000)
@@ -61,10 +61,14 @@ export struct ZhSingleRow02 { @@ -61,10 +61,14 @@ export struct ZhSingleRow02 {
61 if (this.moreWidth > this.initMoreWidth * 2) { 61 if (this.moreWidth > this.initMoreWidth * 2) {
62 if (this.compDTO?.objectType === '11') { 62 if (this.compDTO?.objectType === '11') {
63 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) 63 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
64 - } else if (this.compDTO?.objectType === '5') {  
65 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
66 - } else if (this.compDTO?.objectType === '6') {  
67 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 64 + } else {
  65 + const contentDTO: ContentDTO = {
  66 + objectId: this.compDTO.objectId,
  67 + objectType: this.compDTO.objectType,
  68 + linkUrl: this.compDTO.linkUrl,
  69 + pageId: this.compDTO.pageId
  70 + } as ContentDTO
  71 + ProcessUtils.processPage(contentDTO)
68 } 72 }
69 } 73 }
70 } 74 }
@@ -181,10 +185,14 @@ export struct ZhSingleRow02 { @@ -181,10 +185,14 @@ export struct ZhSingleRow02 {
181 .onClick(() => { 185 .onClick(() => {
182 if (this.compDTO?.objectType === '11') { 186 if (this.compDTO?.objectType === '11') {
183 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle) 187 ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
184 - } else if (this.compDTO?.objectType === '5') {  
185 - ProcessUtils._gotoSpecialTopic(this.compDTO.linkUrl)  
186 - } else if (this.compDTO?.objectType === '6') {  
187 - ProcessUtils._gotoDefaultWeb(this.compDTO.linkUrl) 188 + } else {
  189 + const contentDTO: ContentDTO = {
  190 + objectId: this.compDTO.objectId,
  191 + objectType: this.compDTO.objectType,
  192 + linkUrl: this.compDTO.linkUrl,
  193 + pageId: this.compDTO.pageId
  194 + } as ContentDTO
  195 + ProcessUtils.processPage(contentDTO)
188 } 196 }
189 }) 197 })
190 } 198 }
@@ -83,7 +83,7 @@ export default struct MinePageUserSimpleInfoUI { @@ -83,7 +83,7 @@ export default struct MinePageUserSimpleInfoUI {
83 .textAlign(TextAlign.Center) 83 .textAlign(TextAlign.Center)
84 .fontColor($r('app.color.white')) 84 .fontColor($r('app.color.white'))
85 .fontSize(`${this.calcHeight(19)}lpx`) 85 .fontSize(`${this.calcHeight(19)}lpx`)
86 - .width(`${this.calcHeight(50)}lpx`) 86 + .width(this.levelId>9?`${this.calcHeight(69)}lpx`:`${this.calcHeight(50)}lpx`)
87 .height(`${this.calcHeight(29)}lpx`) 87 .height(`${this.calcHeight(29)}lpx`)
88 }.margin({top:'`${this.calcHeight(15)}lpx`'}) 88 }.margin({top:'`${this.calcHeight(15)}lpx`'})
89 }.alignItems(HorizontalAlign.Start) 89 }.alignItems(HorizontalAlign.Start)
@@ -159,6 +159,9 @@ export struct AppointmentListUI { @@ -159,6 +159,9 @@ export struct AppointmentListUI {
159 this.count = this.data.totalCount() 159 this.count = this.data.totalCount()
160 if (this.data.totalCount() < value.totalCount) { 160 if (this.data.totalCount() < value.totalCount) {
161 this.curPageNum++ 161 this.curPageNum++
  162 + if(this.count < 5){
  163 + this.getNewPageData()
  164 + }
162 } else { 165 } else {
163 this.hasMore = false 166 this.hasMore = false
164 } 167 }
@@ -451,9 +451,9 @@ export struct PaperSingleColumn999CardView { @@ -451,9 +451,9 @@ export struct PaperSingleColumn999CardView {
451 Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000)) 451 Text(DateTimeUtils.getFormattedDuration(this.item?.videoInfo.videoDuration * 1000))
452 .fontColor(Color.White) 452 .fontColor(Color.White)
453 .fontSize($r('app.float.vp_12')) 453 .fontSize($r('app.float.vp_12'))
454 - .fontWeight(500)  
455 .textAlign(TextAlign.End) 454 .textAlign(TextAlign.End)
456 .lineHeight(18) 455 .lineHeight(18)
  456 + .fontFamily('BebasNeue')
457 .textShadow({ 457 .textShadow({
458 radius: 2, 458 radius: 2,
459 color: 'rgba(0,0,0,0.3)', 459 color: 'rgba(0,0,0,0.3)',
@@ -509,7 +509,7 @@ export struct PaperSingleColumn999CardView { @@ -509,7 +509,7 @@ export struct PaperSingleColumn999CardView {
509 Text(this.item?.photoNum.toString()) 509 Text(this.item?.photoNum.toString())
510 .fontColor(Color.White) 510 .fontColor(Color.White)
511 .fontSize($r('app.float.vp_12')) 511 .fontSize($r('app.float.vp_12'))
512 - .fontWeight(500) 512 + .fontFamily('BebasNeue')
513 .textAlign(TextAlign.End) 513 .textAlign(TextAlign.End)
514 .lineHeight(18) 514 .lineHeight(18)
515 .textShadow({ 515 .textShadow({
@@ -98,12 +98,14 @@ struct InteractMessagePage { @@ -98,12 +98,14 @@ struct InteractMessagePage {
98 Column(){ 98 Column(){
99 Row(){ 99 Row(){
100 Text('共获') 100 Text('共获')
101 - .fontSize(18) 101 + .fontSize(18).height(40).align(Alignment.Bottom)
102 Text(this.likeNum.toString()) 102 Text(this.likeNum.toString())
103 - .fontSize(30) 103 + .fontSize(40)
104 .fontColor(Color.Red) 104 .fontColor(Color.Red)
  105 + .fontFamily('BebasNeue')
  106 + .margin(5).height(40).align(Alignment.Bottom)
105 Text('赞') 107 Text('赞')
106 - .fontSize(18) 108 + .fontSize(18).height(40).align(Alignment.Bottom)
107 109
108 }.height(75) 110 }.height(75)
109 111
@@ -261,6 +261,7 @@ struct MyCollectionListPage { @@ -261,6 +261,7 @@ struct MyCollectionListPage {
261 261
262 if (this.allDatas.length === 0) { 262 if (this.allDatas.length === 0) {
263 this.browSingModel.viewType = ViewType.EMPTY; 263 this.browSingModel.viewType = ViewType.EMPTY;
  264 + this.browSingModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoCollection
264 this.browSingModel.hasMore === true 265 this.browSingModel.hasMore === true
265 this.isDisplayButton = false; 266 this.isDisplayButton = false;
266 } 267 }
1 import { SpConstants } from 'wdConstant'; 1 import { SpConstants } from 'wdConstant';
2 -import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils } from 'wdKit'; 2 +import { Logger, SPHelper, ToastUtils, EmitterEventId, EmitterUtils, DateTimeUtils, CustomToast } from 'wdKit';
3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem'; 3 import {MineMainSettingFunctionItem} from '../../viewmodel/MineMainSettingFunctionItem';
4 import MineSettingDatasModel from '../../model/MineSettingDatasModel'; 4 import MineSettingDatasModel from '../../model/MineSettingDatasModel';
5 import router from '@ohos.router'; 5 import router from '@ohos.router';
@@ -31,6 +31,17 @@ export struct AccountAndSecurityLayout { @@ -31,6 +31,17 @@ export struct AccountAndSecurityLayout {
31 pageShowAccountTime:number = 0; 31 pageShowAccountTime:number = 0;
32 pageHideAccountTime:number = 0; 32 pageHideAccountTime:number = 0;
33 33
  34 + @State toastText:string = ""
  35 + dialogToast: CustomDialogController = new CustomDialogController({
  36 + builder: CustomToast({
  37 + msg: this.toastText,
  38 + }),
  39 + autoCancel: false,
  40 + alignment: DialogAlignment.Center,
  41 + customStyle: true,
  42 + maskColor:"#00000000"
  43 + })
  44 +
34 //注销账户 浏览埋点 45 //注销账户 浏览埋点
35 logoutLayoutHide(){ 46 logoutLayoutHide(){
36 this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp() 47 this.logoutLayoutHideTime = DateTimeUtils.getTimeStamp()
@@ -127,9 +138,6 @@ export struct AccountAndSecurityLayout { @@ -127,9 +138,6 @@ export struct AccountAndSecurityLayout {
127 138
128 // 收到eventId为1的事件后执行该回调 139 // 收到eventId为1的事件后执行该回调
129 let callback = (eventData: emitter.EventData): void => { 140 let callback = (eventData: emitter.EventData): void => {
130 - // promptAction.showToast({  
131 - // message: JSON.stringify(eventData)  
132 - // });  
133 if(eventData&&eventData.data){ 141 if(eventData&&eventData.data){
134 this.listData[0].subTitle = eventData.data['content'] 142 this.listData[0].subTitle = eventData.data['content']
135 } 143 }
@@ -477,11 +485,11 @@ export struct AccountAndSecurityLayout { @@ -477,11 +485,11 @@ export struct AccountAndSecurityLayout {
477 logout(){ 485 logout(){
478 let login = new LoginViewModel; 486 let login = new LoginViewModel;
479 login.logOut().then(()=>{ 487 login.logOut().then(()=>{
480 - promptAction.showToast({ message: '退出登录' }) 488 + this.showToastTip('退出登录')
481 EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION) 489 EmitterUtils.sendEvent(EmitterEventId.PEOPLE_SHIP_ATTENTION)
482 router.back(); 490 router.back();
483 }).catch((error:string)=>{ 491 }).catch((error:string)=>{
484 - promptAction.showToast({ message: error }) 492 + this.showToastTip(error)
485 }); 493 });
486 } 494 }
487 495
@@ -500,6 +508,11 @@ export struct AccountAndSecurityLayout { @@ -500,6 +508,11 @@ export struct AccountAndSecurityLayout {
500 securityNum = phoneNum.replace(needSecurityString,'****') 508 securityNum = phoneNum.replace(needSecurityString,'****')
501 return securityNum; 509 return securityNum;
502 } 510 }
  511 +
  512 + showToastTip(msg:string){
  513 + this.toastText = msg
  514 + this.dialogToast.open()
  515 + }
503 } 516 }
504 517
505 @Component 518 @Component
@@ -53,14 +53,23 @@ export struct LiveHorizontalCardComponent { @@ -53,14 +53,23 @@ export struct LiveHorizontalCardComponent {
53 53
54 resetEdgeAnimation() { 54 resetEdgeAnimation() {
55 if (this.moreWidth > this.initMoreWidth) { 55 if (this.moreWidth > this.initMoreWidth) {
56 - this.moreWidth = this.moreWidth - 1  
57 - this.resetEdgeAnimation(); 56 + this.moreWidth = 16
58 } 57 }
59 this.resetMoreTips() 58 this.resetMoreTips()
60 } 59 }
61 60
62 toMore() { 61 toMore() {
63 if (this.moreWidth > this.initMoreWidth * 2) { 62 if (this.moreWidth > this.initMoreWidth * 2) {
  63 + this.liveToMore();
  64 + }
  65 + }
  66 +
  67 + liveToMore() {
  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 + }
64 if (this.compDTO.linkUrl) { 73 if (this.compDTO.linkUrl) {
65 let taskAction: Action = { 74 let taskAction: Action = {
66 type: 'JUMP_H5_BY_WEB_VIEW', 75 type: 'JUMP_H5_BY_WEB_VIEW',
@@ -72,8 +81,19 @@ export struct LiveHorizontalCardComponent { @@ -72,8 +81,19 @@ export struct LiveHorizontalCardComponent {
72 } else { 81 } else {
73 this.jumpToLiveMorePage() 82 this.jumpToLiveMorePage()
74 } 83 }
  84 + } else {
  85 + if (this.compDTO?.objectType === '11') {
  86 + } else {
  87 + const contentDTO: ContentDTO = {
  88 + objectId: this.compDTO.objectId,
  89 + objectType: this.compDTO.objectType,
  90 + linkUrl: this.compDTO.linkUrl,
  91 + pageId: this.compDTO.pageId
  92 + } as ContentDTO
  93 + ProcessUtils.processPage(contentDTO)
  94 + }
75 } 95 }
76 - } 96 +}
77 97
78 async aboutToAppear(): Promise<void> { 98 async aboutToAppear(): Promise<void> {
79 this.loadImg = await onlyWifiLoadImg(); 99 this.loadImg = await onlyWifiLoadImg();
@@ -105,17 +125,7 @@ export struct LiveHorizontalCardComponent { @@ -105,17 +125,7 @@ export struct LiveHorizontalCardComponent {
105 .height(14) 125 .height(14)
106 } 126 }
107 .onClick(() => { 127 .onClick(() => {
108 - if (this.compDTO.linkUrl) {  
109 - let taskAction: Action = {  
110 - type: 'JUMP_H5_BY_WEB_VIEW',  
111 - params: {  
112 - url: this.compDTO.linkUrl  
113 - } as Params,  
114 - };  
115 - WDRouterRule.jumpWithAction(taskAction)  
116 - } else {  
117 - this.jumpToLiveMorePage()  
118 - } 128 + this.liveToMore();
119 }) 129 })
120 } 130 }
121 }.justifyContent(FlexAlign.SpaceBetween) 131 }.justifyContent(FlexAlign.SpaceBetween)
@@ -201,7 +211,6 @@ export struct LiveHorizontalCardComponent { @@ -201,7 +211,6 @@ export struct LiveHorizontalCardComponent {
201 .onTouch((event?: TouchEvent) => { 211 .onTouch((event?: TouchEvent) => {
202 if(event) { 212 if(event) {
203 if (event.type === TouchType.Up) { 213 if (event.type === TouchType.Up) {
204 - this.toMore();  
205 this.resetEdgeAnimation(); 214 this.resetEdgeAnimation();
206 } 215 }
207 } 216 }
@@ -8,6 +8,7 @@ import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index'; @@ -8,6 +8,7 @@ import { DateTimeUtils, Logger, ToastUtils } from 'wdKit/Index';
8 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'; 8 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
9 import { PictureLoading } from '../widgets/vertical/PictureLoading'; 9 import { PictureLoading } from '../widgets/vertical/PictureLoading';
10 import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index'; 10 import { TrackConstants, TrackingButton, TrackingPageBrowse } from 'wdTracking/Index';
  11 +import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
11 12
12 const TAG = 'DetailPlayLiveCommon' 13 const TAG = 'DetailPlayLiveCommon'
13 14
@@ -24,23 +25,39 @@ const TAG = 'DetailPlayLiveCommon' @@ -24,23 +25,39 @@ const TAG = 'DetailPlayLiveCommon'
24 export struct DetailPlayLiveCommon { 25 export struct DetailPlayLiveCommon {
25 private liveViewModel: LiveViewModel = new LiveViewModel() 26 private liveViewModel: LiveViewModel = new LiveViewModel()
26 pageShowTime: number = 0; 27 pageShowTime: number = 0;
  28 +
27 @Provide relId: string = '' 29 @Provide relId: string = ''
28 @Provide contentId: string = '' 30 @Provide contentId: string = ''
29 @Provide relType: string = '' 31 @Provide relType: string = ''
  32 +
  33 + // 直播状态
30 @Provide liveState: string = '' 34 @Provide liveState: string = ''
  35 + // 直播样式 0-正常模式,1-隐藏直播 2-隐藏大家聊
31 @Provide liveStyle: number = -1 36 @Provide liveStyle: number = -1
  37 + // 直播地址
32 @Provide playUrl: string = '' 38 @Provide playUrl: string = ''
33 - @Provide imgUrl: string = '' 39 + // // 直播间背景图
  40 + // @Provide imgUrl: string = ''
  41 + // 全屏展示
34 @Provide pageShow: number = -1 42 @Provide pageShow: number = -1
  43 + // 关闭全屏
35 @Provide pageHide: number = -1 44 @Provide pageHide: number = -1
  45 + // 返回功能
36 @Provide pageBackPress: number = -1 46 @Provide pageBackPress: number = -1
  47 +
  48 +
  49 + @Provide liveDetailPageLogic :LiveDetailPageLogic = new LiveDetailPageLogic
  50 + // 直播详情内容
37 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO 51 @Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
  52 + //发布评论 Model
38 @Provide publishCommentModel: publishCommentModel = new publishCommentModel() 53 @Provide publishCommentModel: publishCommentModel = new publishCommentModel()
  54 +
  55 + // 埋点
39 @Provide pageId: string = TrackConstants.PageName.Live_Detail 56 @Provide pageId: string = TrackConstants.PageName.Live_Detail
40 @Provide pageName: string = TrackConstants.PageName.Live_Detail 57 @Provide pageName: string = TrackConstants.PageName.Live_Detail
41 - // 横屏或竖屏 general-竖屏,news-横屏  
42 - @State liveLandscape: string = ''  
43 - @State isLoading: boolean = false 58 +
  59 + // 是否隐藏Loading view
  60 + @State isHideLoading: boolean = false
44 61
45 async aboutToAppear(): Promise<void> { 62 async aboutToAppear(): Promise<void> {
46 const par: Action = router.getParams() as Action; 63 const par: Action = router.getParams() as Action;
@@ -55,14 +72,14 @@ export struct DetailPlayLiveCommon { @@ -55,14 +72,14 @@ export struct DetailPlayLiveCommon {
55 build() { 72 build() {
56 Column() { 73 Column() {
57 // 直播预约或横屏直播统一进横屏直播 74 // 直播预约或横屏直播统一进横屏直播
58 - if (this.liveState === 'wait' || this.liveLandscape === 'news') { 75 + if (this.liveDetailPageLogic.isLangScapeScreenVideo()) {
59 // 非沉浸式直播 76 // 非沉浸式直播
60 DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType }) 77 DetailPlayLivePage({ contentId: this.contentId, relId: this.relId, relType: this.relType })
61 - } else if (this.liveLandscape === 'general') { 78 + } else if (this.liveDetailPageLogic.isVerticalScreenVideo()) {
62 // 沉浸式直播 79 // 沉浸式直播
63 DetailPlayVLivePage() 80 DetailPlayVLivePage()
64 } else { 81 } else {
65 - PictureLoading().visibility(this.isLoading ? Visibility.None : Visibility.Visible) 82 + PictureLoading().visibility(this.isHideLoading ? Visibility.None : Visibility.Visible)
66 } 83 }
67 } 84 }
68 .height('100%') 85 .height('100%')
@@ -93,13 +110,17 @@ export struct DetailPlayLiveCommon { @@ -93,13 +110,17 @@ export struct DetailPlayLiveCommon {
93 } 110 }
94 } 111 }
95 112
96 - this.liveLandscape =  
97 - detailData?.liveInfo?.liveLandScape 113 +
98 114
99 this.liveState = detailData.liveInfo?.liveState 115 this.liveState = detailData.liveInfo?.liveState
100 116
101 this.contentDetailData = data[0] 117 this.contentDetailData = data[0]
102 118
  119 + this.liveDetailPageLogic.contentDetailData = this.contentDetailData
  120 + this.liveDetailPageLogic.liveLandscape = detailData?.liveInfo?.liveLandScape
  121 + this.liveDetailPageLogic.liveState = detailData.liveInfo?.liveState
  122 + this.liveDetailPageLogic.resolvingRoomBackgroundImgUrl()
  123 +
103 this.publishCommentModel.targetId = String(detailData?.newsId || '') 124 this.publishCommentModel.targetId = String(detailData?.newsId || '')
104 this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '') 125 this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '')
105 this.publishCommentModel.targetTitle = detailData?.newsTitle 126 this.publishCommentModel.targetTitle = detailData?.newsTitle
@@ -110,22 +131,25 @@ export struct DetailPlayLiveCommon { @@ -110,22 +131,25 @@ export struct DetailPlayLiveCommon {
110 this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '') 131 this.publishCommentModel.visitorComment = String(detailData?.visitorComment || '')
111 this.publishCommentModel.commentContent = '' 132 this.publishCommentModel.commentContent = ''
112 this.liveStyle = detailData.liveInfo?.liveStyle 133 this.liveStyle = detailData.liveInfo?.liveStyle
113 -  
114 - if (detailData.fullColumnImgUrls && detailData.fullColumnImgUrls.length > 0) {  
115 - this.imgUrl = detailData.fullColumnImgUrls[0].url  
116 - } 134 + //
  135 + // if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl &&
  136 + // this.contentDetailData.liveInfo.previewUrl.length > 0) {
  137 + // this.imgUrl = this.contentDetailData.liveInfo.previewUrl
  138 + // } else if (detailData.fullColumnImgUrls && detailData.fullColumnImgUrls.length > 0) {
  139 + // this.imgUrl = detailData.fullColumnImgUrls[0].url
  140 + // }
117 141
118 if (detailData.liveInfo.liveState == 'end') { 142 if (detailData.liveInfo.liveState == 'end') {
119 this.playUrl = detailData.liveInfo.vlive[0].replayUri 143 this.playUrl = detailData.liveInfo.vlive[0].replayUri
120 } 144 }
121 145
122 } else { 146 } else {
123 - this.isLoading 147 + this.isHideLoading = true
124 ToastUtils.shortToast('内容不存在') 148 ToastUtils.shortToast('内容不存在')
125 router.back() 149 router.back()
126 } 150 }
127 }, () => { 151 }, () => {
128 - this.isLoading 152 + this.isHideLoading = true
129 ToastUtils.shortToast('内容不存在') 153 ToastUtils.shortToast('内容不存在')
130 router.back() 154 router.back()
131 155
@@ -8,6 +8,7 @@ import { DisplayDirection } from 'wdConstant/Index'; @@ -8,6 +8,7 @@ import { DisplayDirection } from 'wdConstant/Index';
8 import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index'; 8 import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView'; 9 import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
10 import { TrackConstants, TrackingButton } from 'wdTracking/Index'; 10 import { TrackConstants, TrackingButton } from 'wdTracking/Index';
  11 +import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
11 12
12 const storage = LocalStorage.getShared(); 13 const storage = LocalStorage.getShared();
13 const TAG = 'DetailPlayVLivePage' 14 const TAG = 'DetailPlayVLivePage'
@@ -29,12 +30,14 @@ export struct DetailPlayVLivePage { @@ -29,12 +30,14 @@ export struct DetailPlayVLivePage {
29 @Consume liveState: string 30 @Consume liveState: string
30 @Consume liveStyle: number 31 @Consume liveStyle: number
31 @Consume playUrl: string 32 @Consume playUrl: string
32 - @Consume imgUrl: string 33 + // @Consume imgUrl: string
33 @Consume @Watch('openFullScreen') pageShow: number 34 @Consume @Watch('openFullScreen') pageShow: number
34 @Consume @Watch('closeFullScreen') pageHide: number 35 @Consume @Watch('closeFullScreen') pageHide: number
35 @Consume contentId: string 36 @Consume contentId: string
36 @State swiperIndex: number = 1 37 @State swiperIndex: number = 1
37 38
  39 + @Consume liveDetailPageLogic :LiveDetailPageLogic
  40 +
38 aboutToAppear(): void { 41 aboutToAppear(): void {
39 this.openFullScreen() 42 this.openFullScreen()
40 this.getLiveRoomData() 43 this.getLiveRoomData()
@@ -61,7 +64,7 @@ export struct DetailPlayVLivePage { @@ -61,7 +64,7 @@ export struct DetailPlayVLivePage {
61 64
62 Stack() { 65 Stack() {
63 // 直播背景图,模糊处理 66 // 直播背景图,模糊处理
64 - Image(this.imgUrl) 67 + Image(this.liveDetailPageLogic.imgUrl)
65 .height('100%') 68 .height('100%')
66 .width('100%') 69 .width('100%')
67 .blur(100) 70 .blur(100)
  1 +import { ContentDetailDTO } from 'wdBean/Index'
  2 +
  3 +
  4 +/**
  5 + * 直播信息对象逻辑加工处理的工具类
  6 + */
  7 +export class LiveDetailPageLogic {
  8 + // 直播状态
  9 + liveState: string = ''
  10 + // 横屏或竖屏 general-竖屏,news-横屏
  11 + liveLandscape: string = ''
  12 + // 直播样式 0-正常模式,1-隐藏直播 2-隐藏大家聊
  13 + liveStyle: number = -1
  14 + // 预告片图片/视频url
  15 + imgUrl: string = ''
  16 +
  17 +
  18 +
  19 + /**
  20 + * 直播详情页面,展示的直播信息对象
  21 + */
  22 + contentDetailData: ContentDetailDTO = new ContentDetailDTO
  23 +
  24 + /**
  25 + * 横屏直播
  26 + * @returns true:横屏直播;false:竖屏直播
  27 + */
  28 + isLangScapeScreenVideo(): boolean {
  29 +
  30 + return this.liveState === 'wait' || this.liveLandscape === 'news'
  31 + }
  32 +
  33 +
  34 + /**
  35 + * 竖屏直播
  36 + * @returns
  37 + */
  38 + isVerticalScreenVideo(): boolean {
  39 +
  40 + return this.liveLandscape === 'general'
  41 + }
  42 +
  43 +
  44 + /**
  45 + * 解析背景图片资源
  46 + */
  47 + resolvingRoomBackgroundImgUrl() {
  48 +
  49 + if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl &&
  50 + this.contentDetailData.liveInfo.previewUrl.length > 0) {
  51 + this.imgUrl = this.contentDetailData.liveInfo.previewUrl
  52 + } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) {
  53 + this.imgUrl = this.contentDetailData.fullColumnImgUrls[0].url
  54 + }
  55 + }
  56 +}
1 -import { ContentDetailDTO, LiveDetailsBean, LiveRoomItemBean } from 'wdBean/Index' 1 +import { ContentDetailDTO, LiveRoomItemBean } from 'wdBean/Index'
2 import { CustomPullToRefresh, EmptyComponent, ErrorComponent, WDViewDefaultType } from 'wdComponent/Index' 2 import { CustomPullToRefresh, EmptyComponent, ErrorComponent, WDViewDefaultType } from 'wdComponent/Index'
3 import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout' 3 import CustomRefreshLoadLayout from 'wdComponent/src/main/ets/components/page/CustomRefreshLoadLayout'
4 -import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout'  
5 import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean' 4 import { RefreshLayoutBean } from 'wdComponent/src/main/ets/components/page/RefreshLayoutBean'
6 import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel' 5 import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel'
7 import { ViewType } from 'wdConstant/Index' 6 import { ViewType } from 'wdConstant/Index'
8 import { LiveViewModel } from '../../viewModel/LiveViewModel' 7 import { LiveViewModel } from '../../viewModel/LiveViewModel'
9 import { TabChatItemComponent } from './TabChatItemComponent' 8 import { TabChatItemComponent } from './TabChatItemComponent'
10 -import { EmitterEventId, EmitterUtils, LazyDataSource, Logger } from 'wdKit'; 9 +import { EmitterEventId, EmitterUtils, LazyDataSource, Logger } from 'wdKit'
11 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel' 10 import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel'
12 -import { PeopleShipNoMoreData } from 'wdComponent/src/main/ets/components/reusable/PeopleShipNoMoreData'  
13 -import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLayout'  
14 11
15 const TAG: string = 'TabChatComponent'; 12 const TAG: string = 'TabChatComponent';
16 13
@@ -23,14 +20,26 @@ export struct TabChatComponent { @@ -23,14 +20,26 @@ export struct TabChatComponent {
23 @State private pageModel: PageModel = new PageModel() 20 @State private pageModel: PageModel = new PageModel()
24 liveViewModel: LiveViewModel = new LiveViewModel() 21 liveViewModel: LiveViewModel = new LiveViewModel()
25 @State liveChatList: LazyDataSource<LiveRoomItemBean> = new LazyDataSource(); 22 @State liveChatList: LazyDataSource<LiveRoomItemBean> = new LazyDataSource();
26 -  
27 - // @State liveList: LazyDataSource<LiveRoomItemBean> = new LazyDataSource();  
28 @Consume contentDetailData: ContentDetailDTO 23 @Consume contentDetailData: ContentDetailDTO
29 @Consume publishCommentModel: publishCommentModel 24 @Consume publishCommentModel: publishCommentModel
30 @Prop @Watch("lastInputedCommentChanged") lastInputedComment: LiveRoomItemBean 25 @Prop @Watch("lastInputedCommentChanged") lastInputedComment: LiveRoomItemBean
31 private scroller: Scroller = new Scroller() 26 private scroller: Scroller = new Scroller()
  27 + index: number = 0
  28 + @Prop @Watch('updateData') parentComponentIndex: number
  29 + private initUI: boolean = true
  30 +
  31 + /**
  32 + *
  33 + */
  34 + updateData() {
  35 +
  36 + if (this.index === this.parentComponentIndex && this.initUI) {
  37 + this.getLiveList()
  38 + }
  39 +
  40 + }
  41 +
32 aboutToAppear(): void { 42 aboutToAppear(): void {
33 - this.getLiveList()  
34 43
35 //注册通知 44 //注册通知
36 EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, async (targetId?: string) => { 45 EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, async (targetId?: string) => {
@@ -66,7 +75,6 @@ export struct TabChatComponent { @@ -66,7 +75,6 @@ export struct TabChatComponent {
66 } else if (this.pageModel.viewType == ViewType.EMPTY) { 75 } else if (this.pageModel.viewType == ViewType.EMPTY) {
67 EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1 }) 76 EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1 })
68 } else { 77 } else {
69 - // this.ListLayout()  
70 78
71 CustomPullToRefresh({ 79 CustomPullToRefresh({
72 alldata: this.liveChatList, 80 alldata: this.liveChatList,
@@ -79,6 +87,7 @@ export struct TabChatComponent { @@ -79,6 +87,7 @@ export struct TabChatComponent {
79 this.pageModel.currentPage = 1 87 this.pageModel.currentPage = 1
80 this.getLiveList(resolve) 88 this.getLiveList(resolve)
81 }, 89 },
  90 +
82 }) 91 })
83 } 92 }
84 } 93 }
@@ -99,24 +108,11 @@ export struct TabChatComponent { @@ -99,24 +108,11 @@ export struct TabChatComponent {
99 }, 108 },
100 (item: LiveRoomItemBean, contentIndex: number) => JSON.stringify(item) 109 (item: LiveRoomItemBean, contentIndex: number) => JSON.stringify(item)
101 ) 110 )
102 - // 加载更多  
103 - ListItem() {  
104 - if (this.pageModel.hasMore && this.liveChatList && this.liveChatList.totalCount() > 0) {  
105 - LoadMoreLayout({ isVisible: this.pageModel.hasMore })  
106 - } else if (!this.pageModel.hasMore && !this.pageModel.isLoading) {  
107 - PeopleShipNoMoreData()  
108 - }  
109 - }  
110 - } .edgeEffect(EdgeEffect.None) 111 +
  112 + }.edgeEffect(EdgeEffect.None)
111 .scrollBar(BarState.Off) 113 .scrollBar(BarState.Off)
112 - .onReachEnd(() => {  
113 - Logger.debug(TAG, "触底了");  
114 - if (!this.pageModel.isLoading && this.pageModel.hasMore) {  
115 - //加载分页数据  
116 - //this.currentPage++;  
117 - this.getLiveList()  
118 - }  
119 - }) 114 +
  115 +
120 } 116 }
121 117
122 @Builder 118 @Builder
@@ -141,7 +137,7 @@ export struct TabChatComponent { @@ -141,7 +137,7 @@ export struct TabChatComponent {
141 this.liveViewModel.getLiveChatList( 137 this.liveViewModel.getLiveChatList(
142 this.pageModel.currentPage, 138 this.pageModel.currentPage,
143 this.contentDetailData?.liveInfo?.mlive?.mliveId, 139 this.contentDetailData?.liveInfo?.mlive?.mliveId,
144 - String( this.contentDetailData.newsId), 140 + String(this.contentDetailData.newsId),
145 20,) 141 20,)
146 .then( 142 .then(
147 (data) => { 143 (data) => {
@@ -153,13 +149,21 @@ export struct TabChatComponent { @@ -153,13 +149,21 @@ export struct TabChatComponent {
153 resolve('') 149 resolve('')
154 } 150 }
155 } 151 }
156 - if(this.pageModel.currentPage ===1){ 152 + if (this.pageModel.currentPage === 1) {
157 this.liveChatList.clear() 153 this.liveChatList.clear()
158 } 154 }
159 Logger.debug(TAG, `${JSON.stringify(data)}`) 155 Logger.debug(TAG, `${JSON.stringify(data)}`)
160 if (data.barrageResponses && data.barrageResponses.length > 0) { 156 if (data.barrageResponses && data.barrageResponses.length > 0) {
161 this.pageModel.viewType = ViewType.LOADED; 157 this.pageModel.viewType = ViewType.LOADED;
162 this.liveChatList.push(...data.barrageResponses) 158 this.liveChatList.push(...data.barrageResponses)
  159 +
  160 + if (this.initUI) {
  161 + this.initUI = false
  162 + setTimeout(() => {
  163 + this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1)
  164 + }, 300)
  165 + }
  166 +
163 if (data.barrageResponses.length === this.pageModel.pageSize) { 167 if (data.barrageResponses.length === this.pageModel.pageSize) {
164 this.pageModel.currentPage++; 168 this.pageModel.currentPage++;
165 this.pageModel.hasMore = true; 169 this.pageModel.hasMore = true;
@@ -16,37 +16,69 @@ export struct TabChatItemComponent { @@ -16,37 +16,69 @@ export struct TabChatItemComponent {
16 16
17 build() { 17 build() {
18 Row() { 18 Row() {
19 - Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') : this.item.senderUserAvatarUrl) 19 + Image(StringUtils.isEmpty(this.item.senderUserAvatarUrl) ? $r('app.media.default_head') :
  20 + this.item.senderUserAvatarUrl)
20 .borderRadius(90) 21 .borderRadius(90)
21 .width(24) 22 .width(24)
22 .height(24) 23 .height(24)
23 Column() { 24 Column() {
24 - Row() {  
25 - Text() {  
26 - Span(this.item.senderUserName + ': ')  
27 - .fontColor('#666666')  
28 - Span(this.item.text)  
29 - .fontColor('#222222') 25 + if (this.item.dataType == 'ZH_IMAGE_MSG') {
  26 + Row() {
  27 + Text() {
  28 + Span(this.item.senderUserName + ': ')
  29 + .fontColor('#666666')
  30 + }
  31 + .margin({ left: 8 })
  32 + .lineHeight(20)
  33 + .layoutWeight(1)
  34 + .fontSize('14fp')
  35 + .fontWeight(400)
  36 + }
  37 + .alignItems(VerticalAlign.Top)
  38 +
  39 + if (this.item.pictureUrls && this.item.pictureUrls.length > 0) {
  40 + Image(this.item.pictureUrls[0])
  41 + .width(`100%`)
  42 + .objectFit(ImageFit.Contain)
  43 + .borderRadius(4)
  44 + .margin({
  45 + top: 10
  46 + })
  47 + .onClick(() => {
  48 + this.gotoMultipleListImagePage(this.item.pictureUrls[0])
  49 + })
  50 + }
  51 + } else {
  52 + Row() {
  53 + Text() {
  54 + Span(this.item.senderUserName + ': ')
  55 + .fontColor('#666666')
  56 + Span(this.item.text)
  57 + .fontColor('#222222')
  58 + }
  59 + .margin({ left: 8 })
  60 + .lineHeight(20)
  61 + .layoutWeight(1)
  62 + .fontSize('14fp')
  63 + .fontWeight(400)
  64 + }
  65 + .alignItems(VerticalAlign.Top)
  66 +
  67 + if (this.item.dataType == 'ZH_TEXT_AND_IMAGE_MSG' && this.item.pictureUrls &&
  68 + this.item.pictureUrls.length > 0) {
  69 + Image(this.item.pictureUrls[0])
  70 + .width(`100%`)
  71 + .objectFit(ImageFit.Contain)
  72 + .borderRadius(4)
  73 + .margin({
  74 + top: 10
  75 + })
  76 + .onClick(() => {
  77 + this.gotoMultipleListImagePage(this.item.pictureUrls[0])
  78 + })
30 } 79 }
31 - .margin({ left: 8 })  
32 - .lineHeight(20)  
33 - .layoutWeight(1)  
34 - .fontSize('14fp')  
35 - .fontWeight(400)  
36 - }  
37 - .alignItems(VerticalAlign.Top)  
38 - if (this.item.dataType == 'ZH_TEXT_AND_IMAGE_MSG' && this.item.pictureUrls && this.item.pictureUrls.length > 0) {  
39 - Image(this.item.pictureUrls[0])  
40 - .width(`100%`)  
41 - .objectFit(ImageFit.Contain)  
42 - .borderRadius(4)  
43 - .margin({  
44 - top: 10  
45 - })  
46 - .onClick(() => {  
47 - this.gotoMultipleListImagePage(this.item.pictureUrls[0])  
48 - })  
49 } 80 }
  81 +
50 } 82 }
51 .margin({ 83 .margin({
52 left: 8, 84 left: 8,
@@ -75,8 +107,8 @@ export struct TabChatItemComponent { @@ -75,8 +107,8 @@ export struct TabChatItemComponent {
75 height: 0, 107 height: 0,
76 picPath: imgUrl, 108 picPath: imgUrl,
77 picDesc: '', 109 picDesc: '',
78 - itemType:2,  
79 - id:0 110 + itemType: 2,
  111 + id: 0
80 }) 112 })
81 let taskAction: Action = { 113 let taskAction: Action = {
82 type: 'JUMP_DETAIL_PAGE', 114 type: 'JUMP_DETAIL_PAGE',
@@ -11,7 +11,7 @@ export struct TabComponent { @@ -11,7 +11,7 @@ export struct TabComponent {
11 @Prop @Watch('changeToChart') changeToTab: number 11 @Prop @Watch('changeToChart') changeToTab: number
12 @State fontColor: string = '#999999' 12 @State fontColor: string = '#999999'
13 @State selectedFontColor: string = '#222222' 13 @State selectedFontColor: string = '#222222'
14 - @State currentIndex: number = 0 14 + @Prop currentIndex: number = 0
15 // private controller: TabsController = new TabsController() 15 // private controller: TabsController = new TabsController()
16 private swiperController: SwiperController = new SwiperController() 16 private swiperController: SwiperController = new SwiperController()
17 @Prop tabs: string[] = [] 17 @Prop tabs: string[] = []
@@ -63,7 +63,11 @@ export struct TabComponent { @@ -63,7 +63,11 @@ export struct TabComponent {
63 } else if ('直播间' === item) { 63 } else if ('直播间' === item) {
64 TabLiveComponent({ lastInputedComment: this.lastInputedLiveComment }).backgroundColor('#F5F5F5') 64 TabLiveComponent({ lastInputedComment: this.lastInputedLiveComment }).backgroundColor('#F5F5F5')
65 } else if ('大家聊' === item) { 65 } else if ('大家聊' === item) {
66 - TabChatComponent({ lastInputedComment: this.lastInputedChatComment }).backgroundColor('#F5F5F5') 66 + TabChatComponent({
  67 + lastInputedComment: this.lastInputedChatComment,
  68 + index: index,
  69 + parentComponentIndex: this.currentIndex
  70 + }).backgroundColor('#F5F5F5')
67 } 71 }
68 72
69 }, (item: string, index: number) => { 73 }, (item: string, index: number) => {
@@ -74,6 +78,7 @@ export struct TabComponent { @@ -74,6 +78,7 @@ export struct TabComponent {
74 .vertical(false) 78 .vertical(false)
75 .indicator(false) 79 .indicator(false)
76 .loop(false) 80 .loop(false)
  81 + .cachedCount(-1)
77 .alignSelf(ItemAlign.Start) 82 .alignSelf(ItemAlign.Start)
78 .effectMode(EdgeEffect.None) 83 .effectMode(EdgeEffect.None)
79 .onChange((index: number) => { 84 .onChange((index: number) => {
@@ -25,7 +25,10 @@ export struct TabLiveComponent { @@ -25,7 +25,10 @@ export struct TabLiveComponent {
25 private scroller: Scroller = new Scroller() 25 private scroller: Scroller = new Scroller()
26 @Prop @Watch("lastInputedCommentChanged") lastInputedComment: LiveRoomItemBean 26 @Prop @Watch("lastInputedCommentChanged") lastInputedComment: LiveRoomItemBean
27 27
  28 +
  29 +
28 aboutToAppear(): void { 30 aboutToAppear(): void {
  31 +
29 this.getLiveList() 32 this.getLiveList()
30 } 33 }
31 34
@@ -92,7 +95,6 @@ export struct TabLiveComponent { @@ -92,7 +95,6 @@ export struct TabLiveComponent {
92 Logger.debug(TAG, "触底了"); 95 Logger.debug(TAG, "触底了");
93 if (!this.pageModel.isLoading && this.pageModel.hasMore) { 96 if (!this.pageModel.isLoading && this.pageModel.hasMore) {
94 //加载分页数据 97 //加载分页数据
95 - //this.currentPage++;  
96 this.getLiveList() 98 this.getLiveList()
97 } 99 }
98 }) 100 })
@@ -39,6 +39,10 @@ @@ -39,6 +39,10 @@
39 { 39 {
40 "name": "location_reason", 40 "name": "location_reason",
41 "value": " " 41 "value": " "
  42 + },
  43 + {
  44 + "name": "anchor_leaving",
  45 + "value": "主播暂时离开,马上回来"
42 } 46 }
43 ] 47 ]
44 } 48 }
@@ -168,6 +168,7 @@ struct LaunchAdvertisingPage { @@ -168,6 +168,7 @@ struct LaunchAdvertisingPage {
168 168
169 ///埋点 169 ///埋点
170 this.trackingLaunchClick() 170 this.trackingLaunchClick()
  171 + this.enter()
171 172
172 if(this.defaultModel.linkUrl.length > 0){ 173 if(this.defaultModel.linkUrl.length > 0){
173 if (this.defaultModel.openType == '2') { 174 if (this.defaultModel.openType == '2') {