陈剑华

Merge remote-tracking branch 'origin/main'

# Conflicts:
#	sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
Showing 17 changed files with 243 additions and 60 deletions
1 import { url } from '@kit.ArkTS' 1 import { url } from '@kit.ArkTS'
2 import App from '@system.app' 2 import App from '@system.app'
  3 +import { Action, Params } from 'wdBean/Index'
  4 +import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
3 import { Logger } from 'wdKit/Index' 5 import { Logger } from 'wdKit/Index'
  6 +import { WDRouterRule } from '../router/WDRouterRule'
  7 +import { ProcessUtils } from './ProcessUtils'
4 8
5 const TAG = "AppInnerLink" 9 const TAG = "AppInnerLink"
6 10
@@ -8,7 +12,7 @@ export class AppInnerLink { @@ -8,7 +12,7 @@ export class AppInnerLink {
8 12
9 static readonly INNER_LINK_PROTCOL = "rmrbapp:" 13 static readonly INNER_LINK_PROTCOL = "rmrbapp:"
10 static readonly INNER_LINK_HOSTNAME = "rmrb.app" 14 static readonly INNER_LINK_HOSTNAME = "rmrb.app"
11 - static readonly INNER_LINK_PATHNAME = "openwith" 15 + static readonly INNER_LINK_PATHNAME = "/openwith"
12 16
13 // 内链跳转 17 // 内链跳转
14 // 内链地址例如:rmrbapp://rmrb.app/openwith?type=article&subType=h5_template_article&contentId=30000762651&relId=500000038702&skipType=1&relType=1 18 // 内链地址例如:rmrbapp://rmrb.app/openwith?type=article&subType=h5_template_article&contentId=30000762651&relId=500000038702&skipType=1&relType=1
@@ -48,19 +52,110 @@ export class AppInnerLink { @@ -48,19 +52,110 @@ export class AppInnerLink {
48 } 52 }
49 53
50 private static jumpParams(params: InnerLinkParam) { 54 private static jumpParams(params: InnerLinkParam) {
  55 + if (!AppInnerLink.validTypes(params.type)) {
  56 + return
  57 + }
  58 +
  59 + const contentType = AppInnerLink.contentTypeWithType(params.type)
  60 +
  61 + if (params.type == "article") {
  62 + let taskAction: Action = {
  63 + type: 'JUMP_INNER_NEW_PAGE',
  64 + params: {
  65 + contentID: params.contentId,
  66 + pageID: 'IMAGE_TEXT_DETAIL',
  67 + extra: {
  68 + relType: params.relType,
  69 + relId: params.relId,
  70 + sourcePage: '5', // ???
  71 + } as ExtraDTO
  72 + } as Params,
  73 + };
  74 + WDRouterRule.jumpWithAction(taskAction)
  75 + return
  76 + }
  77 +
  78 + if (params.type == "video"
  79 + || params.type == "dynamic"
  80 + || params.type == "live"
  81 + || params.type == "audio"
  82 + || params.type == "picture") {
  83 + let taskAction: Action = {
  84 + type: 'JUMP_DETAIL_PAGE',
  85 + params: {
  86 + detailPageType: contentType,
  87 + contentID: params.contentId,
  88 + extra: {
  89 + relType: params.relType,
  90 + relId: params.relId,
  91 + } as ExtraDTO
  92 + } as Params,
  93 + };
  94 + WDRouterRule.jumpWithAction(taskAction)
  95 + return
  96 + }
  97 +
  98 + if (params.type == "owner_page" && params.creatorId) {
  99 + ProcessUtils.gotoPeopleShipHomePage(params.creatorId)
  100 + return
  101 + }
  102 +
  103 + if (params.type == "topic") {
  104 +
  105 + }
  106 +
  107 + if (params.type == "channel") {
  108 +
  109 + }
51 110
52 } 111 }
  112 + private static contentTypeWithType(type?: string) : number | undefined {
  113 + switch (type) {
  114 + case "video": return 1
  115 + case "dynamic": return 14
  116 + case "live": return 2
  117 + case "audio": return 13
  118 + case "picture": return 9
  119 + case "article": return 8
  120 + case "ask": return 16
  121 + }
  122 + return
  123 + }
  124 + private static validTypes(type?: string) : boolean {
  125 + if (!type) {
  126 + return false
  127 + }
  128 + let typeArray = ["article", "dynamic", "live", "video", "topic", "audio", "ask", "picture", "owner_page", "topic", "channel"]
  129 + return typeArray.indexOf(type) != -1
  130 + }
  131 +
53 private static jumpNoParams(params: InnerLinkParam) { 132 private static jumpNoParams(params: InnerLinkParam) {
  133 + if (!params.type || params.type != "app" || !params.subType) {
  134 + return
  135 + }
  136 + if (params.subType == "login") {
  137 + ProcessUtils.gotoLoginPage();
  138 + } else if (params.subType == "search") {
  139 +
  140 + } else if (params.subType == "home") {
  141 +
  142 + } else if (params.subType == "mine") {
54 143
55 } 144 }
56 - private static jumpAppH5(params: InnerLinkParam) { 145 + }
57 146
  147 + private static jumpAppH5(params: InnerLinkParam) {
  148 + if (params.type && params.type == "h5" && params.url) {
  149 + ProcessUtils.gotoDefaultWebPage(params.url);
  150 + }
58 } 151 }
59 private static jumpOutH5(params: InnerLinkParam) { 152 private static jumpOutH5(params: InnerLinkParam) {
60 - 153 + if (params.type && params.type == "h5" && params.url) {
  154 + ProcessUtils.jumpExternalWebPage(params.url);
  155 + }
61 } 156 }
62 private static jumpThirdApp(params: InnerLinkParam) { 157 private static jumpThirdApp(params: InnerLinkParam) {
63 - 158 + //TODO:
64 } 159 }
65 160
66 static parseParams(link: string) : InnerLinkParam | undefined { 161 static parseParams(link: string) : InnerLinkParam | undefined {
@@ -7,17 +7,20 @@ import { TopNavDTO } from './TopNavDTO'; @@ -7,17 +7,20 @@ import { TopNavDTO } from './TopNavDTO';
7 export class NavigationBodyDTO { 7 export class NavigationBodyDTO {
8 backgroundColor: string = ''; // 迭代二新增-底部导航背景色(信息流频道) 8 backgroundColor: string = ''; // 迭代二新增-底部导航背景色(信息流频道)
9 bottomNavList: BottomNavDTO[] = []; 9 bottomNavList: BottomNavDTO[] = [];
10 - // greyBottomNav: GreyBottomNav; // 灰度皮肤  
11 immersiveBackgroundColor: string = ''; // 迭代二新增-底部导航背景色(沉浸式频道) 10 immersiveBackgroundColor: string = ''; // 迭代二新增-底部导航背景色(沉浸式频道)
12 nightBackgroundColor: string = ''; // 迭代三新增-底部导航背景色(夜间模式) 11 nightBackgroundColor: string = ''; // 迭代三新增-底部导航背景色(夜间模式)
13 - 12 + greyBottomNav?: GreyBottomNavBean; // 灰度皮肤
14 md5: string = '' 13 md5: string = ''
15 } 14 }
16 15
  16 +export class GreyBottomNavBean {
  17 + bottomNavList: BottomNavDTO[] = [];
  18 + greyUserList: string[] = [];
  19 +}
  20 +
17 export class NavigationDetailDTO { 21 export class NavigationDetailDTO {
18 id: string = ''; // 迭代二新增-底部导航背景色(信息流频道) 22 id: string = ''; // 迭代二新增-底部导航背景色(信息流频道)
19 bottomNavCompList: BottomNavCompDTO[] = []; 23 bottomNavCompList: BottomNavCompDTO[] = [];
20 topNavChannelList: TopNavDTO[] = []; 24 topNavChannelList: TopNavDTO[] = [];
21 -  
22 md5: string = '' 25 md5: string = ''
23 } 26 }
@@ -258,7 +258,7 @@ export struct MorningEveningPaperComponent { @@ -258,7 +258,7 @@ export struct MorningEveningPaperComponent {
258 }) 258 })
259 } 259 }
260 } 260 }
261 - .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) 261 + .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off)
262 262
263 PaperTitleComponent() 263 PaperTitleComponent()
264 } 264 }
1 import { ContentDTO, joinPeopleNum } from 'wdBean/Index' 1 import { ContentDTO, joinPeopleNum } from 'wdBean/Index'
2 import { DateTimeUtils } from 'wdKit/Index' 2 import { DateTimeUtils } from 'wdKit/Index'
  3 +import { LottieView } from '../../components/lottie/LottieView';
3 import { LiveModel } from '../../viewmodel/LiveModel' 4 import { LiveModel } from '../../viewmodel/LiveModel'
4 5
5 /** 6 /**
@@ -78,8 +79,19 @@ export struct CardMediaInfo { @@ -78,8 +79,19 @@ export struct CardMediaInfo {
78 Text('预约') 79 Text('预约')
79 .mediaText() 80 .mediaText()
80 } else if (this.contentDTO?.liveInfo?.liveState === 'running') { 81 } else if (this.contentDTO?.liveInfo?.liveState === 'running') {
81 - Image($r('app.media.card_live'))  
82 - .mediaLogo() 82 + LottieView({
  83 + name: 'live_status_wait',
  84 + path: "lottie/live_detail_living.json",
  85 + lottieWidth: 14,
  86 + lottieHeight: 14,
  87 + autoplay: true,
  88 + loop: true,
  89 + })
  90 + .margin({
  91 + right: '2vp'
  92 + })
  93 + // Image($r('app.media.card_live'))
  94 + // .mediaLogo()
83 Text('直播中') 95 Text('直播中')
84 .mediaText() 96 .mediaText()
85 } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) { 97 } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo?.replayUri) {
@@ -124,7 +124,7 @@ export struct CardAdvGanMiComponent { @@ -124,7 +124,7 @@ export struct CardAdvGanMiComponent {
124 }) 124 })
125 125
126 // 更多按钮 126 // 更多按钮
127 - commonButton(this.advExtraData) 127 + this.commonButton()
128 128
129 } 129 }
130 .width(CommonConstants.FULL_WIDTH) 130 .width(CommonConstants.FULL_WIDTH)
@@ -134,19 +134,19 @@ export struct CardAdvGanMiComponent { @@ -134,19 +134,19 @@ export struct CardAdvGanMiComponent {
134 }) 134 })
135 135
136 } 136 }
137 -}  
138 137
139 -/* 138 + /*
140 标题样式 139 标题样式
141 */ 140 */
142 -@Builder  
143 -function commonButton(advExtraData: AdvExtraData) { 141 + @Builder
  142 + commonButton() {
144 143
145 144
146 Row() { 145 Row() {
147 Row() { 146 Row() {
148 Blank() 147 Blank()
149 - Text(advExtraData.itemMore.title == null ? $r('app.string.look_more') : advExtraData.itemMore.title) 148 + Text(this.advExtraData.itemMore == undefined ? $r('app.string.look_more') :
  149 + this.advExtraData.itemMore.title == undefined ? $r('app.string.look_more') : this.advExtraData.itemMore.title)
150 .fontColor('#222222') 150 .fontColor('#222222')
151 .fontSize('14fp') 151 .fontSize('14fp')
152 Image($r('app.media.icon_comp_more_right_red')).width(16).height(16) 152 Image($r('app.media.icon_comp_more_right_red')).width(16).height(16)
@@ -158,11 +158,14 @@ function commonButton(advExtraData: AdvExtraData) { @@ -158,11 +158,14 @@ function commonButton(advExtraData: AdvExtraData) {
158 .borderRadius(3) 158 .borderRadius(3)
159 .padding({ top: 10, bottom: 10, }) 159 .padding({ top: 10, bottom: 10, })
160 .onClick(() => { 160 .onClick(() => {
  161 + if (this.advExtraData.itemMore != undefined) {
161 let matInfo: CompAdvMatInfoBean = { 162 let matInfo: CompAdvMatInfoBean = {
162 - linkUrl: advExtraData.itemMore.linkUrl,  
163 - linkType: advExtraData.itemMore.linkType 163 + linkUrl: this.advExtraData.itemMore.linkUrl,
  164 + linkType: this.advExtraData.itemMore.linkType
164 } as CompAdvMatInfoBean; 165 } as CompAdvMatInfoBean;
165 ProcessUtils.openAdvDetail(matInfo) 166 ProcessUtils.openAdvDetail(matInfo)
  167 + }
  168 +
166 }) 169 })
167 }.width('100%').padding({ 170 }.width('100%').padding({
168 left: $r('app.float.card_comp_pagePadding_lf'), 171 left: $r('app.float.card_comp_pagePadding_lf'),
@@ -170,4 +173,6 @@ function commonButton(advExtraData: AdvExtraData) { @@ -170,4 +173,6 @@ function commonButton(advExtraData: AdvExtraData) {
170 173
171 }) 174 })
172 175
  176 + }
173 } 177 }
  178 +
@@ -49,6 +49,10 @@ export struct CardAdvVideoExComponent { @@ -49,6 +49,10 @@ export struct CardAdvVideoExComponent {
49 .borderRadius(4) 49 .borderRadius(4)
50 .borderWidth(0.5) 50 .borderWidth(0.5)
51 .borderColor($r('app.color.color_0D000000')) 51 .borderColor($r('app.color.color_0D000000'))
  52 + .onClick(() => {
  53 + ProcessUtils.openAdvDetail(this.compDTO.matInfo)
  54 +
  55 + })
52 56
53 CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO }) 57 CardAdvTop({ pageModel: this.pageModel, compDTO: this.compDTO })
54 } 58 }
@@ -76,7 +80,7 @@ export struct CardAdvVideoExComponent { @@ -76,7 +80,7 @@ export struct CardAdvVideoExComponent {
76 }.width('100%').listDirection(Axis.Vertical).margin({ top: 10, bottom: 10 }) 80 }.width('100%').listDirection(Axis.Vertical).margin({ top: 10, bottom: 10 })
77 81
78 // 更多按钮 82 // 更多按钮
79 - commonButton(this.advExtraData) 83 + this.commonButton()
80 84
81 } 85 }
82 .width(CommonConstants.FULL_WIDTH) 86 .width(CommonConstants.FULL_WIDTH)
@@ -88,14 +92,12 @@ export struct CardAdvVideoExComponent { @@ -88,14 +92,12 @@ export struct CardAdvVideoExComponent {
88 }) 92 })
89 93
90 } 94 }
91 -}  
92 95
93 -/* 96 + /*
94 标题样式 97 标题样式
95 */ 98 */
96 -@Builder  
97 -function commonButton(advExtraData: AdvExtraData) {  
98 - 99 + @Builder
  100 + commonButton() {
99 101
100 Row() { 102 Row() {
101 Blank() 103 Blank()
@@ -110,9 +112,11 @@ function commonButton(advExtraData: AdvExtraData) { @@ -110,9 +112,11 @@ function commonButton(advExtraData: AdvExtraData) {
110 .padding({ top: 10, bottom: 10, }) 112 .padding({ top: 10, bottom: 10, })
111 .onClick(() => { 113 .onClick(() => {
112 let matInfo: CompAdvMatInfoBean = { 114 let matInfo: CompAdvMatInfoBean = {
113 - linkUrl: advExtraData.itemMore.linkUrl,  
114 - linkType: advExtraData.itemMore.linkType 115 + linkUrl: this.advExtraData.itemMore.linkUrl,
  116 + linkType: this.advExtraData.itemMore.linkType
115 } as CompAdvMatInfoBean; 117 } as CompAdvMatInfoBean;
116 ProcessUtils.openAdvDetail(matInfo) 118 ProcessUtils.openAdvDetail(matInfo)
117 }) 119 })
  120 + }
118 } 121 }
  122 +
@@ -422,12 +422,13 @@ struct footerExpandedView { @@ -422,12 +422,13 @@ struct footerExpandedView {
422 build() { 422 build() {
423 Row() { 423 Row() {
424 if (this.item.expanded) { 424 if (this.item.expanded) {
425 - if (this.item.childsHasMore) {  
426 Row() { 425 Row() {
427 Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1) 426 Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)
428 - Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14).margin({ left: 6 }) 427 + if (this.item.childsHasMore) {
  428 + Row() {
  429 + Text('查看更多回复').fontColor($r('app.color.color_222222')).fontSize(14)
429 Image($r('app.media.comment_unfold')).width(12).height(12) 430 Image($r('app.media.comment_unfold')).width(12).height(12)
430 - }.margin({ left: 53 }) 431 + }.margin({ left: 6 })
431 .onClick(() => { 432 .onClick(() => {
432 if (this.item.isLoading) { 433 if (this.item.isLoading) {
433 return 434 return
@@ -439,13 +440,14 @@ struct footerExpandedView { @@ -439,13 +440,14 @@ struct footerExpandedView {
439 Row() { 440 Row() {
440 Text('收起').fontColor($r('app.color.color_222222')).fontSize(14) 441 Text('收起').fontColor($r('app.color.color_222222')).fontSize(14)
441 Image($r('app.media.comment_pickUp')).width(12).height(12) 442 Image($r('app.media.comment_pickUp')).width(12).height(12)
442 - }.margin({ left: this.item.childsHasMore ? 32 : 213 }) 443 + }.margin({ left: 6 })
443 .onClick(() => { 444 .onClick(() => {
444 this.item.pageNum = 1 445 this.item.pageNum = 1
445 this.item.expanded = false 446 this.item.expanded = false
446 this.item.childComments = [] 447 this.item.childComments = []
447 this.item.childCommentsLazyDataSource.clear() 448 this.item.childCommentsLazyDataSource.clear()
448 }) 449 })
  450 + }.margin({ left: 53 })
449 } else { 451 } else {
450 Row() { 452 Row() {
451 Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1) 453 Text().backgroundColor($r('app.color.color_EDEDED')).width(24).height(1)
@@ -568,6 +570,7 @@ struct commentHeaderView { @@ -568,6 +570,7 @@ struct commentHeaderView {
568 publishCommentModel: this.publishCommentModel 570 publishCommentModel: this.publishCommentModel
569 }).margin({ left: 59, right: 16 }) 571 }).margin({ left: 59, right: 16 })
570 }.alignItems(HorizontalAlign.Start) 572 }.alignItems(HorizontalAlign.Start)
  573 + .padding({bottom: 8})
571 } 574 }
572 575
573 replyComment() { 576 replyComment() {
@@ -129,8 +129,10 @@ export struct CommentText { @@ -129,8 +129,10 @@ export struct CommentText {
129 // Stack({ alignContent: Alignment.BottomEnd }) { 129 // Stack({ alignContent: Alignment.BottomEnd }) {
130 Text(this.longMessage) { 130 Text(this.longMessage) {
131 Span(this.expandedStates ? this.longMessage : this.maxLineMesssage) 131 Span(this.expandedStates ? this.longMessage : this.maxLineMesssage)
  132 + .lineHeight(this.lineHeight)
132 Span(this.collapseText) 133 Span(this.collapseText)
133 .fontColor("#999999") 134 .fontColor("#999999")
  135 + .lineHeight(this.lineHeight)
134 .onClick(() => { 136 .onClick(() => {
135 if (this.collapseText == collapseString) { 137 if (this.collapseText == collapseString) {
136 this.collapseText = uncollapseString; 138 this.collapseText = uncollapseString;
@@ -171,6 +173,7 @@ export struct CommentText { @@ -171,6 +173,7 @@ export struct CommentText {
171 else { 173 else {
172 Text(this.longMessage) 174 Text(this.longMessage)
173 .width('100%') 175 .width('100%')
  176 + .lineHeight(this.lineHeight)
174 .fontSize(this.fontSize) 177 .fontSize(this.fontSize)
175 .fontWeight(this.fontWeight) 178 .fontWeight(this.fontWeight)
176 .fontColor(this.fontColor) 179 .fontColor(this.fontColor)
@@ -63,8 +63,8 @@ export struct MessageListUI { @@ -63,8 +63,8 @@ export struct MessageListUI {
63 item.unReadCount = value.activeCount 63 item.unReadCount = value.activeCount
64 } 64 }
65 if (value.activeInfo != null) { 65 if (value.activeInfo != null) {
66 - if (value.activeInfo.message) {  
67 - item.desc = value.activeInfo.message 66 + if (value.activeInfo.title) {
  67 + item.desc = value.activeInfo.title.replace("null","")
68 } 68 }
69 if (value.activeInfo.time) { 69 if (value.activeInfo.time) {
70 item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "") 70 item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "")
1 import { BottomNavi, CommonConstants } from 'wdConstant'; 1 import { BottomNavi, CommonConstants } from 'wdConstant';
2 -import { BottomNavDTO, NavigationBodyDTO, TopNavDTO } from 'wdBean';  
3 -import { EmitterEventId, EmitterUtils, Logger } from 'wdKit'; 2 +import { BottomNavDTO, NavigationBodyDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean';
  3 +import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit';
4 import { TopNavigationComponent } from './TopNavigationComponent'; 4 import { TopNavigationComponent } from './TopNavigationComponent';
5 import { MinePageComponent } from './MinePageComponent'; 5 import { MinePageComponent } from './MinePageComponent';
6 import { CompUtils } from '../../utils/CompUtils'; 6 import { CompUtils } from '../../utils/CompUtils';
7 import ChannelViewModel from '../../viewmodel/ChannelViewModel'; 7 import ChannelViewModel from '../../viewmodel/ChannelViewModel';
8 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter'; 8 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter';
9 import { VideoChannelPage } from './VideoChannelPage'; 9 import { VideoChannelPage } from './VideoChannelPage';
  10 +import { HttpUtils } from 'wdNetwork/Index';
10 11
11 const TAG = 'BottomNavigationComponent'; 12 const TAG = 'BottomNavigationComponent';
12 let storage = LocalStorage.getShared(); 13 let storage = LocalStorage.getShared();
@@ -225,7 +226,7 @@ export struct BottomNavigationComponent { @@ -225,7 +226,7 @@ export struct BottomNavigationComponent {
225 } 226 }
226 227
227 private getBottomDetail() { 228 private getBottomDetail() {
228 - // 1、获取顶导缓存数据 229 + // // 1、获取顶导缓存数据
229 // this.bottomNavList.forEach((value) => { 230 // this.bottomNavList.forEach((value) => {
230 // // 先用底导带回的list初始化 231 // // 先用底导带回的list初始化
231 // this.topNavMap[value.id] = value.topNavChannelList 232 // this.topNavMap[value.id] = value.topNavChannelList
@@ -249,11 +250,32 @@ export struct BottomNavigationComponent { @@ -249,11 +250,32 @@ export struct BottomNavigationComponent {
249 250
250 private setData(data: NavigationBodyDTO) { 251 private setData(data: NavigationBodyDTO) {
251 Logger.debug(TAG, 'setData') 252 Logger.debug(TAG, 'setData')
252 - if (data && data.bottomNavList != null) {  
253 - Logger.info(TAG, `setData, bottomNav.length: ${data.bottomNavList.length}`); 253 + if (data == null) {
  254 + return
  255 + }
  256 + let list: BottomNavDTO[] = []
  257 + let userId: string = HttpUtils.getUserId()
  258 + // 先匹配换肤
  259 + if (data.greyBottomNav != null && data.greyBottomNav.greyUserList != null &&
  260 + data.greyBottomNav.greyUserList.length > 0) {
  261 + // data.greyBottomNav.greyUserList.includes(userId)不生效,直接用循环匹配
  262 + for (let i = 0; i < data.greyBottomNav.greyUserList.length; i++) {
  263 + let id = data.greyBottomNav.greyUserList[i]
  264 + if (id == userId) {
  265 + list = data.greyBottomNav.bottomNavList
  266 + break
  267 + }
  268 + }
  269 + }
  270 + // 没有匹配到换肤,则直接用data.bottomNavList
  271 + if (list.length <= 0) {
  272 + list = data.bottomNavList
  273 + }
  274 + if (list.length > 0) {
  275 + Logger.info(TAG, `setData, bottomNav.length: ${list.length}`);
254 // 使用filter方法移除name为'服务'的项 276 // 使用filter方法移除name为'服务'的项
255 - data.bottomNavList = data.bottomNavList.filter(item => item.name !== '服务');  
256 - this.bottomNavList = data.bottomNavList 277 + list = list.filter(item => item.name !== '服务');
  278 + this.bottomNavList = list
257 } 279 }
258 } 280 }
259 } 281 }
@@ -412,7 +412,7 @@ export struct PaperSingleColumn999CardView { @@ -412,7 +412,7 @@ export struct PaperSingleColumn999CardView {
412 } else if (hours < 24) { 412 } else if (hours < 24) {
413 result = `${hours}小时前`; 413 result = `${hours}小时前`;
414 } else { 414 } else {
415 - result = `${days}天前`; 415 + result = '';
416 } 416 }
417 417
418 console.log(result); 418 console.log(result);
@@ -422,12 +422,13 @@ export struct PaperSingleColumn999CardView { @@ -422,12 +422,13 @@ export struct PaperSingleColumn999CardView {
422 build() { 422 build() {
423 Column() { 423 Column() {
424 Text(this.item?.newsTitle) 424 Text(this.item?.newsTitle)
  425 + .fontColor('#222222')
425 .fontSize(16) 426 .fontSize(16)
426 .fontWeight(FontWeight.Bold) 427 .fontWeight(FontWeight.Bold)
427 .alignSelf(ItemAlign.Start) 428 .alignSelf(ItemAlign.Start)
428 .maxLines(3) 429 .maxLines(3)
429 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 430 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
430 - .margin({ left: 22, right: 22, top: 28 }) 431 + .margin({ left: 16, right: 16, top: 16 })
431 if (this.item?.coverUrl) { 432 if (this.item?.coverUrl) {
432 Stack({ alignContent: Alignment.BottomEnd }) { 433 Stack({ alignContent: Alignment.BottomEnd }) {
433 Image(this.item?.coverUrl) 434 Image(this.item?.coverUrl)
@@ -462,35 +463,36 @@ export struct PaperSingleColumn999CardView { @@ -462,35 +463,36 @@ export struct PaperSingleColumn999CardView {
462 .width(CommonConstants.FULL_PARENT) 463 .width(CommonConstants.FULL_PARENT)
463 .justifyContent(FlexAlign.End) 464 .justifyContent(FlexAlign.End)
464 } 465 }
465 - }.margin({ left: 22, right: 22 }) 466 + }.margin({ left: 16, right: 16 })
466 } 467 }
467 if (this.item?.newsSummary) { 468 if (this.item?.newsSummary) {
468 Text(this.item?.newsSummary) 469 Text(this.item?.newsSummary)
  470 + .fontColor('#6666666')
469 .fontSize(14) 471 .fontSize(14)
470 .padding({ top: 10 }) 472 .padding({ top: 10 })
471 .alignSelf(ItemAlign.Start) 473 .alignSelf(ItemAlign.Start)
472 .maxLines(3) 474 .maxLines(3)
473 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 475 .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
474 - .margin({ left: 22, right: 22 }) 476 + .margin({ left: 16, right: 16 })
475 } 477 }
476 if (this.item) { 478 if (this.item) {
477 Row() { 479 Row() {
478 Row() { 480 Row() {
479 Text(this.item?.source) 481 Text(this.item?.source)
480 .fontSize(12) 482 .fontSize(12)
481 - .fontColor(Color.Gray)  
482 - .margin({ left: 22 }) 483 + .fontColor('#B0B0B0')
  484 + .margin({ left: 16 })
483 Image($r('app.media.point')) 485 Image($r('app.media.point'))
484 .width(16) 486 .width(16)
485 .height(16) 487 .height(16)
486 .margin({ top: 10, bottom: 10 }) 488 .margin({ top: 10, bottom: 10 })
487 Text(this.getPublishTime()) 489 Text(this.getPublishTime())
488 .fontSize(12) 490 .fontSize(12)
489 - .fontColor(Color.Gray)  
490 - if (this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) { 491 + .fontColor('#B0B0B0')
  492 + if (this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
491 Text(this.interactData.commentNum + "评") 493 Text(this.interactData.commentNum + "评")
492 .fontSize(12) 494 .fontSize(12)
493 - .fontColor(Color.Gray) 495 + .fontColor('#B0B0B0')
494 .margin({ left: 6 }) 496 .margin({ left: 6 })
495 } 497 }
496 } 498 }
@@ -12,7 +12,7 @@ export default struct NoMoreLayout { @@ -12,7 +12,7 @@ export default struct NoMoreLayout {
12 Text($r('app.string.footer_text')) 12 Text($r('app.string.footer_text'))
13 .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT) 13 .fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT)
14 .textAlign(TextAlign.Center) 14 .textAlign(TextAlign.Center)
15 - .fontColor('#CCCCCC') 15 + .fontColor('#999999')
16 .margin({bottom:40}) 16 .margin({bottom:40})
17 } 17 }
18 .width(RefreshConstants.FULL_WIDTH) 18 .width(RefreshConstants.FULL_WIDTH)
@@ -149,6 +149,9 @@ export class GetuiPush { @@ -149,6 +149,9 @@ export class GetuiPush {
149 } 149 }
150 150
151 setAlias(bind: boolean, alias: string, sn: string = this.ALIAS_SN_USERID) { 151 setAlias(bind: boolean, alias: string, sn: string = this.ALIAS_SN_USERID) {
  152 + if (typeof alias == "number") {
  153 + alias = `${alias}`
  154 + }
152 if (!this.initialed) { return } 155 if (!this.initialed) { return }
153 if (bind) { 156 if (bind) {
154 Logger.debug(TAG, "推送 绑定别名 " + alias) 157 Logger.debug(TAG, "推送 绑定别名 " + alias)
@@ -56,9 +56,15 @@ export class PushContentParser { @@ -56,9 +56,15 @@ export class PushContentParser {
56 },*/ 56 },*/
57 let gtData = want.parameters[PushContentParser.LAUNCH_PARAM_GETUI_DATA] as Record<string, string | number | object> 57 let gtData = want.parameters[PushContentParser.LAUNCH_PARAM_GETUI_DATA] as Record<string, string | number | object>
58 if (gtData[PushContentParser.LAUNCH_PARAM_GETUI_TASKID] != undefined) { 58 if (gtData[PushContentParser.LAUNCH_PARAM_GETUI_TASKID] != undefined) {
59 - let json = JSON.parse(gtData["wantUri"] as string) as Record<string, string | number>  
60 - if (json && json[PushContentParser.PUSH_PARAM_PUSH_LINK] != null) {  
61 - const pushLink = json[PushContentParser.PUSH_PARAM_PUSH_LINK] as string 59 + // let json = JSON.parse(gtData["wantUri"] as string) as Record<string, string | number>
  60 + // if (json && json[PushContentParser.PUSH_PARAM_PUSH_LINK] != null) {
  61 + // const pushLink = json[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
  62 + // return {
  63 + // isPush: true, online: true, pushLink: pushLink, want: want
  64 + // }
  65 + // }
  66 + if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
  67 + let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
62 return { 68 return {
63 isPush: true, online: true, pushLink: pushLink, want: want 69 isPush: true, online: true, pushLink: pushLink, want: want
64 } 70 }
@@ -117,6 +117,12 @@ export default class EntryAbility extends UIAbility { @@ -117,6 +117,12 @@ export default class EntryAbility extends UIAbility {
117 return; 117 return;
118 } 118 }
119 console.info('floatWindowClass Succeeded in loading the content.'); 119 console.info('floatWindowClass Succeeded in loading the content.');
  120 + let color: string = 'rgba(0,0,0,0)';
  121 + try {
  122 + (floatWindowClass as window.Window).setWindowBackgroundColor(color);
  123 + } catch (exception) {
  124 + console.error('Failed to set the background color. Cause: ' + JSON.stringify(exception));
  125 + };
120 }); 126 });
121 127
122 floatWindowClass.on('windowEvent', (data) => { 128 floatWindowClass.on('windowEvent', (data) => {
@@ -29,12 +29,15 @@ struct MultiPictureDetailPage { @@ -29,12 +29,15 @@ struct MultiPictureDetailPage {
29 .backgroundColor(Color.Black) 29 .backgroundColor(Color.Black)
30 } 30 }
31 31
32 - pageTransition(){  
33 - // 定义页面进入时的效果,从右边侧滑入  
34 - PageTransitionEnter({ type: RouteType.None, duration: 300 }) 32 + pageTransition() {
  33 + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。
  34 + PageTransitionEnter({ type: RouteType.Push, duration: 300 })
35 .slide(SlideEffect.Right) 35 .slide(SlideEffect.Right)
36 - // 定义页面退出时的效果,向右边侧滑出  
37 - PageTransitionExit({ type: RouteType.None, duration: 300 }) 36 + PageTransitionEnter({ type: RouteType.Pop, duration: 300 })
  37 + .slide(SlideEffect.Left)
  38 + PageTransitionExit({ type: RouteType.Push, duration: 300 })
  39 + .slide(SlideEffect.Left)
  40 + PageTransitionExit({ type: RouteType.Pop, duration: 300 })
38 .slide(SlideEffect.Right) 41 .slide(SlideEffect.Right)
39 } 42 }
40 43
@@ -62,6 +65,17 @@ struct MultiPictureDetailPage { @@ -62,6 +65,17 @@ struct MultiPictureDetailPage {
62 this.closeFullScreen() 65 this.closeFullScreen()
63 } 66 }
64 67
  68 + onPageShow(): void {
  69 + console.log(TAG, 'onPageShow')
  70 + this.openFullScreen()
  71 +
  72 + }
  73 +
  74 + onPageHide(): void {
  75 + console.log(TAG, 'onPageHide')
  76 + this.closeFullScreen()
  77 + }
  78 +
65 /** 79 /**
66 * 开启沉浸式 80 * 开启沉浸式
67 * TODO:颜色待根据业务接口修改 81 * TODO:颜色待根据业务接口修改
@@ -88,7 +88,6 @@ struct Index { @@ -88,7 +88,6 @@ struct Index {
88 .height(20) 88 .height(20)
89 .fontColor('#222222') 89 .fontColor('#222222')
90 .fontSize(14) 90 .fontSize(14)
91 - .margin({ top: 10, left: 10 })  
92 .alignSelf(ItemAlign.Start) 91 .alignSelf(ItemAlign.Start)
93 .onStart(() => { 92 .onStart(() => {
94 console.info('Marquee animation complete onStart') 93 console.info('Marquee animation complete onStart')
@@ -115,7 +114,7 @@ struct Index { @@ -115,7 +114,7 @@ struct Index {
115 } 114 }
116 .width("100%") 115 .width("100%")
117 .height(16) 116 .height(16)
118 - .margin({ top: 4, left: 10 }) 117 + .margin({ top: 4})
119 118
120 Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule }) 119 Progress({ value: this.progressVal, total: 100, type: ProgressType.Capsule })
121 .color("#ED2800") 120 .color("#ED2800")
@@ -194,7 +193,13 @@ struct Index { @@ -194,7 +193,13 @@ struct Index {
194 ) 193 )
195 .width('100%') 194 .width('100%')
196 .height('100%') 195 .height('100%')
  196 + .borderRadius(4)
  197 + .padding({
  198 + top: 10,
  199 + bottom: 10,
  200 + left: 10,
  201 + right: 0
  202 + })
197 .backgroundColor(Color.White) 203 .backgroundColor(Color.White)
198 - .borderRadius(2)  
199 } 204 }
200 } 205 }