Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-09-26 18:11:48 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
90bd6ef87e3323bd01344a476cf78aef8c67f952
90bd6ef8
2 parents
86865c43
aeef8eba
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
182 additions
and
94 deletions
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpRequest.ets
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageViewModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabInfoComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerFullScreenView.ets
sight_harmony/products/phone/src/main/ets/dailynewspaperwidget/pages/DailyNewspaperWidgetCard.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpRequest.ets
View file @
90bd6ef
...
...
@@ -53,28 +53,36 @@ export class HttpRequest {
static get<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> {
let config: AxiosRequestConfig = {
headers: HttpRequest.buildHeaderWithGlobalHeader(headers)
headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
timeout:10000,
timeoutErrorMessage:"当前无网络,请重试"
}
return service.get(url, config)
}
static post<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> {
let config: AxiosRequestConfig = {
headers: HttpRequest.buildHeaderWithGlobalHeader(headers)
headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
timeout:10000,
timeoutErrorMessage:"当前无网络,请重试"
}
return service.post(url, data, config)
}
static put<T = ResponseDTO<string>>(url: string, data?: object, headers?: HashMap<string, string>): Promise<T> {
let config: AxiosRequestConfig = {
headers: HttpRequest.buildHeaderWithGlobalHeader(headers)
headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
timeout:10000,
timeoutErrorMessage:"当前无网络,请重试"
}
return service.put(url, data, config)
}
static delete<T = ResponseDTO<string>>(url: string, headers?: HashMap<string, string>): Promise<T> {
let config: AxiosRequestConfig = {
headers: HttpRequest.buildHeaderWithGlobalHeader(headers)
headers: HttpRequest.buildHeaderWithGlobalHeader(headers),
timeout:10000,
timeoutErrorMessage:"当前无网络,请重试"
}
return service.delete(url, config)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/H5NewsWebPageComponent.ets
View file @
90bd6ef
...
...
@@ -42,7 +42,7 @@ export struct H5NewsWebPageComponent {
action: Action = {} as Action
@State webUrl: string = '';
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
@State recommendList: ContentDTO[] = []
//
@State recommendList: ContentDTO[] = []
@State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined // 点赞、收藏状态
@State interactData: InteractDataDTO = {} as InteractDataDTO
@State isPageEnd: boolean = false
...
...
@@ -58,7 +58,7 @@ export struct H5NewsWebPageComponent {
@State showCommentList: boolean = false
@State index: number = 0
@State currentIndex: number = 0
private navTitle = '人民日报';
@State navTitle: string = ""
build() {
Stack({ alignContent: Alignment.Top }){
...
...
@@ -137,13 +137,14 @@ export struct H5NewsWebPageComponent {
console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0]))
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
this.navTitle = this.contentDetailData.newsTitle
let dateTime =
DateTimeUtils.parseDate(this.contentDetailData?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN);
// let _publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN)
// this.publishTime = DateTimeUtils.removeTrailingZeros(_publishTime)
if (this.contentDetailData?.recommendShow === 1) {
this.getRecommend()
}
// if (this.contentDetailData?.recommendShow === 1) {
// this.getRecommend()
// }
if (this.contentDetailData?.openLikes === 1) {
console.log(TAG, '点赞this.getInteractDataStatus()')
this.getInteractDataStatus()
...
...
@@ -167,10 +168,10 @@ export struct H5NewsWebPageComponent {
if (this.contentDetailData.openLikes === 1) {
this.operationButtonList.push('like')
}
if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
this.contentDetailData?.audioList[0].audioUrl) {
this.operationButtonList.push('listen')
}
// if (this.contentDetailData?.openAudio && this.contentDetailData?.audioList?.length &&
// this.contentDetailData?.audioList[0].audioUrl) {
// this.operationButtonList.push('listen')
// }
this.operationButtonList.push('collect')
if (this.contentDetailData.shareInfo?.shareOpen === 1) {
this.operationButtonList.push('share')
...
...
@@ -179,23 +180,23 @@ export struct H5NewsWebPageComponent {
}
}
private async getRecommend() {
let params: postRecommendListParams = {
imei: HttpUtils.getImei(),
userId: HttpUtils.getUserId(),
contentId: String(this.contentDetailData?.newsId),
recType: 1,
contentType: this.contentDetailData?.newsType,
relId: this.contentDetailData?.reLInfo?.relId,
// channelId: String(this.contentDetailData?.reLInfo?.channelId)
}
let recommendList = await DetailViewModel.postRecommendList(params)
if (recommendList.length > 0) {
//推荐列表过滤音频和活动入口
this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
}
}
// private async getRecommend() {
// let params: postRecommendListParams = {
// imei: HttpUtils.getImei(),
// userId: HttpUtils.getUserId(),
// contentId: String(this.contentDetailData?.newsId),
// recType: 1,
// contentType: this.contentDetailData?.newsType,
// relId: this.contentDetailData?.reLInfo?.relId,
// // channelId: String(this.contentDetailData?.reLInfo?.channelId)
// }
// let recommendList = await DetailViewModel.postRecommendList(params)
// if (recommendList.length > 0) {
// //推荐列表过滤音频和活动入口
// this.recommendList = recommendList.filter(item => item.objectType !== '3' && item.objectType !== '13');
// }
//
// }
// 已登录->查询用户对作品点赞、收藏状态
private async getInteractDataStatus() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentComponent.ets
View file @
90bd6ef
...
...
@@ -87,7 +87,7 @@ export struct CommentComponent {
dx: 0,
dy: -20
},
background
Color: "#50000000",
mask
Color: "#50000000",
})
this.getData();
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/CommentTabComponent.ets
View file @
90bd6ef
...
...
@@ -48,7 +48,7 @@ export struct CommentTabComponent {
dx: 0,
dy: -20
},
background
Color: "#50000000",
mask
Color: "#50000000",
})
this.onLoad(this.dialogController)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
View file @
90bd6ef
...
...
@@ -75,7 +75,7 @@ export struct QualityCommentsComponent {
dx: 0,
dy: -20
},
background
Color: "#50000000",
mask
Color: "#50000000",
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
90bd6ef
import { Action, ContentDTO, Params, InteractDataDTO } from 'wdBean';
import { CommonConstants, ConfigConstants, ScreenType } from 'wdConstant';
import { Logger, ToastUtils, DateTimeUtils } from 'wdKit';
import { Logger, ToastUtils, DateTimeUtils
, DisplayUtils
} from 'wdKit';
import { CompUtils } from '../../utils/CompUtils';
import { ProcessUtils, WDRouterRule } from 'wdRouter';
import { TrackConstants,
...
...
@@ -446,8 +446,11 @@ export struct PaperSingleColumn999CardView {
Image(this.loadImg?this.item?.coverUrl:'')
.borderRadius(5)
.objectFit(ImageFit.Fill)
.aspectRatio(319 / 179) ///图片设计比例
//
.aspectRatio(319 / 179) ///图片设计比例
.padding({ top: 10 })
.backgroundColor('#f5f5f5')
.width('100%')
.height((DisplayUtils.getDeviceWidth() - 66)*(179 / 319))
//视频
if (this.item?.videoInfo) {
Row() {
...
...
@@ -480,18 +483,14 @@ export struct PaperSingleColumn999CardView {
//直播
if (this.item?.objectType === '2') {
Row() {
Image(this.buildLiveStateImage())
.width(14)
.height(14)
.objectFit(ImageFit.Contain)
// LottieView({
// name: 'MorningPaper_live_status',
// path: "lottie/live_detail_living.json",
// lottieWidth: 14,
// lottieHeight: 14,
// autoplay: true,
// loop: true,
// })
LottieView({
name: 'MorningPaper_live_status+'+this.item.objectId,
path: "lottie/live_detail_living.json",
lottieWidth: 14,
lottieHeight: 14,
autoplay: true,
loop: true,
})
Text(this.buildLiveStateString())
.fontColor(Color.White)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomTitleUI.ets
View file @
90bd6ef
...
...
@@ -3,7 +3,7 @@ import router from '@ohos.router'
@Component
export struct CustomTitleUI {
imgBack:boolean = true
titleName:ResourceStr = "默认标题
"
@Prop titleName: ResourceStr = "
"
@Prop percent:number = 1
isShowBottomLine:boolean = false
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
View file @
90bd6ef
...
...
@@ -377,7 +377,7 @@ export struct LiveOperRowListView {
dx: 0,
dy: -20
},
background
Color: "#50000000",
mask
Color: "#50000000",
})
this.publishCommentModel.rootCommentId = '-1';
this.publishCommentModel.parentId = '-1';
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MultiPictureListPage.ets
View file @
90bd6ef
...
...
@@ -147,7 +147,7 @@ export struct MultiPictureListPage {
// ImageDownloadComponent({ url: this.currentUrl })
SaveNetWorkPictures({ url: this.currentUrl })
}
.
margin
({
.
padding
({
top: 14,
left: 20,
bottom: 14,
...
...
@@ -155,6 +155,11 @@ export struct MultiPictureListPage {
})
// .backgroundColor(Color.Blue)
.id('e_swiper_titles')
.linearGradient({
direction: GradientDirection.Bottom, // 渐变方向
colors: [['rgba(18, 18, 18, 0)', 0],
['rgba(18, 18, 18, 0.8)', 1.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageHelper.ets
View file @
90bd6ef
...
...
@@ -156,7 +156,7 @@ export class PageHelper {
}
// Logger.debug(TAG, 'getPageInfo go on')
this.parseGroup(pageModel, cacheIsSame)
}).catch(() => {
}).catch((
err:Error
) => {
this.refreshUIEnd(pageModel, false)
if (this.isPageLoaded(pageModel)) {
return
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/PageViewModel.ets
View file @
90bd6ef
...
...
@@ -15,7 +15,7 @@ import {
} from 'wdBean';
import { CompStyle } from 'wdConstant/Index';
import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit';
import { CollectionUtils, Logger, ResourcesUtils, StringUtils
, ToastUtils
} from 'wdKit';
import { CacheData, ResponseDTO, } from 'wdNetwork';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
import { PageRepository } from '../repository/PageRepository';
...
...
@@ -240,6 +240,9 @@ export class PageViewModel extends BaseViewModel {
}).catch((err: Error) => {
Logger.error(TAG, `getPageInfo then,error.name : ${err.name}, error.message:${err.message}`);
error(err);
if(err.message == "网络出小差了,请检查网络后重试"){
ToastUtils.shortToast(err.message)
}
});
});
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
90bd6ef
...
...
@@ -151,7 +151,7 @@ export struct DetailPlayLiveCommon {
.catch((error:Error) => {
Logger.debug(TAG + "error",error.message,error.name)
this.isHideLoading = true;
ToastUtils.shortToast('
内容不存在
');
ToastUtils.shortToast('
网络出小差了,请检查网络后重试
');
router.back();
reject();
});
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
90bd6ef
...
...
@@ -87,9 +87,12 @@ export struct DetailPlayLivePage {
this.getLiveDetails()
this.getLiveRoomData()
if(!await onlyWifiLoadVideo()){
this.showToastTip(this.toastText)
if (this.liveDetailPageLogic.dealOrShowToast()) {
if(!await onlyWifiLoadVideo()){
this.showToastTip(this.toastText)
}
}
this.configChatRoom()
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
View file @
90bd6ef
...
...
@@ -92,4 +92,21 @@ export class LiveDetailPageLogic {
}
return ''
}
dealOrShowToast(): boolean {
if (this.liveState == 'wait') {
if (this.contentDetailData.liveInfo
&& this.contentDetailData.liveInfo.previewUrl.length > 0
&& this.contentDetailData.liveInfo.previewType == 1) { ///预告视频
return true
}
}
if (this.liveState == 'running') {
if (this.contentDetailData.liveInfo.liveWay == 0) { ///直播视频
return true
}
}
return false
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
View file @
90bd6ef
...
...
@@ -34,6 +34,7 @@ export struct TabChatComponent {
updateData() {
if (this.index === this.parentComponentIndex && this.initUI) {
this.initUI = false
this.getLiveList()
}
...
...
@@ -87,7 +88,7 @@ export struct TabChatComponent {
this.ListLayout()
},
onRefresh: (resolve) => {
this.pageModel.currentPage
= 1
this.pageModel.currentPage
++
this.getLiveList(resolve)
},
...
...
@@ -136,7 +137,6 @@ export struct TabChatComponent {
return
}
this.pageModel.isLoading = true
this.pageModel.currentPage = 1
this.liveViewModel.getLiveChatList(
this.pageModel.currentPage,
this.contentDetailData?.liveInfo?.mlive?.mliveId,
...
...
@@ -152,34 +152,37 @@ export struct TabChatComponent {
resolve('')
}
}
if (this.pageModel.currentPage === 1) {
this.liveChatList.clear()
}
// if (this.pageModel.currentPage === 1) {
// this.liveChatList.clear()
// }
Logger.debug(TAG, `${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
this.pageModel.viewType = ViewType.LOADED;
this.liveChatList.push(...data.barrageResponses)
if (this.initUI) {
this.initUI = false
if (this.pageModel.currentPage === 1) {
setTimeout(() => {
this.scroller.scrollToIndex(this.liveChatList.totalCount() - 1)
}, 300)
}
if (data.barrageResponses.length === this.pageModel.pageSize) {
this.pageModel.currentPage++;
this.pageModel.hasMore = true;
} else {
this.pageModel.hasMore = false;
}
// this.pageModel.currentPage++;
// if (data.barrageResponses.length === this.pageModel.pageSize) {
//
// this.pageModel.hasMore = true;
// } else {
// this.pageModel.hasMore = false;
// }
} else {
this.pageModel.viewType = ViewType.EMPTY;
if (this.liveChatList.totalCount() == 0 ) {
this.pageModel.viewType = ViewType.EMPTY;
}
}
},
() => {
Logger.debug(TAG, `error`)
this.pageModel.viewType = ViewType.ERROR;
if (this.liveChatList.totalCount() == 0) {
this.pageModel.viewType = ViewType.ERROR;
}
})
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabInfoComponent.ets
View file @
90bd6ef
...
...
@@ -11,17 +11,20 @@ export struct TabInfoComponent {
}
build() {
Column() {
this.showLiveTitle()
this.showLiveDetails()
LiveCountdownComponent({liveDetailsBean:this.contentDetailData})
}.margin({
top: 13,
left: 16,
right: 16
})
.height('100%')
.alignItems(HorizontalAlign.Start)
Scroll(){
Column() {
this.showLiveTitle()
this.showLiveDetails()
LiveCountdownComponent({liveDetailsBean:this.contentDetailData})
}.margin({
top: 13,
left: 16,
right: 16
})
.alignItems(HorizontalAlign.Start)
}.layoutWeight(1)
.width("100%")
.scrollBar(BarState.Off)
}
aboutToDisappear(): void {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerFullScreenView.ets
View file @
90bd6ef
...
...
@@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from
import { DisplayDirection } from 'wdConstant/Index'
import { window } from '@kit.ArkUI'
const TAG = 'PlayerFullScreenView'
@Component
export struct PlayerFullScreenView {
private playerController?: WDPlayerController;
...
...
@@ -33,7 +34,11 @@ export struct PlayerFullScreenView {
}
share() {
this.playerController?.switchPlayOrPause()
WDShare.shareContent(this.contentDetailData)
// WDShare.shareContent(this.contentDetailData).then(() => {
// this.playerController?.switchPlayOrPause()
// })
}
updateProgress() {
...
...
@@ -150,11 +155,13 @@ export struct PlayerFullScreenView {
Image($r(`app.media.ic_play_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
.onClick(() => {
// console.log(TAG, `ic_play_2 onClick`, this.status )
this.playerController?.switchPlayOrPause()
})
Image($r(`app.media.ic_pause_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
.onClick(() => {
// console.log(TAG, `ic_pause_2 onClick`, this.status )
this.playerController?.switchPlayOrPause()
})
...
...
sight_harmony/products/phone/src/main/ets/dailynewspaperwidget/pages/DailyNewspaperWidgetCard.ets
View file @
90bd6ef
...
...
@@ -12,7 +12,19 @@ const DAILY_NEWSPAPER_DEEP_LINK = "rmrbapp://rmrb.app/openwith?type=topic&subTyp
struct DailyNewspaperWidgetCard {
@LocalStorageProp('paperType') paperType: FormNewspaperPaperType = FormNewspaperPaperType.unknown;
@LocalStorageProp('paperInfo') paperInfo: FormNewspaperPaperInfo = {} as FormNewspaperPaperInfo;
@LocalStorageProp('paperContents') paperContents: FormNewspaperPaperContent[] = [];
@LocalStorageProp('paperContents') @Watch("paperContentsUpdates") paperContents: FormNewspaperPaperContent[] = [];
@State needShowNumber: boolean = false
aboutToAppear(): void {
}
paperContentsUpdates() {
const hasAnyRightImages = this.paperContents.filter((content) => {
return content.coverUrl && content.coverUrl.length > 0
}).length > 0
this.needShowNumber = !this.paperInfo.showLeftImage && !hasAnyRightImages
}
build() {
...
...
@@ -73,7 +85,12 @@ struct DailyNewspaperWidgetCard {
List() {
ForEach(this.paperContents, (item: FormNewspaperPaperContent, index: number) => {
ListItem() {
ContentCellView({content: item, index: index, hasImage: (item.coverUrl && item.coverUrl.length > 0 ? true : false)})
ContentCellView({
content: item,
index: index,
needShowNumber: this.needShowNumber,
hasImage: (item.coverUrl && item.coverUrl.length > 0 ? true : false)
})
}
}, (item: FormNewspaperPaperContent, index) => index + JSON.stringify(item))
}
...
...
@@ -90,11 +107,17 @@ struct DailyNewspaperWidgetCard {
@Component
struct ContentCellView {
@Prop needShowNumber: boolean = false
@Prop content: FormNewspaperPaperContent
private index : number = 0
private hasImage: boolean = false
build() {
Row() {
if (this.needShowNumber) {
Text((this.index + 1) + "")
.fontColor("#ED2800")
.margin({left: 4, right: 4})
}
Text(this.content.title)
.maxLines((this.content.coverUrl && this.content.coverUrl.length > 0 ? 2 : 1))
.textOverflow({ overflow: TextOverflow.Ellipsis })
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
90bd6ef
...
...
@@ -48,6 +48,7 @@ export struct VideoChannelPage {
@State isShowAudioCom: boolean = false
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
async aboutToAppear() {
// 背景图高度
...
...
@@ -161,15 +162,30 @@ export struct VideoChannelPage {
.width(CommonUtils.calTopTabWidth(36, item.iconUrlSize))
.enabled(false)
} else {
Text(item.name)
.fontSize($r('app.float.selected_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(this.getTopNavFontColor(item, index))
.padding({
top: $r('app.float.top_tab_item_padding_top'),
bottom: $r('app.float.top_tab_item_padding_bottom')
})
.maxLines(this.MAX_LINE)
Stack({ alignContent: Alignment.TopEnd }){
Text(item.name)
.fontSize($r('app.float.selected_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(this.getTopNavFontColor(item, index))
.maxLines(this.MAX_LINE)
if (item.name == '直播') {
Button()
.type(ButtonType.Circle)
.width(6)
.height(6)
.backgroundColor('#ED2800')
.position({
x: 36,
y: -4
})
.visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
}
}
.padding({
top: $r('app.float.top_tab_item_padding_top'),
bottom: $r('app.float.top_tab_item_padding_bottom')
})
Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width(20)
...
...
@@ -186,7 +202,7 @@ export struct VideoChannelPage {
// 视频tab埋点
const tab = this.topNavList[index]
this.handleAudio(tab)
Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
//
Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
const params: ParamType = {
"pageName": tab.name,
"tabName": tab.name,
...
...
Please
register
or
login
to post a comment