Showing
43 changed files
with
360 additions
and
264 deletions
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true | 12 | "deliveryWithInstall": true |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true | 12 | "deliveryWithInstall": true |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true | 12 | "deliveryWithInstall": true |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true | 12 | "deliveryWithInstall": true |
| @@ -44,7 +44,7 @@ export struct CarderInteraction { | @@ -44,7 +44,7 @@ export struct CarderInteraction { | ||
| 44 | 44 | ||
| 45 | build() { | 45 | build() { |
| 46 | Row() { | 46 | Row() { |
| 47 | - if(this.contentDTO.shareFlag === '1'){ | 47 | + if(this.contentDetailData?.shareInfo?.shareOpen === 1){ |
| 48 | Row() { | 48 | Row() { |
| 49 | Image($r('app.media.CarderInteraction_share')) | 49 | Image($r('app.media.CarderInteraction_share')) |
| 50 | .width(18) | 50 | .width(18) |
| @@ -60,14 +60,9 @@ export struct CarderInteraction { | @@ -60,14 +60,9 @@ export struct CarderInteraction { | ||
| 60 | }) | 60 | }) |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | - if(this.contentDTO.rmhInfo != null){ | ||
| 64 | - if(this.contentDTO.shareInfo != null && 1 == this.contentDTO.shareInfo.shareOpen && 1 == this.contentDTO.rmhInfo.cnShareControl){ | ||
| 65 | - this.commentLayout() | ||
| 66 | - } | ||
| 67 | - }else{ | 63 | + if(this.contentDetailData?.openComment == 1){ |
| 68 | this.commentLayout() | 64 | this.commentLayout() |
| 69 | } | 65 | } |
| 70 | - | ||
| 71 | this.builderLike() | 66 | this.builderLike() |
| 72 | } | 67 | } |
| 73 | .width('100%') | 68 | .width('100%') |
| @@ -45,7 +45,9 @@ export struct CompParser { | @@ -45,7 +45,9 @@ export struct CompParser { | ||
| 45 | 45 | ||
| 46 | aboutToAppear(): void { | 46 | aboutToAppear(): void { |
| 47 | 47 | ||
| 48 | - console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) | 48 | + |
| 49 | + | ||
| 50 | + console.log('CompParser', JSON.stringify(this.compDTO)) | ||
| 49 | this.pageName = this.pageModel.pageInfo.name | 51 | this.pageName = this.pageModel.pageInfo.name |
| 50 | // 轮播图屏蔽音频类型稿件 | 52 | // 轮播图屏蔽音频类型稿件 |
| 51 | if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 53 | if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| @@ -79,11 +81,13 @@ export struct CompParser { | @@ -79,11 +81,13 @@ export struct CompParser { | ||
| 79 | @Builder | 81 | @Builder |
| 80 | componentBuilder() { | 82 | componentBuilder() { |
| 81 | 83 | ||
| 84 | + //CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO:this.compDTO }) | ||
| 85 | + | ||
| 82 | if (this.compDTO.operDataList[0]?.objectType !== '3' && | 86 | if (this.compDTO.operDataList[0]?.objectType !== '3' && |
| 83 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | 87 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 |
| 84 | if (this.compDTO.compStyle === CompStyle.Label_03) { | 88 | if (this.compDTO.compStyle === CompStyle.Label_03) { |
| 85 | LabelComponent({ compDTO: this.compDTO }) | 89 | LabelComponent({ compDTO: this.compDTO }) |
| 86 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 90 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 87 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 91 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| 88 | if (this.compDTO.operDataList.length > this.audioItems.length) { | 92 | if (this.compDTO.operDataList.length > this.audioItems.length) { |
| 89 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 93 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| @@ -100,7 +104,7 @@ export struct CompParser { | @@ -100,7 +104,7 @@ export struct CompParser { | ||
| 100 | } else { | 104 | } else { |
| 101 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 105 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 102 | } | 106 | } |
| 103 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 107 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 104 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 108 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| 105 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 109 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 106 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 110 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -117,27 +121,38 @@ export struct CompParser { | @@ -117,27 +121,38 @@ export struct CompParser { | ||
| 117 | 121 | ||
| 118 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 122 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 119 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 123 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 120 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 124 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 121 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { | 125 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 122 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 126 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 123 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 127 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 124 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 128 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 125 | // ZhSingleRow05({ compDTO }) | 129 | // ZhSingleRow05({ compDTO }) |
| 126 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 130 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 127 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { | 131 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { |
| 128 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 132 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 129 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 133 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 130 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 134 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 131 | //头图卡 和comStyle 2相同, | 135 | //头图卡 和comStyle 2相同, |
| 132 | - Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName }) | ||
| 133 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) | 136 | + Card5Component({ |
| 137 | + compDTO: this.compDTO, | ||
| 138 | + contentDTO: this.compDTO.operDataList[0], | ||
| 139 | + titleShowPolicy: this.compDTO.titleShowPolicy, | ||
| 140 | + pageId: this.pageId, | ||
| 141 | + pageName: this.pageName | ||
| 142 | + }) | ||
| 143 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 134 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 144 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 135 | // 大图卡 | 145 | // 大图卡 |
| 136 | Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 146 | Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 137 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 147 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 138 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { | 148 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { |
| 139 | //时间链卡 | 149 | //时间链卡 |
| 140 | - Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 150 | + Card9Component({ |
| 151 | + compDTO: this.compDTO, | ||
| 152 | + contentDTO:this.compDTO.operDataList[0], | ||
| 153 | + pageId: this.pageId, | ||
| 154 | + pageName: this.pageName | ||
| 155 | + }) | ||
| 141 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 156 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 142 | } else if(this.compDTO.compStyle === CompStyle.Card_13){ | 157 | } else if(this.compDTO.compStyle === CompStyle.Card_13){ |
| 143 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 158 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| @@ -152,8 +167,6 @@ export struct CompParser { | @@ -152,8 +167,6 @@ export struct CompParser { | ||
| 152 | // ZhSingleColumn05({ compDTO: compDTO }) | 167 | // ZhSingleColumn05({ compDTO: compDTO }) |
| 153 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 168 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 154 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { | 169 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { |
| 155 | - // Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 }) | ||
| 156 | - // Divider().strokeWidth(6).color('#f5f5f5') | ||
| 157 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 170 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 158 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 171 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 159 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 172 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| @@ -7,6 +7,7 @@ import { Notes } from './notes'; | @@ -7,6 +7,7 @@ import { Notes } from './notes'; | ||
| 7 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; | 7 | import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; |
| 8 | import { InfomationCardClick } from '../../utils/infomationCardClick' | 8 | import { InfomationCardClick } from '../../utils/infomationCardClick' |
| 9 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; | 9 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; |
| 10 | +import router from '@ohos.router' | ||
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| 12 | * 大专题卡--CompStyle: 10 | 13 | * 大专题卡--CompStyle: 10 |
| @@ -23,10 +24,19 @@ export struct Card10Component { | @@ -23,10 +24,19 @@ export struct Card10Component { | ||
| 23 | @ObjectLink compDTO: CompDTO | 24 | @ObjectLink compDTO: CompDTO |
| 24 | @State titleMarked: boolean = false; | 25 | @State titleMarked: boolean = false; |
| 25 | @State textArr: textItem[] = [] | 26 | @State textArr: textItem[] = [] |
| 27 | + @State hideDetail: boolean = false; | ||
| 26 | 28 | ||
| 27 | async aboutToAppear(): Promise<void> { | 29 | async aboutToAppear(): Promise<void> { |
| 28 | this.titleInit(); | 30 | this.titleInit(); |
| 29 | this.loadImg = await onlyWifiLoadImg(); | 31 | this.loadImg = await onlyWifiLoadImg(); |
| 32 | + this.initHideDetail(); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + initHideDetail() { | ||
| 36 | + const curRouter = router.getState().name; | ||
| 37 | + if (curRouter === 'MyCollectionListPage') { | ||
| 38 | + this.hideDetail = true; | ||
| 39 | + } | ||
| 30 | } | 40 | } |
| 31 | 41 | ||
| 32 | titleInit() { | 42 | titleInit() { |
| @@ -83,19 +93,21 @@ export struct Card10Component { | @@ -83,19 +93,21 @@ export struct Card10Component { | ||
| 83 | }.alignContent(Alignment.BottomStart) | 93 | }.alignContent(Alignment.BottomStart) |
| 84 | 94 | ||
| 85 | // 专题列表--后端返回三个, | 95 | // 专题列表--后端返回三个, |
| 86 | - Column() { | ||
| 87 | - ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { | ||
| 88 | - this.timelineItem(item, index) | ||
| 89 | - if (index < this.contentDTO.slideShows.length - 1) { | ||
| 90 | - // 在不是最后一个元素的情况下添加分隔符 | ||
| 91 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }); | ||
| 92 | - } | ||
| 93 | - }) | 96 | + if (!this.hideDetail) { |
| 97 | + Column() { | ||
| 98 | + ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { | ||
| 99 | + this.timelineItem(item, index) | ||
| 100 | + if (index < this.contentDTO.slideShows.length - 1) { | ||
| 101 | + // 在不是最后一个元素的情况下添加分隔符 | ||
| 102 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }); | ||
| 103 | + } | ||
| 104 | + }) | ||
| 105 | + } | ||
| 94 | } | 106 | } |
| 95 | 107 | ||
| 96 | 108 | ||
| 97 | // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 | 109 | // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 |
| 98 | - if (this.contentDTO.hasMore == 1) { | 110 | + if (this.contentDTO.hasMore == 1 && !this.hideDetail) { |
| 99 | Row() { | 111 | Row() { |
| 100 | Text("查看更多") | 112 | Text("查看更多") |
| 101 | .fontSize($r("app.float.font_size_14")) | 113 | .fontSize($r("app.float.font_size_14")) |
| @@ -233,7 +233,8 @@ struct createImg { | @@ -233,7 +233,8 @@ struct createImg { | ||
| 233 | }) | 233 | }) |
| 234 | } | 234 | } |
| 235 | } | 235 | } |
| 236 | - } else if (this.fullColumnImgUrls.length === 4) { | 236 | + } else if (this.fullColumnImgUrls.length === 5) { |
| 237 | + // 四图卡里面塞了一张补位卡 | ||
| 237 | GridCol({ | 238 | GridCol({ |
| 238 | span: { xs: 4 } | 239 | span: { xs: 4 } |
| 239 | }) { | 240 | }) { |
| @@ -53,7 +53,7 @@ export struct Card5Component { | @@ -53,7 +53,7 @@ export struct Card5Component { | ||
| 53 | } | 53 | } |
| 54 | ) | 54 | ) |
| 55 | .aspectRatio(343 / 225) | 55 | .aspectRatio(343 / 225) |
| 56 | - if (!!this.titleShowPolicy) { | 56 | + if (!!this.titleShowPolicy || this.titleShowPolicy === null ) { |
| 57 | Row() | 57 | Row() |
| 58 | .borderRadius( | 58 | .borderRadius( |
| 59 | { | 59 | { |
| @@ -273,14 +273,14 @@ struct indicatorAnimations { | @@ -273,14 +273,14 @@ struct indicatorAnimations { | ||
| 273 | if (this.isAutoPlay) { | 273 | if (this.isAutoPlay) { |
| 274 | setTimeout(() => { | 274 | setTimeout(() => { |
| 275 | this.leftW = '100%' | 275 | this.leftW = '100%' |
| 276 | - this.centerFontSize = 11 | 276 | + this.centerFontSize = 10 |
| 277 | }, 0) | 277 | }, 0) |
| 278 | setTimeout(() => { | 278 | setTimeout(() => { |
| 279 | this.rightW = '100%' | 279 | this.rightW = '100%' |
| 280 | }, 1500) | 280 | }, 1500) |
| 281 | } else { | 281 | } else { |
| 282 | this.leftW = '100%' | 282 | this.leftW = '100%' |
| 283 | - this.centerFontSize = 11 | 283 | + this.centerFontSize = 10 |
| 284 | this.rightW = '100%' | 284 | this.rightW = '100%' |
| 285 | } | 285 | } |
| 286 | 286 | ||
| @@ -307,7 +307,7 @@ struct indicatorAnimations { | @@ -307,7 +307,7 @@ struct indicatorAnimations { | ||
| 307 | Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`) | 307 | Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`) |
| 308 | .fontSize(this.centerFontSize) | 308 | .fontSize(this.centerFontSize) |
| 309 | .fontColor($r('app.color.white')) | 309 | .fontColor($r('app.color.white')) |
| 310 | - .width(16) | 310 | + .width(11) |
| 311 | .textAlign(TextAlign.Center) | 311 | .textAlign(TextAlign.Center) |
| 312 | .margin({ | 312 | .margin({ |
| 313 | bottom: -2 | 313 | bottom: -2 |
| @@ -153,8 +153,8 @@ export struct ZhSingleRow02 { | @@ -153,8 +153,8 @@ export struct ZhSingleRow02 { | ||
| 153 | .padding({ | 153 | .padding({ |
| 154 | left: $r('app.float.card_comp_pagePadding_lf'), | 154 | left: $r('app.float.card_comp_pagePadding_lf'), |
| 155 | // right: $r('app.float.card_comp_pagePadding_lf'), | 155 | // right: $r('app.float.card_comp_pagePadding_lf'), |
| 156 | - top: $r('app.float.card_comp_pagePadding_tb'), | ||
| 157 | - bottom: $r('app.float.card_comp_pagePadding_tb') | 156 | + top: 8, |
| 157 | + bottom: 8 | ||
| 158 | }) | 158 | }) |
| 159 | .backgroundColor($r('app.color.white')) | 159 | .backgroundColor($r('app.color.white')) |
| 160 | .margin({ bottom: 8 }) | 160 | .margin({ bottom: 8 }) |
| @@ -244,6 +244,7 @@ export struct ZhSingleRow03 { | @@ -244,6 +244,7 @@ export struct ZhSingleRow03 { | ||
| 244 | .width(154) | 244 | .width(154) |
| 245 | .height(60) | 245 | .height(60) |
| 246 | .maxLines(3) | 246 | .maxLines(3) |
| 247 | + .fontSize(15) | ||
| 247 | .textOverflow({overflow: TextOverflow.Ellipsis}) | 248 | .textOverflow({overflow: TextOverflow.Ellipsis}) |
| 248 | } | 249 | } |
| 249 | .margin({bottom: 16}) | 250 | .margin({bottom: 16}) |
| @@ -254,8 +255,10 @@ export struct ZhSingleRow03 { | @@ -254,8 +255,10 @@ export struct ZhSingleRow03 { | ||
| 254 | Text(this.format(new Date(item.liveInfo.liveStartTime).getTime())) | 255 | Text(this.format(new Date(item.liveInfo.liveStartTime).getTime())) |
| 255 | .margin({right: 6}) | 256 | .margin({right: 6}) |
| 256 | .fontColor(0x000000) | 257 | .fontColor(0x000000) |
| 257 | - .fontSize(13) | 258 | + .fontSize(12) |
| 258 | .textAlign(TextAlign.Start) | 259 | .textAlign(TextAlign.Start) |
| 260 | + .fontFamily('PingFang SC-Semibold') | ||
| 261 | + .fontWeight(600) | ||
| 259 | Image($r('app.media.timeline_rect')) | 262 | Image($r('app.media.timeline_rect')) |
| 260 | .width(4) | 263 | .width(4) |
| 261 | .height(3) | 264 | .height(3) |
| @@ -263,10 +266,13 @@ export struct ZhSingleRow03 { | @@ -263,10 +266,13 @@ export struct ZhSingleRow03 { | ||
| 263 | Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5)) | 266 | Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5)) |
| 264 | .margin({right: 6}) | 267 | .margin({right: 6}) |
| 265 | .fontColor(0x000000) | 268 | .fontColor(0x000000) |
| 266 | - .fontSize(13) | 269 | + .fontSize(12) |
| 270 | + .fontFamily('PingFang SC-Semibold') | ||
| 271 | + .fontWeight(600) | ||
| 267 | Text('开始直播') | 272 | Text('开始直播') |
| 268 | .fontColor(0xC8C8C8) | 273 | .fontColor(0xC8C8C8) |
| 269 | - .fontSize(13) | 274 | + .fontSize(12) |
| 275 | + .fontFamily('PingFang SC-Semibold') | ||
| 270 | } | 276 | } |
| 271 | 277 | ||
| 272 | Row() { | 278 | Row() { |
| @@ -14,15 +14,16 @@ export struct LottieView { | @@ -14,15 +14,16 @@ export struct LottieView { | ||
| 14 | private politeChickyController: CanvasRenderingContext2D = | 14 | private politeChickyController: CanvasRenderingContext2D = |
| 15 | new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象 | 15 | new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象 |
| 16 | private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象 | 16 | private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象 |
| 17 | + @Prop title: string | ||
| 17 | 18 | ||
| 18 | // 页面隐藏销毁动画 | 19 | // 页面隐藏销毁动画 |
| 19 | - onPageHide(): void { | ||
| 20 | - this.animateItem?.destroy() | ||
| 21 | - | ||
| 22 | - if (this.onComplete) { | ||
| 23 | - this.animateItem?.removeEventListener('complete', this.onComplete) | ||
| 24 | - } | ||
| 25 | - } | 20 | + // onPageHide(): void { |
| 21 | + // this.animateItem?.destroy() | ||
| 22 | + // | ||
| 23 | + // if (this.onComplete) { | ||
| 24 | + // this.animateItem?.removeEventListener('complete', this.onComplete) | ||
| 25 | + // } | ||
| 26 | + // } | ||
| 26 | 27 | ||
| 27 | /** | 28 | /** |
| 28 | * 加载动画 | 29 | * 加载动画 |
| @@ -31,7 +32,7 @@ export struct LottieView { | @@ -31,7 +32,7 @@ export struct LottieView { | ||
| 31 | loadAnimation() { | 32 | loadAnimation() { |
| 32 | // 销毁动画,减少缓存 | 33 | // 销毁动画,减少缓存 |
| 33 | if (this.animateItem !== null) { | 34 | if (this.animateItem !== null) { |
| 34 | - this.animateItem.destroy(); | 35 | + this.animateItem.destroy(this.name); |
| 35 | this.animateItem = null; | 36 | this.animateItem = null; |
| 36 | } | 37 | } |
| 37 | 38 | ||
| @@ -54,6 +55,32 @@ export struct LottieView { | @@ -54,6 +55,32 @@ export struct LottieView { | ||
| 54 | 55 | ||
| 55 | } | 56 | } |
| 56 | 57 | ||
| 58 | + aboutToAppear(): void { | ||
| 59 | + // console.error('XXXXZZZZ', '-------aboutToAppear-------' + this.title) | ||
| 60 | + //lottie?.play() | ||
| 61 | + | ||
| 62 | + // if(this.init){ | ||
| 63 | + // if(this.animateItem = null){ | ||
| 64 | + // this.loadAnimation(); | ||
| 65 | + // } | ||
| 66 | + // } | ||
| 67 | + | ||
| 68 | + | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + aboutToDisappear(): void { | ||
| 72 | + // console.error('XXXXZZZZ', '-------aboutToDisappear-------' + this.title) | ||
| 73 | + // if(this.init){ | ||
| 74 | + // lottie?.destroy(this.name) | ||
| 75 | + // | ||
| 76 | + // if (this.onComplete) { | ||
| 77 | + // this.animateItem?.removeEventListener('complete', this.onComplete) | ||
| 78 | + // } | ||
| 79 | + // this.animateItem = null; | ||
| 80 | + // // } | ||
| 81 | + | ||
| 82 | + } | ||
| 83 | + | ||
| 57 | build() { | 84 | build() { |
| 58 | Stack({ alignContent: Alignment.TopStart }) { | 85 | Stack({ alignContent: Alignment.TopStart }) { |
| 59 | Canvas(this.politeChickyController) | 86 | Canvas(this.politeChickyController) |
| @@ -65,9 +92,13 @@ export struct LottieView { | @@ -65,9 +92,13 @@ export struct LottieView { | ||
| 65 | this.onReady(this.animateItem) | 92 | this.onReady(this.animateItem) |
| 66 | } | 93 | } |
| 67 | }) | 94 | }) |
| 68 | - .onClick(() => { | ||
| 69 | - this.animateItem?.play() | ||
| 70 | - }) | 95 | + .onDisAppear(() => { |
| 96 | + lottie.destroy(this.name) | ||
| 97 | + this.animateItem = null; | ||
| 98 | + }).onAppear(()=>{ | ||
| 99 | + this.loadAnimation(); | ||
| 100 | + }) | ||
| 101 | + | ||
| 71 | } | 102 | } |
| 72 | } | 103 | } |
| 73 | } | 104 | } |
| @@ -57,7 +57,6 @@ export struct OtherHomePageBottomCommentComponent { | @@ -57,7 +57,6 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 57 | this.curPageNum = 1; | 57 | this.curPageNum = 1; |
| 58 | this.hasMore = true | 58 | this.hasMore = true |
| 59 | this.isGetRequest = false | 59 | this.isGetRequest = false |
| 60 | - this.data_comment.clear() | ||
| 61 | 60 | ||
| 62 | if (!this.isLoading){ | 61 | if (!this.isLoading){ |
| 63 | this.getNewPageData() | 62 | this.getNewPageData() |
| @@ -134,6 +133,8 @@ export struct OtherHomePageBottomCommentComponent { | @@ -134,6 +133,8 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 134 | let object = new OtherUserCommentListRequestItem("", 20, this.curPageNum, time, "1", this.curUserId) | 133 | let object = new OtherUserCommentListRequestItem("", 20, this.curPageNum, time, "1", this.curUserId) |
| 135 | 134 | ||
| 136 | MinePageDatasModel.getOtherCommentListData(object, getContext(this)).then((value) => { | 135 | MinePageDatasModel.getOtherCommentListData(object, getContext(this)).then((value) => { |
| 136 | + if (this.curPageNum === 1) this.data_comment.clear() | ||
| 137 | + | ||
| 137 | if (!this.data_comment || value.list.length == 0) { | 138 | if (!this.data_comment || value.list.length == 0) { |
| 138 | this.hasMore = false | 139 | this.hasMore = false |
| 139 | this.isLoading = false | 140 | this.isLoading = false |
| @@ -31,7 +31,8 @@ let preferenceTheme: dataPreferences.Preferences | null = null | @@ -31,7 +31,8 @@ let preferenceTheme: dataPreferences.Preferences | null = null | ||
| 31 | @Component | 31 | @Component |
| 32 | struct LiveMorePage { | 32 | struct LiveMorePage { |
| 33 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | 33 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); |
| 34 | - topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | 34 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; |
| 35 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 35 | type: number = 1; | 36 | type: number = 1; |
| 36 | pageSize: number = 20; | 37 | pageSize: number = 20; |
| 37 | operDataList: ContentDTO[] = []; | 38 | operDataList: ContentDTO[] = []; |
| @@ -45,11 +46,9 @@ struct LiveMorePage { | @@ -45,11 +46,9 @@ struct LiveMorePage { | ||
| 45 | @State liveRoomList: LiveRoomDataBean[] = [] | 46 | @State liveRoomList: LiveRoomDataBean[] = [] |
| 46 | // 点击过的数据 | 47 | // 点击过的数据 |
| 47 | @State clickDatas: Array<string> = [] | 48 | @State clickDatas: Array<string> = [] |
| 48 | - | ||
| 49 | @State loadImg: boolean = false; | 49 | @State loadImg: boolean = false; |
| 50 | 50 | ||
| 51 | - | ||
| 52 | - async aboutToAppear() : Promise<void>{ | 51 | + async aboutToAppear(): Promise<void> { |
| 53 | await this.getPreferencesFromStorage() | 52 | await this.getPreferencesFromStorage() |
| 54 | this.loadImg = await onlyWifiLoadImg(); | 53 | this.loadImg = await onlyWifiLoadImg(); |
| 55 | this.getLivMoreClickPreference() | 54 | this.getLivMoreClickPreference() |
| @@ -59,16 +58,9 @@ struct LiveMorePage { | @@ -59,16 +58,9 @@ struct LiveMorePage { | ||
| 59 | } | 58 | } |
| 60 | 59 | ||
| 61 | build() { | 60 | build() { |
| 62 | - // Navigation() { | ||
| 63 | - // //滑动区域 | ||
| 64 | - // this.ListLayout() | ||
| 65 | - // } | ||
| 66 | - // .titleMode(NavigationTitleMode.Mini) | ||
| 67 | - // .title('直播列表') | ||
| 68 | 61 | ||
| 69 | Column() { | 62 | Column() { |
| 70 | this.TabbarNormal() | 63 | this.TabbarNormal() |
| 71 | - | ||
| 72 | if (this.viewType == ViewType.LOADING) { | 64 | if (this.viewType == ViewType.LOADING) { |
| 73 | this.LoadingLayout() | 65 | this.LoadingLayout() |
| 74 | } else if (this.viewType == ViewType.ERROR) { | 66 | } else if (this.viewType == ViewType.ERROR) { |
| @@ -95,14 +87,13 @@ struct LiveMorePage { | @@ -95,14 +87,13 @@ struct LiveMorePage { | ||
| 95 | }) | 87 | }) |
| 96 | } | 88 | } |
| 97 | } | 89 | } |
| 90 | + .height('100%') | ||
| 98 | .padding({ | 91 | .padding({ |
| 99 | left: $r('app.float.card_comp_pagePadding_lf'), | 92 | left: $r('app.float.card_comp_pagePadding_lf'), |
| 100 | right: $r('app.float.card_comp_pagePadding_lf'), | 93 | right: $r('app.float.card_comp_pagePadding_lf'), |
| 101 | - bottom: $r('app.float.card_comp_pagePadding_tb') | ||
| 102 | - }) | ||
| 103 | - .onClick(() => { | ||
| 104 | - ProcessUtils.processPage(this.contentDTO) | 94 | + top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight) |
| 105 | }) | 95 | }) |
| 96 | + | ||
| 106 | } | 97 | } |
| 107 | 98 | ||
| 108 | @Builder | 99 | @Builder |
| @@ -131,7 +122,7 @@ struct LiveMorePage { | @@ -131,7 +122,7 @@ struct LiveMorePage { | ||
| 131 | } | 122 | } |
| 132 | .scrollBar(BarState.Off) | 123 | .scrollBar(BarState.Off) |
| 133 | .edgeEffect(EdgeEffect.None) | 124 | .edgeEffect(EdgeEffect.None) |
| 134 | - .cachedCount(8) | 125 | + .cachedCount(3) |
| 135 | .height('calc(100% - 44vp)') | 126 | .height('calc(100% - 44vp)') |
| 136 | .onReachEnd(() => { | 127 | .onReachEnd(() => { |
| 137 | Logger.debug(TAG, "触底了"); | 128 | Logger.debug(TAG, "触底了"); |
| @@ -158,9 +149,10 @@ struct LiveMorePage { | @@ -158,9 +149,10 @@ struct LiveMorePage { | ||
| 158 | .margin({ top: 16, bottom: 8 }) | 149 | .margin({ top: 16, bottom: 8 }) |
| 159 | .alignSelf(ItemAlign.Start) | 150 | .alignSelf(ItemAlign.Start) |
| 160 | .fontColor(this.isClicked(item.objectId) ? $r('app.color.color_848484') : $r('app.color.color_222222')) | 151 | .fontColor(this.isClicked(item.objectId) ? $r('app.color.color_848484') : $r('app.color.color_222222')) |
| 152 | + | ||
| 161 | Stack() { | 153 | Stack() { |
| 162 | if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) { | 154 | if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) { |
| 163 | - Image(this.loadImg?item.fullColumnImgUrls[0].url:'') | 155 | + Image(this.loadImg ? item.fullColumnImgUrls[0].url : '') |
| 164 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) | 156 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) |
| 165 | .width('100%') | 157 | .width('100%') |
| 166 | .aspectRatio(16 / 9) | 158 | .aspectRatio(16 / 9) |
| @@ -257,24 +249,25 @@ struct LiveMorePage { | @@ -257,24 +249,25 @@ struct LiveMorePage { | ||
| 257 | lottieHeight: 14, | 249 | lottieHeight: 14, |
| 258 | autoplay: true, | 250 | autoplay: true, |
| 259 | loop: true, | 251 | loop: true, |
| 252 | + title: item.newsTitle | ||
| 260 | }) | 253 | }) |
| 261 | .margin({ | 254 | .margin({ |
| 262 | right: '2vp' | 255 | right: '2vp' |
| 263 | }) | 256 | }) |
| 257 | + | ||
| 264 | Text('直播中') | 258 | Text('直播中') |
| 265 | .fontSize('12vp') | 259 | .fontSize('12vp') |
| 266 | .fontWeight(400) | 260 | .fontWeight(400) |
| 267 | .fontColor(Color.White) | 261 | .fontColor(Color.White) |
| 268 | - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) | 262 | + .textShadow({ |
| 263 | + radius: 2, | ||
| 264 | + color: 'rgba(0,0,0,0.3)', | ||
| 265 | + offsetX: 0, | ||
| 266 | + offsetY: 2 | ||
| 267 | + }) | ||
| 269 | .margin({ | 268 | .margin({ |
| 270 | right: '5vp' | 269 | right: '5vp' |
| 271 | }) | 270 | }) |
| 272 | - // Divider() | ||
| 273 | - // .vertical(true) | ||
| 274 | - // .strokeWidth(1) | ||
| 275 | - // .height('12vp') | ||
| 276 | - // .margin({ top: 2, bottom: 2 }) | ||
| 277 | - // .color(Color.White) | ||
| 278 | 271 | ||
| 279 | Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp') | 272 | Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp') |
| 280 | 273 | ||
| @@ -282,7 +275,12 @@ struct LiveMorePage { | @@ -282,7 +275,12 @@ struct LiveMorePage { | ||
| 282 | Text(this.getLiveRoomNumber(item)) | 275 | Text(this.getLiveRoomNumber(item)) |
| 283 | .fontSize('12vp') | 276 | .fontSize('12vp') |
| 284 | .fontWeight(400) | 277 | .fontWeight(400) |
| 285 | - .textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 }) | 278 | + .textShadow({ |
| 279 | + radius: 2, | ||
| 280 | + color: 'rgba(0,0,0,0.3)', | ||
| 281 | + offsetX: 0, | ||
| 282 | + offsetY: 2 | ||
| 283 | + }) | ||
| 286 | .fontColor(Color.White) | 284 | .fontColor(Color.White) |
| 287 | .margin({ | 285 | .margin({ |
| 288 | left: '5vp' | 286 | left: '5vp' |
| @@ -419,7 +417,7 @@ struct LiveMorePage { | @@ -419,7 +417,7 @@ struct LiveMorePage { | ||
| 419 | const arr: Array<string> = [] | 417 | const arr: Array<string> = [] |
| 420 | arr.push(...this.clickDatas) | 418 | arr.push(...this.clickDatas) |
| 421 | preferenceTheme.put('liveMorePage', arr).then(() => { | 419 | preferenceTheme.put('liveMorePage', arr).then(() => { |
| 422 | - Logger.debug(TAG,"Succeeded in putting value of 'startup'."); | 420 | + Logger.debug(TAG, "Succeeded in putting value of 'startup'."); |
| 423 | }).catch((err: BusinessError) => { | 421 | }).catch((err: BusinessError) => { |
| 424 | Logger.debug(TAG, "Failed to put value of 'startup'. code =" + err.code + ", message =" + err.message); | 422 | Logger.debug(TAG, "Failed to put value of 'startup'. code =" + err.code + ", message =" + err.message); |
| 425 | }) | 423 | }) |
| @@ -31,7 +31,8 @@ const TAG: string = 'ReserveMorePage'; | @@ -31,7 +31,8 @@ const TAG: string = 'ReserveMorePage'; | ||
| 31 | struct ReserveMorePage { | 31 | struct ReserveMorePage { |
| 32 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | 32 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); |
| 33 | private reserveList: ReserveItemBean[] = [] | 33 | private reserveList: ReserveItemBean[] = [] |
| 34 | - topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | 34 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; |
| 35 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 35 | type: number = 2; | 36 | type: number = 2; |
| 36 | pageSize: number = 20; | 37 | pageSize: number = 20; |
| 37 | title: string = '直播预告' | 38 | title: string = '直播预告' |
| @@ -78,10 +79,13 @@ struct ReserveMorePage { | @@ -78,10 +79,13 @@ struct ReserveMorePage { | ||
| 78 | this.currentPage = 1 | 79 | this.currentPage = 1 |
| 79 | this.getData(resolve) | 80 | this.getData(resolve) |
| 80 | }, | 81 | }, |
| 81 | - }) | 82 | + }).backgroundColor($r('app.color.color_F5F5F5')) |
| 82 | } | 83 | } |
| 83 | 84 | ||
| 84 | - }.backgroundColor($r('app.color.color_F5F5F5')) | 85 | + }.height('100%').backgroundColor('#FFFFFF').padding({ |
| 86 | + top: px2vp(this.topSafeHeight), | ||
| 87 | + bottom: px2vp(this.bottomSafeHeight) | ||
| 88 | + }) | ||
| 85 | 89 | ||
| 86 | } | 90 | } |
| 87 | 91 | ||
| @@ -306,9 +310,9 @@ struct ReserveMorePage { | @@ -306,9 +310,9 @@ struct ReserveMorePage { | ||
| 306 | middle: { anchor: "__container__", align: HorizontalAlign.Center } | 310 | middle: { anchor: "__container__", align: HorizontalAlign.Center } |
| 307 | }) | 311 | }) |
| 308 | } | 312 | } |
| 309 | - .backgroundColor('#FFFFFF') | ||
| 310 | .height(44) | 313 | .height(44) |
| 311 | - .width('100%') | 314 | + .width('100%').backgroundColor('#FFFFFF') |
| 315 | + | ||
| 312 | } | 316 | } |
| 313 | 317 | ||
| 314 | @Builder | 318 | @Builder |
| @@ -413,7 +417,9 @@ struct ReserveMorePage { | @@ -413,7 +417,9 @@ struct ReserveMorePage { | ||
| 413 | this.reservedIds = [] | 417 | this.reservedIds = [] |
| 414 | } | 418 | } |
| 415 | 419 | ||
| 416 | - liveReviewDTO.list.forEach((content) => { content.pageId = this.pageId }) | 420 | + liveReviewDTO.list.forEach((content) => { |
| 421 | + content.pageId = this.pageId | ||
| 422 | + }) | ||
| 417 | this.data.push(...liveReviewDTO.list) | 423 | this.data.push(...liveReviewDTO.list) |
| 418 | //批量查询关注状态 | 424 | //批量查询关注状态 |
| 419 | this.getAppointmentInfo(liveReviewDTO.list) | 425 | this.getAppointmentInfo(liveReviewDTO.list) |
| @@ -518,7 +524,7 @@ struct ReserveMorePage { | @@ -518,7 +524,7 @@ struct ReserveMorePage { | ||
| 518 | try { | 524 | try { |
| 519 | 525 | ||
| 520 | // 埋点 | 526 | // 埋点 |
| 521 | - Tracking.event(!reserveItem.subscribe ? "live_subscribe_click":"cancel_live_subscribe_click", | 527 | + Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click", |
| 522 | TrackParamConvert.program(item)) | 528 | TrackParamConvert.program(item)) |
| 523 | 529 | ||
| 524 | const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), | 530 | const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(), |
| @@ -555,6 +561,7 @@ struct ReserveMorePage { | @@ -555,6 +561,7 @@ struct ReserveMorePage { | ||
| 555 | } | 561 | } |
| 556 | } | 562 | } |
| 557 | } | 563 | } |
| 564 | + | ||
| 558 | getReserveDate(eventDateTimeString: string, type: number): string { | 565 | getReserveDate(eventDateTimeString: string, type: number): string { |
| 559 | // 解析事件的日期和时间 | 566 | // 解析事件的日期和时间 |
| 560 | const eventDateTime = new Date(eventDateTimeString); | 567 | const eventDateTime = new Date(eventDateTimeString); |
| @@ -570,15 +577,16 @@ struct ReserveMorePage { | @@ -570,15 +577,16 @@ struct ReserveMorePage { | ||
| 570 | const currentDate = currentDateTime.setHours(0, 0, 0, 0); | 577 | const currentDate = currentDateTime.setHours(0, 0, 0, 0); |
| 571 | if (eventDate === currentDate) { | 578 | if (eventDate === currentDate) { |
| 572 | return `今天`; | 579 | return `今天`; |
| 573 | - }else{ | 580 | + } else { |
| 574 | const month = eventDateTime.getMonth() + 1; | 581 | const month = eventDateTime.getMonth() + 1; |
| 575 | const date = eventDateTime.getDate(); | 582 | const date = eventDateTime.getDate(); |
| 576 | return `${month}月${date}日`; | 583 | return `${month}月${date}日`; |
| 577 | } | 584 | } |
| 578 | - }else { | 585 | + } else { |
| 579 | return `${eventTimeStr}`; | 586 | return `${eventTimeStr}`; |
| 580 | } | 587 | } |
| 581 | } | 588 | } |
| 589 | + | ||
| 582 | // getReserveDate(eventDateTimeString: string, type: number): string { | 590 | // getReserveDate(eventDateTimeString: string, type: number): string { |
| 583 | // // 解析事件的日期和时间 | 591 | // // 解析事件的日期和时间 |
| 584 | // const eventDateTime = new Date(eventDateTimeString); | 592 | // const eventDateTime = new Date(eventDateTimeString); |
| @@ -142,11 +142,11 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | @@ -142,11 +142,11 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent { | ||
| 142 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | 142 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 |
| 143 | .textAlign(TextAlign.Start) | 143 | .textAlign(TextAlign.Start) |
| 144 | .margin({ top: 8 }) | 144 | .margin({ top: 8 }) |
| 145 | - .width(150) | 145 | + .width(this.compDTO.operDataList.length == 2 ? 210 : 150) |
| 146 | .lineHeight(19) | 146 | .lineHeight(19) |
| 147 | - .height(42) | ||
| 148 | .lineHeight(21) | 147 | .lineHeight(21) |
| 149 | } | 148 | } |
| 149 | + .height(134) | ||
| 150 | .padding({ right: 16 }) | 150 | .padding({ right: 16 }) |
| 151 | // .offset({x:16}) | 151 | // .offset({x:16}) |
| 152 | .onClick(() => { | 152 | .onClick(() => { |
| @@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent { | @@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent { | ||
| 146 | Column() { | 146 | Column() { |
| 147 | Stack({ alignContent: Alignment.BottomEnd }) { | 147 | Stack({ alignContent: Alignment.BottomEnd }) { |
| 148 | Image(this.loadImg ? item.coverUrl : '') | 148 | Image(this.loadImg ? item.coverUrl : '') |
| 149 | - .backgroundColor(0xf5f5f5) | 149 | + .backgroundColor(this.loadImg ? 0xffffff : 0xf5f5f5) |
| 150 | .aspectRatio(16 / 9) | 150 | .aspectRatio(16 / 9) |
| 151 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) | 151 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) |
| 152 | - .borderRadius(4) | ||
| 153 | - .objectFit(ImageFit.Cover) | 152 | + // .borderRadius(4) |
| 153 | + .objectFit(ImageFit.Contain) | ||
| 154 | CardMediaInfo({ | 154 | CardMediaInfo({ |
| 155 | livePeopleNum:false, | 155 | livePeopleNum:false, |
| 156 | contentDTO: item | 156 | contentDTO: item |
| 157 | }) | 157 | }) |
| 158 | } | 158 | } |
| 159 | + .borderRadius(4) | ||
| 160 | + .border({width: 1, color: 0xf5f5f5}) | ||
| 159 | 161 | ||
| 160 | Text(item.newsTitle) | 162 | Text(item.newsTitle) |
| 161 | .fontSize($r("app.float.font_size_14")) | 163 | .fontSize($r("app.float.font_size_14")) |
| @@ -166,9 +168,9 @@ export struct LiveHorizontalCardComponent { | @@ -166,9 +168,9 @@ export struct LiveHorizontalCardComponent { | ||
| 166 | .textAlign(TextAlign.Start) | 168 | .textAlign(TextAlign.Start) |
| 167 | .margin({ top: 8 }) | 169 | .margin({ top: 8 }) |
| 168 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) | 170 | .width(this.compDTO.operDataList.length == 2 ? 210 : 150) |
| 169 | - .height(42) | ||
| 170 | .lineHeight(21) | 171 | .lineHeight(21) |
| 171 | } | 172 | } |
| 173 | + .height(134) | ||
| 172 | .padding({ right: 16 }) | 174 | .padding({ right: 16 }) |
| 173 | .onClick(() => { | 175 | .onClick(() => { |
| 174 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 176 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| @@ -156,6 +156,7 @@ export struct OperRowListView { | @@ -156,6 +156,7 @@ export struct OperRowListView { | ||
| 156 | this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + '' | 156 | this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + '' |
| 157 | } | 157 | } |
| 158 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) | 158 | console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) |
| 159 | + console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen)) | ||
| 159 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) | 160 | console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) |
| 160 | console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) | 161 | console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList)) |
| 161 | 162 | ||
| @@ -384,22 +385,24 @@ export struct OperRowListView { | @@ -384,22 +385,24 @@ export struct OperRowListView { | ||
| 384 | */ | 385 | */ |
| 385 | @Builder | 386 | @Builder |
| 386 | builderShare() { | 387 | builderShare() { |
| 387 | - Column() { | ||
| 388 | - Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') : | ||
| 389 | - $r('app.media.iv_live_comment_share_white')) | ||
| 390 | - .width(24) | ||
| 391 | - .height(24) | ||
| 392 | - .aspectRatio(1) | ||
| 393 | - .interpolation(ImageInterpolation.High) | ||
| 394 | - .onClick((event: ClickEvent) => { | ||
| 395 | - this.share() | ||
| 396 | - }) | 388 | + if(this.contentDetailData?.shareInfo?.shareOpen == 1) { |
| 389 | + Column() { | ||
| 390 | + Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') : | ||
| 391 | + $r('app.media.iv_live_comment_share_white')) | ||
| 392 | + .width(24) | ||
| 393 | + .height(24) | ||
| 394 | + .aspectRatio(1) | ||
| 395 | + .interpolation(ImageInterpolation.High) | ||
| 396 | + .onClick((event: ClickEvent) => { | ||
| 397 | + this.share() | ||
| 398 | + }) | ||
| 399 | + } | ||
| 400 | + .justifyContent(FlexAlign.Center) | ||
| 401 | + .height(36) | ||
| 402 | + .width(48) | ||
| 403 | + .borderRadius(18) | ||
| 404 | + .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent) | ||
| 397 | } | 405 | } |
| 398 | - .justifyContent(FlexAlign.Center) | ||
| 399 | - .height(36) | ||
| 400 | - .width(48) | ||
| 401 | - .borderRadius(18) | ||
| 402 | - .backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent) | ||
| 403 | } | 406 | } |
| 404 | 407 | ||
| 405 | handleStyle() { | 408 | handleStyle() { |
| @@ -16,10 +16,10 @@ const TAG = "OtherNormalUserHomePage" | @@ -16,10 +16,10 @@ const TAG = "OtherNormalUserHomePage" | ||
| 16 | struct OtherNormalUserHomePage { | 16 | struct OtherNormalUserHomePage { |
| 17 | @State params:Record<string, string> = router.getParams() as Record<string, string>; | 17 | @State params:Record<string, string> = router.getParams() as Record<string, string>; |
| 18 | @Watch('change') @State curUserId: string = '-1'; | 18 | @Watch('change') @State curUserId: string = '-1'; |
| 19 | - @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 20 | pageShowTime:number = 0; | 19 | pageShowTime:number = 0; |
| 21 | pageHideTime:number = 0; | 20 | pageHideTime:number = 0; |
| 22 | - | 21 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 22 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 23 | 23 | ||
| 24 | onPageShow() { | 24 | onPageShow() { |
| 25 | this.curUserId = this.params?.['userId']; | 25 | this.curUserId = this.params?.['userId']; |
| @@ -68,7 +68,7 @@ struct OtherNormalUserHomePage { | @@ -68,7 +68,7 @@ struct OtherNormalUserHomePage { | ||
| 68 | Stack({ alignContent: Alignment.Top }){ | 68 | Stack({ alignContent: Alignment.Top }){ |
| 69 | Image($r('app.media.title_bg')) | 69 | Image($r('app.media.title_bg')) |
| 70 | .width('100%') | 70 | .width('100%') |
| 71 | - .height('355lpx') | 71 | + .height(`calc(${295 + this.topSafeHeight + 'lpx'})`) |
| 72 | .objectFit(ImageFit.Cover) | 72 | .objectFit(ImageFit.Cover) |
| 73 | 73 | ||
| 74 | Row() | 74 | Row() |
| @@ -83,7 +83,7 @@ struct OtherNormalUserHomePage { | @@ -83,7 +83,7 @@ struct OtherNormalUserHomePage { | ||
| 83 | Stack({ alignContent: Alignment.Top }){ | 83 | Stack({ alignContent: Alignment.Top }){ |
| 84 | this.MineHomeTitleTransparent() | 84 | this.MineHomeTitleTransparent() |
| 85 | this.MineHomeTitleWhite() | 85 | this.MineHomeTitleWhite() |
| 86 | - } | 86 | + }.margin({top:px2vp(this.topSafeHeight)}) |
| 87 | 87 | ||
| 88 | Scroll() { | 88 | Scroll() { |
| 89 | Column() { | 89 | Column() { |
| @@ -175,7 +175,7 @@ struct OtherNormalUserHomePage { | @@ -175,7 +175,7 @@ struct OtherNormalUserHomePage { | ||
| 175 | this.tileOpacity = persent | 175 | this.tileOpacity = persent |
| 176 | } | 176 | } |
| 177 | }) | 177 | }) |
| 178 | - .backgroundColor($r('app.color.color_transparent')) | 178 | + // .backgroundColor($r('app.color.color_transparent')) |
| 179 | .height('184lpx') | 179 | .height('184lpx') |
| 180 | .width('100%') | 180 | .width('100%') |
| 181 | .padding({ left: '6lpx' }) | 181 | .padding({ left: '6lpx' }) |
| @@ -184,7 +184,7 @@ struct OtherNormalUserHomePage { | @@ -184,7 +184,7 @@ struct OtherNormalUserHomePage { | ||
| 184 | if(StringUtils.isNotEmpty(this.desc)){ | 184 | if(StringUtils.isNotEmpty(this.desc)){ |
| 185 | Column() { | 185 | Column() { |
| 186 | Row() { | 186 | Row() { |
| 187 | - Text(this.desc) | 187 | + Text('简介:'+this.desc) |
| 188 | .fontSize('27lpx') | 188 | .fontSize('27lpx') |
| 189 | .maxLines(3) | 189 | .maxLines(3) |
| 190 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 190 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| @@ -26,6 +26,8 @@ struct SearchCreatorPage { | @@ -26,6 +26,8 @@ struct SearchCreatorPage { | ||
| 26 | @State isLoading: boolean = false | 26 | @State isLoading: boolean = false |
| 27 | @State hasMore: boolean = true | 27 | @State hasMore: boolean = true |
| 28 | curPageNum: number = 1; | 28 | curPageNum: number = 1; |
| 29 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 30 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 29 | 31 | ||
| 30 | onPageShow() { | 32 | onPageShow() { |
| 31 | this.keyword = this.params?.pageID; | 33 | this.keyword = this.params?.pageID; |
| @@ -154,51 +156,57 @@ struct SearchCreatorPage { | @@ -154,51 +156,57 @@ struct SearchCreatorPage { | ||
| 154 | } | 156 | } |
| 155 | 157 | ||
| 156 | build() { | 158 | build() { |
| 157 | - Column() { | ||
| 158 | - CustomTitleUI({ titleName: "全部结果" }) | ||
| 159 | - Divider() | ||
| 160 | - .width('100%') | ||
| 161 | - .height('1lpx') | ||
| 162 | - .color($r('app.color.color_F5F5F5')) | ||
| 163 | - .strokeWidth('1lpx') | ||
| 164 | - | ||
| 165 | - Column(){ | ||
| 166 | - if(this.count === 0){ | ||
| 167 | - ListHasNoMoreDataUI({style:2}) | ||
| 168 | - .height('100%') | ||
| 169 | - }else{ | ||
| 170 | - List({ space: 3 }) { | ||
| 171 | - LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => { | ||
| 172 | - ListItem() { | ||
| 173 | - FollowChildComponent({data: item,type:1}) | ||
| 174 | - } | ||
| 175 | - .onClick(() => { | ||
| 176 | - }) | ||
| 177 | - }, (item: FollowListDetailItem, index: number) => index.toString()) | 159 | + Column(){ |
| 160 | + Column() { | ||
| 161 | + CustomTitleUI({ titleName: "全部结果" }) | ||
| 162 | + Divider() | ||
| 163 | + .width('100%') | ||
| 164 | + .height('1lpx') | ||
| 165 | + .color($r('app.color.color_F5F5F5')) | ||
| 166 | + .strokeWidth('1lpx') | ||
| 167 | + | ||
| 168 | + Column(){ | ||
| 169 | + if(this.count === 0){ | ||
| 170 | + ListHasNoMoreDataUI({style:2}) | ||
| 171 | + .height('100%') | ||
| 172 | + }else{ | ||
| 173 | + List({ space: 3 }) { | ||
| 174 | + LazyForEach(this.data, (item: FollowListDetailItem, index: number = 0) => { | ||
| 175 | + ListItem() { | ||
| 176 | + FollowChildComponent({data: item,type:1}) | ||
| 177 | + } | ||
| 178 | + .onClick(() => { | ||
| 179 | + }) | ||
| 180 | + }, (item: FollowListDetailItem, index: number) => index.toString()) | ||
| 178 | 181 | ||
| 179 | - //没有更多数据 显示提示 | ||
| 180 | - if(!this.hasMore){ | ||
| 181 | - ListItem(){ | ||
| 182 | - ListHasNoMoreDataUI() | 182 | + //没有更多数据 显示提示 |
| 183 | + if(!this.hasMore){ | ||
| 184 | + ListItem(){ | ||
| 185 | + ListHasNoMoreDataUI() | ||
| 186 | + } | ||
| 183 | } | 187 | } |
| 184 | - } | ||
| 185 | - }.cachedCount(5) | ||
| 186 | - .padding({left:'31lpx',right:'31lpx'}) | ||
| 187 | - .layoutWeight(1) | ||
| 188 | - .scrollBar(BarState.Off) | ||
| 189 | - .onReachEnd(()=>{ | ||
| 190 | - console.log(TAG,"触底了"); | ||
| 191 | - if(!this.isLoading){ | ||
| 192 | - this.isLoading = true | ||
| 193 | - //加载分页数据 | ||
| 194 | - this.getNewPageData() | ||
| 195 | - } | ||
| 196 | - }) | ||
| 197 | - } | ||
| 198 | - }.layoutWeight(1) | 188 | + }.cachedCount(5) |
| 189 | + .padding({left:'31lpx',right:'31lpx'}) | ||
| 190 | + .layoutWeight(1) | ||
| 191 | + .scrollBar(BarState.Off) | ||
| 192 | + .onReachEnd(()=>{ | ||
| 193 | + console.log(TAG,"触底了"); | ||
| 194 | + if(!this.isLoading){ | ||
| 195 | + this.isLoading = true | ||
| 196 | + //加载分页数据 | ||
| 197 | + this.getNewPageData() | ||
| 198 | + } | ||
| 199 | + }) | ||
| 200 | + } | ||
| 201 | + }.layoutWeight(1) | ||
| 202 | + .width('100%') | ||
| 203 | + } | ||
| 199 | .width('100%') | 204 | .width('100%') |
| 200 | - } | ||
| 201 | - .width('100%') | ||
| 202 | - .height('100%') | 205 | + .height('100%') |
| 206 | + }.width("100%") | ||
| 207 | + .height("100%") | ||
| 208 | + .backgroundColor($r('app.color.color_transparent')) | ||
| 209 | + .padding({top:px2vp(this.topSafeHeight)}) | ||
| 210 | + | ||
| 203 | } | 211 | } |
| 204 | } | 212 | } |
| @@ -2,12 +2,12 @@ import { CommentListItem } from './CommentListItem' | @@ -2,12 +2,12 @@ import { CommentListItem } from './CommentListItem' | ||
| 2 | 2 | ||
| 3 | export class MineCommentListDetailItem{ | 3 | export class MineCommentListDetailItem{ |
| 4 | list:CommentListItem[] = [] | 4 | list:CommentListItem[] = [] |
| 5 | - | 5 | + hasNext: number = 1 |
| 6 | pageNum: number = 0 | 6 | pageNum: number = 0 |
| 7 | pageSize: number = 20 | 7 | pageSize: number = 20 |
| 8 | totalCount: number = 0 | 8 | totalCount: number = 0 |
| 9 | 9 | ||
| 10 | - constructor(list?:CommentListItem[],pageNum?: number,pageSize?: number,totalCount?: number) { | 10 | + constructor(list?:CommentListItem[],hasNext?: number,pageNum?: number,pageSize?: number,totalCount?: number) { |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | } | 13 | } |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -208,12 +208,16 @@ export struct PlayerRightView { | @@ -208,12 +208,16 @@ export struct PlayerRightView { | ||
| 208 | build() { | 208 | build() { |
| 209 | Column() { | 209 | Column() { |
| 210 | this.userBuilderView() | 210 | this.userBuilderView() |
| 211 | - this.likeBuilderView() | 211 | + if (this.contentDetailData?.openLikes == 1) { |
| 212 | + this.likeBuilderView() | ||
| 213 | + } | ||
| 212 | this.collectBuilderView() | 214 | this.collectBuilderView() |
| 213 | - if (this.contentDetailData.openComment == 1) { | 215 | + if (this.contentDetailData?.openComment == 1) { |
| 214 | this.commentBuilderView() | 216 | this.commentBuilderView() |
| 215 | } | 217 | } |
| 216 | - this.shareBuilderView() | 218 | + if(this.contentDetailData?.shareInfo?.shareOpen == 1) { |
| 219 | + this.shareBuilderView() | ||
| 220 | + } | ||
| 217 | } | 221 | } |
| 218 | // .backgroundColor(Color.Blue) | 222 | // .backgroundColor(Color.Blue) |
| 219 | // .height('100%') | 223 | // .height('100%') |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true | 12 | "deliveryWithInstall": true |
| @@ -59,9 +59,12 @@ struct LoginProtocolWebview { | @@ -59,9 +59,12 @@ struct LoginProtocolWebview { | ||
| 59 | .width(24) | 59 | .width(24) |
| 60 | .aspectRatio(1) | 60 | .aspectRatio(1) |
| 61 | .onClick(() => { | 61 | .onClick(() => { |
| 62 | - if(this.webviewController.accessBackward()){ | ||
| 63 | - this.webviewController.backward() | ||
| 64 | - return | 62 | + if (this.isConnectNetwork){ |
| 63 | + ///无网络状态下 执行webviewController.accessBackward方法 会crash | ||
| 64 | + if(this.webviewController.accessBackward()){ | ||
| 65 | + this.webviewController.backward() | ||
| 66 | + return | ||
| 67 | + } | ||
| 65 | } | 68 | } |
| 66 | router.back(); | 69 | router.back(); |
| 67 | }).margin({ left: 16 }) | 70 | }).margin({ left: 16 }) |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | "description": "$string:shared_desc", | 5 | "description": "$string:shared_desc", |
| 6 | "deviceTypes": [ | 6 | "deviceTypes": [ |
| 7 | "phone", | 7 | "phone", |
| 8 | - "tablet", | ||
| 9 | - "2in1" | 8 | +// "tablet", |
| 9 | +// "2in1" | ||
| 10 | ], | 10 | ], |
| 11 | "compressNativeLibs": true, | 11 | "compressNativeLibs": true, |
| 12 | "deliveryWithInstall": true, | 12 | "deliveryWithInstall": true, |
| 1 | import {InterestsHobbiesModel, InterestsList} from '../viewModel/InterestsHobbiesModel' | 1 | import {InterestsHobbiesModel, InterestsList} from '../viewModel/InterestsHobbiesModel' |
| 2 | import { WDRouterRule } from 'wdRouter'; | 2 | import { WDRouterRule } from 'wdRouter'; |
| 3 | import { WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterPage } from 'wdRouter'; |
| 4 | -import { SPHelper } from 'wdKit/Index'; | ||
| 5 | -import { SpConstants } from 'wdConstant/Index'; | 4 | +import { NetworkUtil, SPHelper } from 'wdKit/Index'; |
| 5 | +import { SpConstants, ViewType } from 'wdConstant/Index'; | ||
| 6 | import { CustomToast} from 'wdKit' | 6 | import { CustomToast} from 'wdKit' |
| 7 | import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; | 7 | import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; |
| 8 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; | 8 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; |
| 9 | import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife'; | 9 | import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife'; |
| 10 | +import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; | ||
| 10 | 11 | ||
| 11 | @Entry | 12 | @Entry |
| 12 | @Component | 13 | @Component |
| @@ -16,7 +17,7 @@ struct LaunchInterestsHobbiesPage { | @@ -16,7 +17,7 @@ struct LaunchInterestsHobbiesPage { | ||
| 16 | @State interestsArray: InterestsList[] = [] | 17 | @State interestsArray: InterestsList[] = [] |
| 17 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 18 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 18 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 19 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 19 | - | 20 | + @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() |
| 20 | dialogToast: CustomDialogController = new CustomDialogController({ | 21 | dialogToast: CustomDialogController = new CustomDialogController({ |
| 21 | builder: CustomToast({ | 22 | builder: CustomToast({ |
| 22 | msg: '请先选择您感兴趣的内容哦', | 23 | msg: '请先选择您感兴趣的内容哦', |
| @@ -72,71 +73,81 @@ struct LaunchInterestsHobbiesPage { | @@ -72,71 +73,81 @@ struct LaunchInterestsHobbiesPage { | ||
| 72 | .height('35lpx') | 73 | .height('35lpx') |
| 73 | .margin({top:'12lpx'}) | 74 | .margin({top:'12lpx'}) |
| 74 | 75 | ||
| 75 | - Grid( ){ | ||
| 76 | - ForEach(this.interestsArray,(item:InterestsList,index:number)=>{ | ||
| 77 | - GridItem(){ | ||
| 78 | - Stack({alignContent:Alignment.TopStart}){ | ||
| 79 | - ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic?item.pic:'',mainScaleType:ScaleType.FIT_XY}}) | ||
| 80 | - .width('100%') | ||
| 81 | - .height('100%') | ||
| 82 | - .backgroundColor(Color.White) | ||
| 83 | - .borderRadius(5) | ||
| 84 | - // Image(item.pic) | ||
| 85 | - // .width('100%') | ||
| 86 | - // .height('100%') | ||
| 87 | - // .backgroundColor(Color.White) | ||
| 88 | - // .borderRadius(5) | ||
| 89 | - Stack(){ | ||
| 90 | - Image('') | 76 | + if(!this.isConnectNetwork){ |
| 77 | + EmptyComponent({ emptyType: 1,emptyHeight:"60%" ,retry: () => { | ||
| 78 | + this.isConnectNetwork = NetworkUtil.isNetConnected() | ||
| 79 | + }}) | ||
| 80 | + .layoutWeight(1) | ||
| 81 | + .width('100%') | ||
| 82 | + }else{ | ||
| 83 | + Grid( ){ | ||
| 84 | + ForEach(this.interestsArray,(item:InterestsList,index:number)=>{ | ||
| 85 | + GridItem(){ | ||
| 86 | + Stack({alignContent:Alignment.TopStart}){ | ||
| 87 | + ImageKnifeComponent({imageKnifeOption:{loadSrc:item.pic?item.pic:'',mainScaleType:ScaleType.FIT_XY}}) | ||
| 91 | .width('100%') | 88 | .width('100%') |
| 92 | .height('100%') | 89 | .height('100%') |
| 93 | - .backgroundColor(Color.Black) | ||
| 94 | - .opacity(item.choose?0.5:0) | 90 | + .backgroundColor(Color.White) |
| 95 | .borderRadius(5) | 91 | .borderRadius(5) |
| 96 | - } | ||
| 97 | - Stack(){ | ||
| 98 | - Column({}){ | ||
| 99 | - Text(item.name) | ||
| 100 | - .fontSize(18) | ||
| 101 | - .fontColor('#FFFFFF') | ||
| 102 | - .margin({top:'21lpx',left:'19lpx'}) | ||
| 103 | - .width('100%') | ||
| 104 | - .height('46lpx') | ||
| 105 | - .fontWeight(FontWeight.Bold) | ||
| 106 | - Text(item.title) | ||
| 107 | - .fontSize('23lpx') | ||
| 108 | - .fontColor('#FFFFFF') | ||
| 109 | - .margin({top:'2lpx',left:'19lpx'}) | 92 | + // Image(item.pic) |
| 93 | + // .width('100%') | ||
| 94 | + // .height('100%') | ||
| 95 | + // .backgroundColor(Color.White) | ||
| 96 | + // .borderRadius(5) | ||
| 97 | + Stack(){ | ||
| 98 | + Image('') | ||
| 110 | .width('100%') | 99 | .width('100%') |
| 111 | - .height('31lpx') | ||
| 112 | - Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot')) | ||
| 113 | - .height('32lpx') | ||
| 114 | - .width('32lpx') | ||
| 115 | - .margin({top:'80lpx',left:'120lpx'}) | 100 | + .height('100%') |
| 101 | + .backgroundColor(Color.Black) | ||
| 102 | + .opacity(item.choose?0.5:0) | ||
| 103 | + .borderRadius(5) | ||
| 104 | + } | ||
| 105 | + Stack(){ | ||
| 106 | + Column({}){ | ||
| 107 | + Text(item.name) | ||
| 108 | + .fontSize(18) | ||
| 109 | + .fontColor('#FFFFFF') | ||
| 110 | + .margin({top:'21lpx',left:'19lpx'}) | ||
| 111 | + .width('100%') | ||
| 112 | + .height('46lpx') | ||
| 113 | + .fontWeight(FontWeight.Bold) | ||
| 114 | + Text(item.title) | ||
| 115 | + .fontSize('23lpx') | ||
| 116 | + .fontColor('#FFFFFF') | ||
| 117 | + .margin({top:'2lpx',left:'19lpx'}) | ||
| 118 | + .width('100%') | ||
| 119 | + .height('31lpx') | ||
| 120 | + Image(item.choose ? $r('app.media.interestsSelected') : $r('app.media.interestsSelectNot')) | ||
| 121 | + .height('32lpx') | ||
| 122 | + .width('32lpx') | ||
| 123 | + .margin({top:'80lpx',left:'120lpx'}) | ||
| 124 | + | ||
| 125 | + }.justifyContent(FlexAlign.Start) | ||
| 126 | + } | ||
| 116 | 127 | ||
| 117 | - }.justifyContent(FlexAlign.Start) | ||
| 118 | } | 128 | } |
| 119 | - | ||
| 120 | } | 129 | } |
| 121 | - } | ||
| 122 | - .width('192lpx') | ||
| 123 | - .height('230lpx') | ||
| 124 | - .borderRadius('8lpx') | ||
| 125 | - .onClick(()=>{ | ||
| 126 | - //选择后改变已选择属性 | ||
| 127 | - item.choose = !item.choose | ||
| 128 | - this.interestsArray.splice(index,1,item) | ||
| 129 | - this.selectCount = this.interestsArray.filter(item => item.choose).length | ||
| 130 | - }) | 130 | + .width('192lpx') |
| 131 | + .height('230lpx') | ||
| 132 | + .borderRadius('8lpx') | ||
| 133 | + .onClick(()=>{ | ||
| 134 | + //选择后改变已选择属性 | ||
| 135 | + item.choose = !item.choose | ||
| 136 | + this.interestsArray.splice(index,1,item) | ||
| 137 | + this.selectCount = this.interestsArray.filter(item => item.choose).length | ||
| 138 | + }) | ||
| 131 | 139 | ||
| 132 | - }) | 140 | + }) |
| 141 | + } | ||
| 142 | + .width('90%') | ||
| 143 | + .margin({top:'61lpx',bottom:'300lpx'}) | ||
| 144 | + .columnsTemplate('1fr 1fr 1fr') | ||
| 145 | + .columnsGap('23lpx') | ||
| 146 | + .rowsGap('23lpx') | ||
| 147 | + .scrollBar(BarState.Off) | ||
| 133 | } | 148 | } |
| 134 | - .width('90%') | ||
| 135 | - .margin({top:'61lpx',bottom:'300lpx'}) | ||
| 136 | - .columnsTemplate('1fr 1fr 1fr') | ||
| 137 | - .columnsGap('23lpx') | ||
| 138 | - .rowsGap('23lpx') | ||
| 139 | - .scrollBar(BarState.Off) | 149 | + |
| 150 | + | ||
| 140 | } | 151 | } |
| 141 | .width('100%') | 152 | .width('100%') |
| 142 | .height('100%') | 153 | .height('100%') |
| @@ -110,7 +110,7 @@ export default struct CustomDialogComponent { | @@ -110,7 +110,7 @@ export default struct CustomDialogComponent { | ||
| 110 | .margin({top: 1}) | 110 | .margin({top: 1}) |
| 111 | } | 111 | } |
| 112 | .width('528lpx') | 112 | .width('528lpx') |
| 113 | - .borderRadius('15') | 113 | + .borderRadius('10') |
| 114 | .backgroundColor(Color.White) | 114 | .backgroundColor(Color.White) |
| 115 | .clip(true) | 115 | .clip(true) |
| 116 | 116 |
| @@ -321,8 +321,8 @@ export struct MultiPictureDetailPageComponent { | @@ -321,8 +321,8 @@ export struct MultiPictureDetailPageComponent { | ||
| 321 | middle: { anchor: "__container__", align: HorizontalAlign.Center } | 321 | middle: { anchor: "__container__", align: HorizontalAlign.Center } |
| 322 | }) | 322 | }) |
| 323 | .zIndex(1) | 323 | .zIndex(1) |
| 324 | - .onChange((index: number) => { | ||
| 325 | - this.swiperIndex = index | 324 | + .onAnimationStart((index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => { |
| 325 | + this.swiperIndex = targetIndex | ||
| 326 | }) | 326 | }) |
| 327 | .onClick(() => { | 327 | .onClick(() => { |
| 328 | this.showDownload = !this.showDownload | 328 | this.showDownload = !this.showDownload |
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | "mainElement": "EntryAbility", | 6 | "mainElement": "EntryAbility", |
| 7 | "deviceTypes": [ | 7 | "deviceTypes": [ |
| 8 | "phone", | 8 | "phone", |
| 9 | - "tablet", | ||
| 10 | - "2in1" | 9 | +// "tablet", |
| 10 | +// "2in1" | ||
| 11 | ], | 11 | ], |
| 12 | "compressNativeLibs": true, | 12 | "compressNativeLibs": true, |
| 13 | "deliveryWithInstall": true, | 13 | "deliveryWithInstall": true, |
-
Please register or login to post a comment