fanmingyou3_wd

删除重复的VideoInfo,LiveInfo改名为LiveInfoDTO

当获取播放地址错误时,给出Toast
import { FullColumnImgUrlsDTO } from './FullColumnImgUrlsDTO';
import { LiveInfo } from './LiveInfo';
import { VideoInfo } from './VideoInfo';
import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
import { LiveInfoDTO } from '../detail/LiveInfoDTO';
import { VideoInfoDTO } from '../detail/VideoInfoDTO';
export interface ContentDTO {
cityCode: string;
... ... @@ -49,7 +49,7 @@ export interface ContentDTO {
newsTitle:string;
publishTime:string;
visitorComment:number;
fullColumnImgUrls:FullColumnImgUrlsDTO[];
liveInfo?: LiveInfo; // 直播新闻信息【BFF聚合】
videoInfo?: VideoInfo; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
fullColumnImgUrls:FullColumnImgUrlDTO[];
liveInfo?: LiveInfoDTO; // 直播新闻信息【BFF聚合】
videoInfo?: VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
}
\ No newline at end of file
... ...
export interface FullColumnImgUrlsDTO {
format: number;
height: number;
weight: number;
landscape: number;
size: number;
url: string;
}
\ No newline at end of file
export interface VideoInfo {
videoUrl: string; //视频播放地址
videoDuration: string; // 视频时长
videoLandscape: string; // 1横屏 2竖屏
firstFrameImageUri: string; // 首帧图;【视频内容,contentPictures中】
}
\ No newline at end of file
export interface VideoInfoDTO {
clarity: number;
resolutionHeight: number;
resolutionWidth: number;
videoDuration: number;
videoLandScape: number;
videoType: number;
videoUrl: string;
}
\ No newline at end of file
export interface LiveInfo {
export interface LiveInfoDTO {
liveState: string; // 直播新闻-直播状态
liveUrl: string; //【暂时未使用,默认取第一个】直播新闻-直播地址
liveStartTime: string;
... ...
... ... @@ -2,8 +2,9 @@ export interface VideoInfoDTO {
clarity: number;
resolutionHeight: number;
resolutionWidth: number;
videoDuration: number;
videoLandScape: number;
videoDuration: string; // 视频时长
videoLandScape: number; // 1横屏 2竖屏
videoType: number;
videoUrl: string;
videoUrl: string; //视频播放地址
firstFrameImageUri: string; // 首帧图;【视频内容,contentPictures中】
}
\ No newline at end of file
... ...
import { BusinessError } from '@ohos.base'
import { Logger } from 'wdKit'
import { Logger, ToastUtils } from 'wdKit'
import { ResponseDTO} from 'wdNetwork'
import { ContentDetailRequest } from 'wdDetailPlayApi'
import { ContentDetailDTO } from 'wdBean'
... ... @@ -56,7 +56,8 @@ export class PlayViewModel {
// this.title = '旅途平安!这首歌送给即将启程回家的你'
// this.url = 'https://cdnjdout.aikan.pdnews.cn/zhbj-20240127/vod/content/output/f45ef51bb33f4ffd9458f8b386aa3227_opt.mp4'
this.canStart = false;
this.message = '获取播放地址错误';
this.message = '获取播放地址异常';
ToastUtils.showToast(this.message, 1000);
})
.finally(() => {
Logger.debug(TAG, `getContentDetailData finally`);
... ...