chengen02

Merge remote-tracking branch 'origin/main'

@@ -146,7 +146,7 @@ export struct RmhTitle { @@ -146,7 +146,7 @@ export struct RmhTitle {
146 .height(16) 146 .height(16)
147 } 147 }
148 } 148 }
149 - Text(this.rmhInfo?.rmhDesc) 149 + Text(this.rmhInfo?.rmhDesc.replaceAll('\n', ''))
150 .fontSize($r("app.float.font_size_12")) 150 .fontSize($r("app.float.font_size_12"))
151 .fontColor($r("app.color.color_B0B0B0")) 151 .fontColor($r("app.color.color_B0B0B0"))
152 .maxLines(1) 152 .maxLines(1)
@@ -112,6 +112,8 @@ interface picProps { @@ -112,6 +112,8 @@ interface picProps {
112 struct createImg { 112 struct createImg {
113 @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] 113 @Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
114 @State loadImg: boolean = false; 114 @State loadImg: boolean = false;
  115 + @State onePicW: number = 0; // 只有一张图时候图片的宽度
  116 + @State onePicH: number = 0; // 只有一张图时候图片的高度
115 117
116 async aboutToAppear(): Promise<void> { 118 async aboutToAppear(): Promise<void> {
117 if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 119 if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
@@ -177,7 +179,7 @@ struct createImg { @@ -177,7 +179,7 @@ struct createImg {
177 Image(this.loadImg ? item.fullUrl || item.url : '') 179 Image(this.loadImg ? item.fullUrl || item.url : '')
178 .backgroundColor(0xf5f5f5) 180 .backgroundColor(0xf5f5f5)
179 .width('100%') 181 .width('100%')
180 - .height(172) 182 + .height(198)
181 .autoResize(true) 183 .autoResize(true)
182 .borderRadius(this.caclImageRadius(index)) 184 .borderRadius(this.caclImageRadius(index))
183 } else if (this.getPicType(item.weight, item.height) === 2) { 185 } else if (this.getPicType(item.weight, item.height) === 2) {
@@ -215,14 +217,18 @@ struct createImg { @@ -215,14 +217,18 @@ struct createImg {
215 } 217 }
216 } else { 218 } else {
217 GridCol({ 219 GridCol({
218 - span: item.landscape === 1 ? 12 : 8 220 + span: this.onePicW > this.onePicH ? 12 : 8
219 }) { 221 }) {
220 Image(this.loadImg ? item.fullUrl : '') 222 Image(this.loadImg ? item.fullUrl : '')
221 .backgroundColor(0xf5f5f5) 223 .backgroundColor(0xf5f5f5)
222 - .aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305) 224 + .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
223 .autoResize(true) 225 .autoResize(true)
224 .borderRadius(this.caclImageRadius(index)) 226 .borderRadius(this.caclImageRadius(index))
225 .opacity(!item.weight && !item.height ? 0 : 1) 227 .opacity(!item.weight && !item.height ? 0 : 1)
  228 + .onComplete((event?) => {
  229 + this.onePicW = event?.width || 0;
  230 + this.onePicH = event?.height || 0;
  231 + })
226 } 232 }
227 } 233 }
228 } else if (this.fullColumnImgUrls.length === 4) { 234 } else if (this.fullColumnImgUrls.length === 4) {
@@ -401,7 +401,7 @@ export struct ZhSingleRow03 { @@ -401,7 +401,7 @@ export struct ZhSingleRow03 {
401 .fontWeight(600) 401 .fontWeight(600)
402 } 402 }
403 403
404 - if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') { 404 + if (!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
405 Row() { 405 Row() {
406 Text("更多") 406 Text("更多")
407 .fontSize($r("app.float.font_size_14")) 407 .fontSize($r("app.float.font_size_14"))
@@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout { @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout {
40 40
41 aboutToAppear() { 41 aboutToAppear() {
42 this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] 42 this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]
43 - this.myChannelList.forEach(item=>{ 43 + this.myChannelList.forEach(item => {
44 this.channelIds.push(item.channelId) 44 this.channelIds.push(item.channelId)
45 }) 45 })
46 } 46 }
@@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout { @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout {
53 this.channelIds.splice(index2, 0, channelIdTmp[0]) 53 this.channelIds.splice(index2, 0, channelIdTmp[0])
54 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 54 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
55 } 55 }
  56 +
56 //删除频道 57 //删除频道
57 - delChannelItem(index: number){ 58 + delChannelItem(index: number) {
58 let item = this.myChannelList.splice(index, 1)[0] 59 let item = this.myChannelList.splice(index, 1)[0]
59 this.channelIds.splice(index, 1) 60 this.channelIds.splice(index, 1)
60 AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds)) 61 AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds))
@@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout { @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout {
65 this.localChannelList.unshift(item) 66 this.localChannelList.unshift(item)
66 } 67 }
67 } 68 }
  69 +
68 // 添加频道 70 // 添加频道
69 - addChannelItem(item: TopNavDTO){ 71 + addChannelItem(item: TopNavDTO) {
70 this.channelIds.push(item.channelId) 72 this.channelIds.push(item.channelId)
71 this.myChannelList.push(item) 73 this.myChannelList.push(item)
72 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 74 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
@@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout { @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout {
323 } 325 }
324 .width('23%') 326 .width('23%')
325 .height(40) 327 .height(40)
  328 + .borderRadius(3)
326 .border({ 329 .border({
327 - width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1,  
328 - color: '#EDEDED', 330 + width: 0.7,
  331 + color: item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#EDEDED',
329 radius: 3 332 radius: 3
330 }) 333 })
331 .zIndex(this.dragItem == item.num ? 1 : 0) 334 .zIndex(this.dragItem == item.num ? 1 : 0)
@@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout { @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout {
427 .width(80) 430 .width(80)
428 .height(40) 431 .height(40)
429 .border({ 432 .border({
430 - width: 1,  
431 - color: '#EDEDED' 433 + width: 0.7,
  434 + color: '#EDEDED',
  435 + radius: 3
432 }) 436 })
433 }, (item: TopNavDTO) => JSON.stringify(item)) 437 }, (item: TopNavDTO) => JSON.stringify(item))
434 } 438 }
@@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout { @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout {
471 .width(80) 475 .width(80)
472 .height(40) 476 .height(40)
473 .border({ 477 .border({
474 - width: 1,  
475 - color: '#EDEDED' 478 + width: 0.7,
  479 + color: '#EDEDED',
  480 + radius: 3
476 }) 481 })
477 }, (item: TopNavDTO) => JSON.stringify(item)) 482 }, (item: TopNavDTO) => JSON.stringify(item))
478 } 483 }
@@ -203,7 +203,6 @@ export struct TopNavigationComponentNew { @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew {
203 moreChannelList: $moreChannelList, 203 moreChannelList: $moreChannelList,
204 localChannelList: $localChannelList, 204 localChannelList: $localChannelList,
205 changeTab: (index) => { 205 changeTab: (index) => {
206 -  
207 this.changePage(index) 206 this.changePage(index)
208 } 207 }
209 }) 208 })
@@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
50 50
51 toMore() { 51 toMore() {
52 if (this.moreWidth > this.initMoreWidth * 2) { 52 if (this.moreWidth > this.initMoreWidth * 2) {
  53 + this.liveToMore();
  54 + }
  55 + }
  56 +
  57 + liveToMore() {
  58 + if (!!this.compDTO.dataSourceType) {
  59 + if (this.compDTO.dataSourceType === 'OBJECT_POS') {
  60 + ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
  61 + return;
  62 + }
53 if (this.compDTO.linkUrl) { 63 if (this.compDTO.linkUrl) {
54 let taskAction: Action = { 64 let taskAction: Action = {
55 type: 'JUMP_H5_BY_WEB_VIEW', 65 type: 'JUMP_H5_BY_WEB_VIEW',
@@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
61 } else { 71 } else {
62 this.jumpToLiveMorePage() 72 this.jumpToLiveMorePage()
63 } 73 }
  74 + } else {
  75 + if (this.compDTO?.objectType === '11') {
  76 + } else {
  77 + const contentDTO: ContentDTO = {
  78 + objectId: this.compDTO.objectId,
  79 + objectType: this.compDTO.objectType,
  80 + linkUrl: this.compDTO.linkUrl,
  81 + pageId: this.compDTO.pageId
  82 + } as ContentDTO
  83 + ProcessUtils.processPage(contentDTO)
  84 + }
64 } 85 }
65 } 86 }
66 87
  88 + showMore() {
  89 + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
  90 + }
  91 +
67 build() { 92 build() {
68 Column() { 93 Column() {
69 Row() { 94 Row() {
@@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
87 .width(14) 112 .width(14)
88 .height(14) 113 .height(14)
89 } 114 }
90 - .visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible) 115 + .visibility(this.showMore() ? Visibility.Visible : Visibility.None)
91 .onClick(() => { 116 .onClick(() => {
92 - if (this.compDTO.linkUrl) {  
93 - let taskAction: Action = {  
94 - type: 'JUMP_H5_BY_WEB_VIEW',  
95 - params: {  
96 - url: this.compDTO.linkUrl  
97 - } as Params,  
98 - };  
99 - WDRouterRule.jumpWithAction(taskAction)  
100 - } else {  
101 - this.jumpToLiveMorePage()  
102 - } 117 + this.liveToMore();
103 }) 118 })
104 119
105 }.justifyContent(FlexAlign.SpaceBetween) 120 }.justifyContent(FlexAlign.SpaceBetween)
@@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
141 }) 156 })
142 } 157 }
143 158
144 - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 159 + if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
145 Row() { 160 Row() {
146 Ellipse() 161 Ellipse()
147 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 162 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent { @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent {
99 this.loadImg = await onlyWifiLoadImg(); 99 this.loadImg = await onlyWifiLoadImg();
100 } 100 }
101 101
  102 + showMore() {
  103 + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
  104 + }
  105 +
102 106
103 build() { 107 build() {
104 Column() { 108 Column() {
@@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent { @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent {
114 .fontWeight(600) 118 .fontWeight(600)
115 } 119 }
116 120
117 - if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') { 121 + if (this.showMore()) {
118 Row() { 122 Row() {
119 Text("更多") 123 Text("更多")
120 .fontSize($r("app.float.font_size_14")) 124 .fontSize($r("app.float.font_size_14"))
@@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent { @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent {
175 }) 179 })
176 }) 180 })
177 } 181 }
178 - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { 182 + if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
179 Row() { 183 Row() {
180 Ellipse() 184 Ellipse()
181 .width(2* (this.moreWidth - this.initMoreWidth - 1)) 185 .width(2* (this.moreWidth - this.initMoreWidth - 1))
@@ -125,7 +125,6 @@ export struct TopPlayComponent { @@ -125,7 +125,6 @@ export struct TopPlayComponent {
125 } else { 125 } else {
126 Logger.debug(TAG, `---0------>${playUrl}`) 126 Logger.debug(TAG, `---0------>${playUrl}`)
127 if (StringUtils.isNotEmpty(playUrl)) { 127 if (StringUtils.isNotEmpty(playUrl)) {
128 - Logger.debug(TAG, `---isNotEmpty------>`)  
129 this.playUrl = playUrl 128 this.playUrl = playUrl
130 this.tryToPlay() 129 this.tryToPlay()
131 } 130 }
@@ -152,8 +151,8 @@ export struct TopPlayComponent { @@ -152,8 +151,8 @@ export struct TopPlayComponent {
152 this.previewUrl = '' 151 this.previewUrl = ''
153 } 152 }
154 } 153 }
155 - Logger.debug(TAG,  
156 - `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource) 154 + // Logger.debug(TAG,
  155 + // `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource)
157 } 156 }
158 157
159 tryToPlay() { 158 tryToPlay() {
@@ -74,7 +74,10 @@ struct ForgetPasswordPage { @@ -74,7 +74,10 @@ struct ForgetPasswordPage {
74 }) 74 })
75 }.padding({ left: 25, right: 25 }).width('100%') 75 }.padding({ left: 25, right: 25 }).width('100%')
76 76
77 - }.width('100%').height('100%').alignItems(HorizontalAlign.Start) 77 + }.width('100%')
  78 + .height('100%')
  79 + .alignItems(HorizontalAlign.Start)
  80 + .backgroundColor(Color.White)
78 } 81 }
79 82
80 aboutToAppear() { 83 aboutToAppear() {
@@ -241,7 +241,8 @@ struct LoginPage { @@ -241,7 +241,8 @@ struct LoginPage {
241 .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) 241 .visibility(this.isProtocol ? Visibility.Visible : Visibility.None)
242 242
243 }.width('100%') 243 }.width('100%')
244 - .height('100%').backgroundColor(Color.White) 244 + .height('100%')
  245 + .backgroundColor(Color.White)
245 } 246 }
246 247
247 @Builder 248 @Builder
@@ -280,6 +281,7 @@ struct LoginPage { @@ -280,6 +281,7 @@ struct LoginPage {
280 .width('100%') 281 .width('100%')
281 }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) 282 }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
282 .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible) 283 .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible)
  284 + .backgroundColor(Color.White)
283 285
284 } 286 }
285 287