王士厅
Showing 23 changed files with 304 additions and 157 deletions
... ... @@ -9,4 +9,6 @@ export class InteractDataDTO {
likeNum: number | string = 0;
readNum: number = 0;
shareNum: number = 0;
}
\ No newline at end of file
... ...
import { InteractDataDTO } from '../content/InteractDataDTO';
import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
export interface slideShows {
fullColumnImgUrls: FullColumnImgUrlDTO[];
linkUrl?: string;
newsId: string;
newsTitle?: string;
newsTitleColor?: string;
objectLevel?: string;
objectType: string;
pageId?: string;
photoNum?: string;
publishTime: number;
relId: string;
source?: string;
timeBlurred?: string;
videoDuration?: string;
videoLandscape?: string;
videoUrl?: string;
voiceDuration?: string;
@Observed
export class slideShows {
fullColumnImgUrls?: FullColumnImgUrlDTO[];
linkUrl: string='';
newsId: string = '';
newsTitle: string='';
newsTitleColor: string='';
objectLevel: string='';
objectType: string ='';
pageId: string='';
photoNum: string='';
publishTime: number=0;
relId: string='';
source: string='';
timeBlurred: string='';
videoDuration: string='';
videoLandscape: string='';
videoUrl: string='';
voiceDuration: string='';
interactDataDto? :InteractDataDTO
}
\ No newline at end of file
... ...
... ... @@ -186,8 +186,8 @@ export struct CardParser {
contentDTO: contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
index:this.compIndex
})
} else {
// todo:组件未实现 / Component Not Implemented
... ...
... ... @@ -6,8 +6,12 @@ import router from '@ohos.router'
@Reusable
@Component
export struct CardSourceInfo {
@State contentDTO: ContentDTO = new ContentDTO();
@State @Watch('checkData') contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
// 特殊稿件内部item展示的来源信息
isCompInnerSource: boolean = false
// 是否有展示的信息,如来源,标签、时间、评论
@State viewShowData: boolean = true
aboutToAppear(): void {
}
... ... @@ -21,6 +25,7 @@ export struct CardSourceInfo {
aboutToDisappear(): void {
}
handleTimeStr() {
return DateTimeUtils.getCommentTime(
this.contentDTO.publishTime.includes(' ')
... ... @@ -54,7 +59,6 @@ export struct CardSourceInfo {
return true
}
/**
* 全域数字显示规则
* 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585
... ... @@ -64,17 +68,17 @@ export struct CardSourceInfo {
* 5、0 和空 不显示
*/
handlerNum(number: string) {
const num = number??'0';
const num = number ?? '0';
if (Number.parseInt(num) <= 9999) {
return Number.parseInt(num).toString()
} else if (Number.parseInt(num) > 9999 && Number.parseInt(num) <= 99999999) {
const num1: string = num.slice(0, -4); // 万
const num2: string = num.slice(-4, -3); // 千
return num2 === '0' ? num1 +'万' : num1 + '.' + num2 + '万'
return num2 === '0' ? num1 + '万' : num1 + '.' + num2 + '万'
} else if (Number.parseInt(num) > 99999999) {
const num1: string = num.slice(0, -8); // 亿
const num2: string = num.slice(-8, -7);
return num2 === '0' ? num1 +'亿' : num1 + '.' + num2 + '亿'
return num2 === '0' ? num1 + '亿' : num1 + '.' + num2 + '亿'
}
return num
}
... ... @@ -88,18 +92,20 @@ export struct CardSourceInfo {
build() {
Flex({ alignItems: ItemAlign.Center }) {
// 标签
if (this.contentDTO.corner) {
Text(this.contentDTO.corner)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 2 })
.margin({ right: 6 })
}
if(this.contentDTO.cornerMark){
if (this.contentDTO.cornerMark) {
Text(this.contentDTO.cornerMark)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 2 })
.margin({ right: 6 })
}
// 来源信息
if (this.contentDTO.rmhPlatform === 1) {
Text(this.contentDTO.rmhInfo?.rmhName)
.fontSize($r("app.float.font_size_11"))
... ... @@ -113,7 +119,11 @@ export struct CardSourceInfo {
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
}
if (((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName && this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) && (this.getContentDtoBean()?.interactData?.commentNum
// 点
if (((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
(this.getContentDtoBean()?.interactData?.commentNum
// || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
|| (this.contentDTO.isSearch || this.contentDTO.isCollection ||
!this.contentDTO.isSearch && DateTimeUtils.getCommentTime
... ... @@ -123,52 +133,43 @@ export struct CardSourceInfo {
.indexOf
('-') === -1)
)) {
Image($r("app.media.point"))
.width(11)
.height(11)
}
// 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
// if (this.contentDTO.isSearch || this.contentDTO.isCollection ||
// (!this.contentDTO.isSearch &&
// DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)).indexOf('-') === -1)) {
//
// Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
// .fontSize($r("app.float.font_size_11"))
// .fontColor($r("app.color.color_B0B0B0"))
// .flexShrink(0);
// }
// if (this.contentDTO.source && this.showTime()) {
// Text(this.handleTimeStr())
// .fontSize($r("app.float.font_size_11"))
// .fontColor($r("app.color.color_B0B0B0"))
// .flexShrink(0)
// .margin({right: 4})
// }
// 发布日期
if (this.showTime()) {
Text(this.handleTimeStr())
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
.margin({right: 4})
.margin({ right: 4 })
}
if (Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 && this.showCommentNum()) {
// 评论数
if (!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
} else {
if (this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
Text(`${this.handlerNum(this.contentDTO.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.flexShrink(0)
}
}
// if (this.getContentDtoBean()?.interactData?.commentNum && this.contentDTO.source) {
// Text(`${this.getContentDtoBean()?.interactData?.commentNum}评`)
// .fontSize($r("app.float.font_size_11"))
// .fontColor($r("app.color.color_B0B0B0"))
// .flexShrink(0)
// .visibility(Number(this.getContentDtoBean()?.interactData?.commentNum) === 0 ? Visibility.None :
// Visibility.Visible)
// }
}
.width(CommonConstants.FULL_WIDTH)
.margin({ top: 8 })
.margin({ top: this.viewShowData ? 8 : 0 })
}
/**
... ... @@ -184,4 +185,45 @@ export struct CardSourceInfo {
}
return this.compDTO.operDataList[0]
}
/**
* 检测是否有展示的数据
*/
checkData() {
let have = false
if (this.contentDTO.corner) {
have = true
}
if (this.contentDTO.cornerMark) {
have = true
}
if (this.contentDTO.rmhPlatform === 1) {
have = true
} else if (this.contentDTO.source) {
have = true
}
// 发布日期
if (this.showTime()) {
have = true
}
// 评论数
if (!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
have = true
} else {
if (this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
have = true
}
}
if (have) {
} else {
this.viewShowData = false
}
}
}
\ No newline at end of file
... ...
import { ContentDTO, slideShows, VideoInfoDTO, CompDTO } from 'wdBean';
import { ContentDTO, slideShows, VideoInfoDTO, CompDTO, InteractDataDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
... ... @@ -8,6 +8,8 @@ import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
import { BasePageHelp } from '../page/template/BasePageHelp';
import { Logger } from 'wdKit/Index';
/**
* 大专题卡--CompStyle: 10
... ... @@ -25,11 +27,39 @@ export struct Card10Component {
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State hideDetail: boolean = false;
basePageHelp: BasePageHelp = new BasePageHelp
// 稿件参与批查,需要对列表信息单独重绘
@State isBatchData: boolean = false
async aboutToAppear(): Promise<void> {
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
this.initHideDetail();
if (!this.hideDetail) {
this.isBatchData = false
// 批查评论数据
let interactArray = this.basePageHelp.getCompInteractParams(this.contentDTO.slideShows)
if (interactArray.contentList != null && interactArray.contentList.length > 0) {
this.basePageHelp.requestCompInteractData(interactArray)
.then((result) => {
if (result != null && result.length > 0) {
this.isBatchData = true
this.contentDTO.slideShows.forEach((slideShowBean) => {
let newsId = slideShowBean.newsId
for (let interactBean of result) {
console.debug(TAG, JSON.stringify(interactBean))
if (newsId == interactBean.contentId) {
slideShowBean.interactDataDto = interactBean
break
}
}
})
}
})
}
}
}
initHideDetail() {
... ... @@ -40,7 +70,7 @@ export struct Card10Component {
}
titleInit() {
const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title);
const titleInitRes: titleInitRes = SearchShowRed.titleInit(this.contentDTO.title);
this.titleMarked = titleInitRes.titleMarked;
this.textArr = titleInitRes.textArr;
}
... ... @@ -94,17 +124,14 @@ export struct Card10Component {
// 专题列表--后端返回三个,
if (!this.hideDetail) {
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
}
if (this.isBatchData) {
this.drawCompList()
} else {
this.drawCompList()
}
}
// 底部-查看更多。根据接口返回的isMore判断是否显示查看更多
if (this.contentDTO.hasMore == 1 && !this.hideDetail) {
... ... @@ -141,8 +168,26 @@ export struct Card10Component {
}
@Builder
drawCompList() {
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
}
}
@Builder
timelineItem(item: slideShows, index: number) {
Row() {
// 有图片资源的
if (item.fullColumnImgUrls && item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
Column() {
Stack() {
if (item.objectType == '5') {
... ... @@ -161,6 +206,7 @@ export struct Card10Component {
//bottom 评论等信息
CardSourceInfo(
{
isCompInnerSource: true,
compDTO: this.compDTO,
contentDTO: this.createContent(item)
}
... ... @@ -170,8 +216,6 @@ export struct Card10Component {
.height(78)
.alignItems(HorizontalAlign.Start)
// 右侧图片
if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) {
Stack() {
Image(this.loadImg ? item.fullColumnImgUrls[0].url : '')
.backgroundColor(0xf5f5f5)
... ... @@ -186,6 +230,33 @@ export struct Card10Component {
}
.alignContent(Alignment.BottomEnd)
.height(78)
}else{
Column() {
Stack() {
if (item.objectType == '5') {
Notes({ objectType: 5 })
}
Text(item.newsTitle)
.fontSize($r('app.float.font_size_17'))
.fontWeight(400)
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent(item.objectType == '5' ? 38 : 0)
}.alignContent(Alignment.TopStart)
//bottom 评论等信息
CardSourceInfo(
{
isCompInnerSource: true,
compDTO: this.compDTO,
contentDTO: this.createContent(item)
}
)
}
.layoutWeight(1)
.alignItems(HorizontalAlign.Start)
}
}
.padding({ top: 10, bottom: 10 })
... ... @@ -201,8 +272,9 @@ export struct Card10Component {
private createContent(item: slideShows): ContentDTO {
let contentDTO = new ContentDTO()
contentDTO.publishTime = item.publishTime.toString() || '';
contentDTO.publishTime = item.publishTime?.toString() || '';
contentDTO.source = item.source || '';
contentDTO.interactData = item.interactDataDto
return contentDTO;
}
... ...
... ... @@ -55,7 +55,7 @@ export struct Card14Component {
)
}
// 左标题,右图
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start }) {
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
Text() {
if (this.titleMarked) {
... ...
... ... @@ -19,7 +19,7 @@ export struct LiveBigImage02Component {
@State contentDTO: ContentDTO = new ContentDTO();
@State loadImg: boolean = false;
@State clicked: boolean = false;
index: number = 0
async aboutToAppear() {
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId,curRouter)
... ... @@ -102,8 +102,7 @@ export struct LiveBigImage02Component {
lottieWidth: 14,
lottieHeight: 14,
autoplay: true,
loop: true,
title: item.newsTitle
loop: true
})
.margin({
right: '2vp'
... ...
... ... @@ -14,28 +14,16 @@ export struct LottieView {
private politeChickyController: CanvasRenderingContext2D =
new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
@Prop title: string
// 页面隐藏销毁动画
// onPageHide(): void {
// this.animateItem?.destroy()
//
// if (this.onComplete) {
// this.animateItem?.removeEventListener('complete', this.onComplete)
// }
// }
/**
* 加载动画
* @param autoplay 控制动画是否自动播放参数
*/
loadAnimation() {
// 销毁动画,减少缓存
if (this.animateItem !== null) {
this.animateItem.destroy(this.name);
this.animateItem = null;
}
this.onDestroyAnimation()
this.animateItem = lottie.loadAnimation({
container: this.politeChickyController,
renderer: 'canvas',
... ... @@ -55,32 +43,19 @@ export struct LottieView {
}
aboutToAppear(): void {
// console.error('XXXXZZZZ', '-------aboutToAppear-------' + this.title)
//lottie?.play()
// if(this.init){
// if(this.animateItem = null){
// this.loadAnimation();
// }
// }
/**
* 摧毁动画
*/
onDestroyAnimation(){
// 销毁动画,减少缓存
if (this.animateItem !== null) {
this.animateItem.destroy(this.name);
this.animateItem = null;
}
aboutToDisappear(): void {
// console.error('XXXXZZZZ', '-------aboutToDisappear-------' + this.title)
// if(this.init){
// lottie?.destroy(this.name)
//
// if (this.onComplete) {
// this.animateItem?.removeEventListener('complete', this.onComplete)
// }
// this.animateItem = null;
// // }
}
build() {
Stack({ alignContent: Alignment.TopStart }) {
Canvas(this.politeChickyController)
... ... @@ -92,10 +67,10 @@ export struct LottieView {
this.onReady(this.animateItem)
}
})
.onDisAppear(() => {
lottie.destroy(this.name)
this.animateItem = null;
}).onAppear(()=>{
.onDisAppear(()=>{
this.onDestroyAnimation()
})
.onAppear(()=>{
this.loadAnimation();
})
... ...
... ... @@ -34,20 +34,13 @@ export default struct MinePageUserSimpleInfoUI {
Row(){
//头像
Stack(){
if (this.headPhotoUrl.length > 0){
Image(this.headPhotoUrl)
.alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}else {
Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
Image(this.isLogin?(this.headPhotoUrl?this.headPhotoUrl:this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon')):$r('app.media.default_head'))
.alt($r('app.media.default_head'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
... ...
... ... @@ -395,7 +395,7 @@ export struct PaperSingleColumn999CardView {
private item: ContentDTO = new ContentDTO();
private index: number = -1;
@State isRead: boolean = false;//已读状态
@State interactData: InteractDataDTO = {} as InteractDataDTO;
@State interactData: InteractDataDTO = new InteractDataDTO
@Consume @Watch('onChangeCommentList') commentList: InteractDataDTO[]
getPublishTime(): string {
... ...
import { CompDTO,
import {
CompDTO,
ContentBean,
ContentDTO,
InteractDataDTO,
InteractParam, LiveRoomDataBean, ReserveBean, ReserveItemBean } from 'wdBean/Index'
InteractParam,
LiveRoomDataBean,
ReserveBean,
ReserveItemBean,
slideShows
} from 'wdBean/Index'
import { BaseDTO } from 'wdBean/src/main/ets/bean/component/BaseDTO'
import { CollectionUtils, DateTimeUtils, LazyDataSource, Logger, StringUtils } from 'wdKit/Index'
import { HttpUtils, ResponseDTO } from 'wdNetwork/Index'
... ... @@ -22,7 +28,7 @@ export class BasePageHelp {
if (HttpUtils.getUserId()) {
let time = DateTimeUtils.getTimeStamp().toString()
Logger.debug(TAG, 'getAppointmentInfo-->'+time)
Logger.debug(TAG, 'getAppointmentInfo-->' + time)
const reserveBean = this.transformToLiveDetailsBeans(compList)
LiveModel.getAppointmentStatus(reserveBean).then((result) => {
Logger.debug(TAG, '是否预约数据:' + ` ${JSON.stringify(result)}`)
... ... @@ -116,7 +122,7 @@ export class BasePageHelp {
return idList.join(',')
}
/**
/**
* 批查稿件的互动数据,如 评论人数等
* @param compList
* @returns
... ... @@ -165,13 +171,17 @@ export class BasePageHelp {
allInteractDataList.push(...value);
}
})
// 批查全部完成,统一设置到comp里
// this.resetInteract(allInteractDataList, compList);
success(allInteractDataList);
})
})
}
/**
* 收集信息流页面,可参与批查稿件的业务信息
* @param compList
* @returns
*/
private getInteractParams(compList: CompDTO[]): InteractParam {
if (compList == null || compList.length == 0) {
return {} as InteractParam;
... ... @@ -204,6 +214,34 @@ export class BasePageHelp {
return param;
}
/**
* 获取组件中需要参与批查业务信息
* @param slideShowArray
* @returns
*/
public getCompInteractParams(slideShowArray: slideShows[]): InteractParam {
if (slideShowArray == null || slideShowArray.length == 0) {
return {} as InteractParam;
}
let param: InteractParam = {} as InteractParam;
param.contentList = new Array<ContentBean>();
slideShowArray.forEach((value) => {
let bean = {} as ContentBean;
bean.contentId = value.newsId;
bean.contentType = value.objectType;
param.contentList.push(bean);
})
return param
}
/**
* 查询互动相关数据,如收藏数、评论数等
* @param param
* @returns
*/
private createInteractDataPromise(param: InteractParam) {
return new Promise<InteractDataDTO[]>((success, error) => {
PageRepository.fetchInteractData(param).then((resDTO: ResponseDTO<InteractDataDTO[]>) => {
... ... @@ -221,6 +259,18 @@ export class BasePageHelp {
});
}
async requestCompInteractData(param: InteractParam): Promise<InteractDataDTO[]> {
return new Promise<InteractDataDTO[]>((success, error) => {
this.createInteractDataPromise(param).then((result) => {
if (!CollectionUtils.isArray(result)) {
success(new Array<InteractDataDTO>());
return;
}
success(result);
})
})
}
/**
* 刷新互动数据到compList
* @param interact 批查互动数据结果
... ... @@ -252,6 +302,4 @@ export class BasePageHelp {
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -41,6 +41,7 @@ export default struct TemplatePageComponent {
extra: string = ''
async aboutToAppear() {
Logger.debug(TAG, 'aboutToAppear')
this.requestPageData()
... ... @@ -78,9 +79,6 @@ export default struct TemplatePageComponent {
})
}
aboutToDisappear(): void {
}
build() {
if (this.templatePage.pageCompType === TemplatePageStateType.LOADING) {
... ...
import { ContentDTO } from 'wdBean/Index';
import { BaseDTO } from 'wdBean/src/main/ets/bean/component/BaseDTO';
import { LazyDataSource } from 'wdKit/Index';
import { WDViewDefaultType } from '../../view/EmptyComponent';
... ...
... ... @@ -106,7 +106,10 @@ export struct CustomPullToRefresh {
lottie.destroy(this.refreshingAnimName);
this.refreshAnimation?.removeEventListener('DOMLoaded')
this.refreshAnimation?.removeEventListener('destroy')
this.refreshingAnimation?.removeEventListener('DOMLoaded')
this.refreshingAnimation?.removeEventListener('destroy')
this.refreshAnimation = null
this.refreshingAnimation = null
}
@Builder
... ...
... ... @@ -29,7 +29,7 @@ import { JSON } from '@kit.ArkTS'
import { MoreComponent } from '../cardview/MoreComponent'
import { Card9Component } from '../cardview/Card9Component'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
const TAG = "SearchResultContentComponent"
@Component
... ... @@ -270,7 +270,12 @@ export struct SearchResultContentComponent {
build() {
Column() {
if (this.count == 0) {
ListHasNoMoreDataUI({ style: 2 })
// ListHasNoMoreDataUI({ style: 2 })
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult,
emptyButton: false,
})
} else {
List({ scroller: this.scroller2 }) {
if (this.data_rmh != null && this.data_rmh.length > 0) {
... ... @@ -314,11 +319,7 @@ export struct SearchResultContentComponent {
}
if (index != this.data.totalCount() - 1) {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
// Divider()
// .width('100%')
// .height('1lpx')
// .color($r('app.color.color_F5F5F5'))
// .strokeWidth('1lpx')
}
}
}
... ...
... ... @@ -59,7 +59,7 @@ export struct LiveOperRowListView {
@State needLike: boolean = true
@State styleType: number = -1
@State bgColor: ResourceColor = Color.White
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State interactData: InteractDataDTO = new InteractDataDTO
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State dialogController: CustomDialogController | null = null;
... ...
... ... @@ -221,9 +221,15 @@ export struct PlayUIComponent {
.padding({
top: 1,
right: 4,
bottom: 1
bottom: 1,
})
// .margin({left: this.contentDetailData?.rmhInfo ? 0 : 34})
.margin(
{
left: this.contentDetailData?.rmhInfo
? 0
: this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? 34 : 0
}
)
}
//回看
else if (this.contentDetailData.liveInfo?.liveState == 'end') {
... ...
... ... @@ -85,6 +85,7 @@ export struct PlayerTitleComponent {
Row() {
this.getLiveStatusView()
}
.margin({left: this.contentDetailData.rmhInfo?.rmhName ? 0 : 34})
}
.width('100%')
... ... @@ -144,7 +145,6 @@ export struct PlayerTitleComponent {
.fontWeight(400)
.fontColor(Color.White)
}
}
.backgroundColor('#4D000000')
.borderRadius(2)
... ... @@ -154,7 +154,6 @@ export struct PlayerTitleComponent {
top: 0,
bottom: 0
} : 4)
.margin({left: this.contentDetailData.rmhInfo?.rmhName ? 0 : 34})
}
}
}
... ...
... ... @@ -86,7 +86,7 @@ export struct PlayerFullScreenView {
.margin({ left: 10 })
}
Image($r(`app.media.ic_share`)).height(24).width(24)
Image($r(`app.media.ic_share_empty`)).height(24).width(24)
.onClick(() => {
this.share()
})
... ...
... ... @@ -124,6 +124,14 @@ struct LoginPage {
onPageHide(): void {
///关闭禁止截图
this.isPrivacyMode = false
this.disableScreenCapture()
this.loginPageBrowse()
}
loginPageBrowse(){
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
... ... @@ -261,10 +269,6 @@ struct LoginPage {
right: { anchor: "__container__", align: HorizontalAlign.End }
})
.onClick(() => {
///关闭禁止截图
this.isPrivacyMode = false
this.disableScreenCapture()
router.back()
})
.id('id_close')
... ... @@ -375,7 +379,7 @@ struct LoginPage {
.lineHeight(`${this.calcHeight(38)}lpx`)
}
.onClick(() => {
this.onPageHide()
this.loginPageBrowse()
if(this.checkCodePage){
trackTypeClick(0,TrackConstants.PageName.Phone_Login_Page)
... ...
... ... @@ -221,11 +221,12 @@ struct ModifyPasswordPage {
.width('100%')
Column() {
Text("忘记密码").fontSize(12).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
Text("忘记密码").fontSize(14).maxLines(3).fontColor(0x999999).padding({top:`${this.calcHeight(10)}lpx`})
.onClick(()=>{
WDRouterRule.jumpWithPage(WDRouterPage.forgetPasswordPage)
})
}
.margin({top:15})
.width('100%')
.height(`${this.calcHeight(85)}lpx`)
.alignItems(HorizontalAlign.Center)
... ...