wangliang_wd

feat:优化横屏直播,直播状态切换提示

... ... @@ -38,6 +38,16 @@ export class WDRouterRule {
}
}
static jumpWithReplaceAction(action?: Action) {
if (!action || !action.type) {
ToastUtils.showToast("跳转参数异常", 1000);
return
}
let page = Action2Page.get(action);
WDRouterRule.jumpWithReplacePage(page, action)
}
static jumpWithReplacePage(page?: WDRouterPage, params?: object) {
if (page) {
let action = RouterJumpInterceptor.getInterceptorAction(page)
... ...
... ... @@ -113,4 +113,5 @@ export { VoiceInputView } from './src/main/ets/components/comment/view/VoiceInpu
export { ComponentModule } from './src/main/ets/ComponentModule'
export { MyCustomDialog } from './src/main/ets/components/reusable/MyCustomDialog'
// export {voicese}
\ No newline at end of file
... ...
import { ContentDetailDTO, LiveRoomDataBean, LiveRoomItemBean } from 'wdBean/Index';
import { Action,ContentDetailDTO, LiveRoomDataBean, LiveRoomItemBean } from 'wdBean/Index';
import { LiveViewModel } from '../viewModel/LiveViewModel';
import { TabComponent } from '../widgets/details/TabComponent';
import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet';
... ... @@ -7,13 +7,14 @@ import mediaquery from '@ohos.mediaquery';
import { CustomToast, EmitterEventId, EmitterUtils, Logger, WindowModel } from 'wdKit/Index';
import { display, router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { LiveOperRowListView,MyCustomDialog } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg';
import { LiveDetailChatRoomController } from '../im/LiveDetailChatRoomController';
import { LiveMessageOptType, LiveMessageRoomType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean';
import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
import { ProcessUtils, WDRouterRule } from 'wdRouter';
let TAG: string = 'DetailPlayLivePage';
... ... @@ -54,6 +55,20 @@ export struct DetailPlayLivePage {
@State isPORTRAIT: boolean = true
@State half_SCREEN: boolean = true
dialogController: CustomDialogController = new CustomDialogController({
builder: MyCustomDialog({
confirm: () => {
WDRouterRule.jumpWithReplaceAction(router.getParams() as Action)
},
title:'该直播已开始!请前往围观吧',
tipShow: false,
rightText: '去看直播' ,
}),
autoCancel: true,
alignment: DialogAlignment.Center,
customStyle: true,
})
async aboutToAppear(): Promise<void> {
Logger.info(TAG, `wyj-aboutToAppear`)
... ... @@ -120,8 +135,11 @@ export struct DetailPlayLivePage {
const banComment = liveRoomItemBean.data == "1"
this.banComment = banComment
} break
case LiveMessageOptType.ZH_START_LIVE:{
this.dialogController.open()
// this.lastLiveControl = liveRoomItemBean
} break
case LiveMessageOptType.ZH_STOP_LIVE:
case LiveMessageOptType.ZH_START_LIVE:
case LiveMessageOptType.ZH_CHANGE_PAD: { // 直播垫片控制
this.lastLiveControl = liveRoomItemBean
} break
... ...