Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
10 changed files
with
291 additions
and
261 deletions
| @@ -95,6 +95,7 @@ export class ContentDTO implements BaseDTO { | @@ -95,6 +95,7 @@ export class ContentDTO implements BaseDTO { | ||
| 95 | extra: string = '' | 95 | extra: string = '' |
| 96 | sameContentList:ContentDTO[] = [] | 96 | sameContentList:ContentDTO[] = [] |
| 97 | sameContentListJson:string = "" | 97 | sameContentListJson:string = "" |
| 98 | + sameContentListSize:number = 0 | ||
| 98 | /* | 99 | /* |
| 99 | 本地辅助字段 | 100 | 本地辅助字段 |
| 100 | */ | 101 | */ |
| @@ -200,13 +200,13 @@ struct createImg { | @@ -200,13 +200,13 @@ struct createImg { | ||
| 200 | } | 200 | } |
| 201 | } else { | 201 | } else { |
| 202 | GridCol({ | 202 | GridCol({ |
| 203 | - span: { xs: 8 } | 203 | + span: item.landscape === 1 ? 12 : 8 |
| 204 | }) { | 204 | }) { |
| 205 | Image(this.loadImg ? item.fullUrl : '') | 205 | Image(this.loadImg ? item.fullUrl : '') |
| 206 | .backgroundColor(0xf5f5f5) | 206 | .backgroundColor(0xf5f5f5) |
| 207 | .width('100%') | 207 | .width('100%') |
| 208 | - .borderRadius(this.caclImageRadius(index)) | ||
| 209 | .autoResize(true) | 208 | .autoResize(true) |
| 209 | + .borderRadius(this.caclImageRadius(index)) | ||
| 210 | .opacity(!this.picWidth && !this.picHeight ? 0 : 1) | 210 | .opacity(!this.picWidth && !this.picHeight ? 0 : 1) |
| 211 | .onComplete(callback => { | 211 | .onComplete(callback => { |
| 212 | this.picWidth = callback?.width || 0; | 212 | this.picWidth = callback?.width || 0; |
| 1 | /** | 1 | /** |
| 2 | * More_Comp | 2 | * More_Comp |
| 3 | */ | 3 | */ |
| 4 | -import { ContentDTO } from 'wdBean/Index'; | 4 | +import { ContentDTO , contentListParams, FullColumnImgUrlDTO, |
| 5 | +} from 'wdBean/Index'; | ||
| 6 | +import MinePageDatasModel from '../../model/MinePageDatasModel'; | ||
| 7 | +import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'; | ||
| 8 | +import { SearchDescription } from '../../viewmodel/SearchResultContentItem'; | ||
| 5 | 9 | ||
| 6 | const TAG: string = 'More_Comp'; | 10 | const TAG: string = 'More_Comp'; |
| 7 | 11 | ||
| @@ -10,17 +14,89 @@ const TAG: string = 'More_Comp'; | @@ -10,17 +14,89 @@ const TAG: string = 'More_Comp'; | ||
| 10 | export struct MoreComponent { | 14 | export struct MoreComponent { |
| 11 | @State contentDTO: ContentDTO = new ContentDTO(); | 15 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 12 | 16 | ||
| 17 | + aboutToAppear(): void { | ||
| 18 | + this.dealSearchSameList() | ||
| 19 | + } | ||
| 20 | + | ||
| 13 | build() { | 21 | build() { |
| 14 | Row() { | 22 | Row() { |
| 15 | Text('点击展开更多相似') | 23 | Text('点击展开更多相似') |
| 16 | .fontSize(16) | 24 | .fontSize(16) |
| 25 | + Text(`(${this.contentDTO.sameContentListSize})`) | ||
| 26 | + .fontSize(16) | ||
| 17 | Image($r('app.media.comment_unfold')) | 27 | Image($r('app.media.comment_unfold')) |
| 18 | .width(16) | 28 | .width(16) |
| 19 | .height(16) | 29 | .height(16) |
| 30 | + | ||
| 20 | } | 31 | } |
| 21 | .justifyContent(FlexAlign.Center) | 32 | .justifyContent(FlexAlign.Center) |
| 22 | .width('100%') | 33 | .width('100%') |
| 23 | .height(48) | 34 | .height(48) |
| 24 | .backgroundColor(0xffffff) | 35 | .backgroundColor(0xffffff) |
| 25 | } | 36 | } |
| 37 | + | ||
| 38 | + dealSearchSameList() { | ||
| 39 | + let resultData : SearchDescription[] = JSON.parse(this.contentDTO.sameContentListJson) as SearchDescription[] | ||
| 40 | + | ||
| 41 | + let data: contentListParams = { | ||
| 42 | + contentList: [] | ||
| 43 | + } | ||
| 44 | + resultData.forEach((item) => { | ||
| 45 | + data.contentList.push({ | ||
| 46 | + contentId: item.id + '', | ||
| 47 | + contentType: Number.parseInt(item.type) | ||
| 48 | + }) | ||
| 49 | + }) | ||
| 50 | + | ||
| 51 | + SearcherAboutDataModel.getInteractListData(data, getContext(this)).then((newValue) => { | ||
| 52 | + newValue.forEach((item) => { | ||
| 53 | + resultData.forEach((data) => { | ||
| 54 | + if (item.contentId == data.id) { | ||
| 55 | + data.collectNum = item.collectNum + "" | ||
| 56 | + data.commentNum = item.commentNum + "" | ||
| 57 | + data.likeNum = item.likeNum + "" | ||
| 58 | + data.readNum = item.readNum + "" | ||
| 59 | + data.shareNum = item.shareNum + "" | ||
| 60 | + } | ||
| 61 | + }) | ||
| 62 | + }) | ||
| 63 | + // 批量号主信息 | ||
| 64 | + let creatorIdList: string[] = [] | ||
| 65 | + resultData.forEach((value:SearchDescription) => { | ||
| 66 | + creatorIdList.push(value.creatorId) | ||
| 67 | + }) | ||
| 68 | + SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { | ||
| 69 | + resultData.forEach((value: SearchDescription) => { | ||
| 70 | + const landscape = value.landscape | ||
| 71 | + let photos: FullColumnImgUrlDTO[] = [] | ||
| 72 | + value.appStyleImages.split("&&").forEach((value) => { | ||
| 73 | + let resizeParams = MinePageDatasModel.extractResizeParams(value) | ||
| 74 | + if(resizeParams && resizeParams.length === 2){ | ||
| 75 | + photos.push( | ||
| 76 | + { | ||
| 77 | + fullUrl: value, | ||
| 78 | + weight:resizeParams[0], | ||
| 79 | + height:resizeParams[1], | ||
| 80 | + landscape: Number(landscape), | ||
| 81 | + } as FullColumnImgUrlDTO | ||
| 82 | + ) | ||
| 83 | + } | ||
| 84 | + }) | ||
| 85 | + let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos); | ||
| 86 | + if(value.type != "13"){ | ||
| 87 | + this.contentDTO.sameContentList.push(contentDTO) | ||
| 88 | + console.log("ycg","123") | ||
| 89 | + } | ||
| 90 | + }) | ||
| 91 | + }).catch((err: Error) => { | ||
| 92 | + console.log(TAG, JSON.stringify(err)) | ||
| 93 | + }) | ||
| 94 | + }).catch((err: Error) => { | ||
| 95 | + console.log(TAG, "请求失败") | ||
| 96 | + }) | ||
| 97 | + | ||
| 98 | + } | ||
| 99 | + | ||
| 26 | } | 100 | } |
| 101 | + | ||
| 102 | + |
sight_harmony/features/wdComponent/src/main/ets/components/comment/view/QualityCommentsComponent.ets
| @@ -37,21 +37,21 @@ export struct QualityCommentsComponent { | @@ -37,21 +37,21 @@ export struct QualityCommentsComponent { | ||
| 37 | aboutToDisappear(): void { | 37 | aboutToDisappear(): void { |
| 38 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) | 38 | // windowClass.setWindowSystemBarProperties({ statusBarColor: '#000' }) |
| 39 | this.dialogController = null // 将dialogController置空 | 39 | this.dialogController = null // 将dialogController置空 |
| 40 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 40 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | onPageShow(): void { | 43 | onPageShow(): void { |
| 44 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 44 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | onPageHide(): void { | 47 | onPageHide(): void { |
| 48 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 48 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | aboutToAppear(): void { | 51 | aboutToAppear(): void { |
| 52 | this.getData(); | 52 | this.getData(); |
| 53 | this.showAlert() | 53 | this.showAlert() |
| 54 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 54 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | showAlert() { | 57 | showAlert() { |
| @@ -106,6 +106,7 @@ export struct QualityCommentsComponent { | @@ -106,6 +106,7 @@ export struct QualityCommentsComponent { | ||
| 106 | Image($r('app.media.comment_img_banner')).width('100%') | 106 | Image($r('app.media.comment_img_banner')).width('100%') |
| 107 | .height(283) | 107 | .height(283) |
| 108 | // .aspectRatio(375 / 283); | 108 | // .aspectRatio(375 / 283); |
| 109 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 109 | } | 110 | } |
| 110 | .onAreaChange((oldValue: Area, newValue: Area) => { | 111 | .onAreaChange((oldValue: Area, newValue: Area) => { |
| 111 | if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) { | 112 | if (Number(oldValue.globalPosition.y) == 0 && Number(newValue.globalPosition.y) > 30) { |
| @@ -156,13 +157,15 @@ export struct QualityCommentsComponent { | @@ -156,13 +157,15 @@ export struct QualityCommentsComponent { | ||
| 156 | /*导航栏*/ | 157 | /*导航栏*/ |
| 157 | @Builder | 158 | @Builder |
| 158 | TabbarNormal() { | 159 | TabbarNormal() { |
| 159 | - Column() { | 160 | + Stack({ alignContent: Alignment.Top }) { |
| 160 | Row() { | 161 | Row() { |
| 161 | } | 162 | } |
| 162 | .width('100%') | 163 | .width('100%') |
| 163 | .height(px2vp(this.topSafeHeight)) | 164 | .height(px2vp(this.topSafeHeight)) |
| 164 | .backgroundColor($r('app.color.white')) | 165 | .backgroundColor($r('app.color.white')) |
| 165 | .opacity(this.tileOpacity) | 166 | .opacity(this.tileOpacity) |
| 167 | + .visibility(this.tileOpacity > 0 ? 0 : 1) | ||
| 168 | + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 166 | 169 | ||
| 167 | Stack({ alignContent: Alignment.Start }) { | 170 | Stack({ alignContent: Alignment.Start }) { |
| 168 | Row() { | 171 | Row() { |
| @@ -218,6 +221,7 @@ export struct QualityCommentsComponent { | @@ -218,6 +221,7 @@ export struct QualityCommentsComponent { | ||
| 218 | .scrollBar(BarState.Off) | 221 | .scrollBar(BarState.Off) |
| 219 | .edgeEffect(EdgeEffect.None) | 222 | .edgeEffect(EdgeEffect.None) |
| 220 | 223 | ||
| 224 | + .clip(false) | ||
| 221 | // this.TabbarTransparent() | 225 | // this.TabbarTransparent() |
| 222 | this.TabbarNormal() | 226 | this.TabbarNormal() |
| 223 | } | 227 | } |
| @@ -253,7 +257,7 @@ export struct QualityCommentsComponent { | @@ -253,7 +257,7 @@ export struct QualityCommentsComponent { | ||
| 253 | this.currentPage++ | 257 | this.currentPage++ |
| 254 | this.getData() | 258 | this.getData() |
| 255 | }) | 259 | }) |
| 256 | - .margin({ top: 196 }) | 260 | + .margin({ top: 196 - px2vp(this.topSafeHeight) }) |
| 257 | .height("100%") | 261 | .height("100%") |
| 258 | .width("100%") | 262 | .width("100%") |
| 259 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 | 263 | .edgeEffect(EdgeEffect.None) // 必须设置列表为滑动到边缘无效果 |
| @@ -73,13 +73,19 @@ export struct ZhGridLayout03 { | @@ -73,13 +73,19 @@ export struct ZhGridLayout03 { | ||
| 73 | bottom:11 | 73 | bottom:11 |
| 74 | }) | 74 | }) |
| 75 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 75 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 76 | + | ||
| 76 | } | 77 | } |
| 77 | .width('100%') | 78 | .width('100%') |
| 78 | .onClick((event: ClickEvent) => { | 79 | .onClick((event: ClickEvent) => { |
| 80 | + console.log('333rt',JSON.stringify(item)) | ||
| 79 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) | 81 | InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName) |
| 80 | if (item.objectType === '11') { | 82 | if (item.objectType === '11') { |
| 83 | + ProcessUtils.jumpExternalWebPage | ||
| 81 | ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) | 84 | ProcessUtils.jumpChannelTab(item.objectId, item.pageId, item.newsTitle) |
| 82 | - } else { | 85 | + } else if(item.objectType === '6'){ |
| 86 | + ProcessUtils.jumpExternalWebPage(item.linkUrl) | ||
| 87 | + //ProcessUtils.gotoWeb(item); | ||
| 88 | + }else{ | ||
| 83 | ProcessUtils.processPage(item) | 89 | ProcessUtils.processPage(item) |
| 84 | } | 90 | } |
| 85 | }) | 91 | }) |
| @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone | @@ -5,11 +5,11 @@ import { QualityCommentsComponent } from '../comment/view/QualityCommentsCompone | ||
| 5 | @Component | 5 | @Component |
| 6 | struct QualityCommentsPage { | 6 | struct QualityCommentsPage { |
| 7 | onPageShow(): void { | 7 | onPageShow(): void { |
| 8 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 8 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | onPageHide(): void { | 11 | onPageHide(): void { |
| 12 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 12 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | build() { | 15 | build() { |
| @@ -188,39 +188,37 @@ export struct SearchResultContentComponent { | @@ -188,39 +188,37 @@ export struct SearchResultContentComponent { | ||
| 188 | resultData.list.forEach((value:SearchResultContentItem) => { | 188 | resultData.list.forEach((value:SearchResultContentItem) => { |
| 189 | creatorIdList.push(value.data.creatorId) | 189 | creatorIdList.push(value.data.creatorId) |
| 190 | }) | 190 | }) |
| 191 | - let isRemain : boolean = false | ||
| 192 | SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { | 191 | SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { |
| 193 | resultData.list.forEach((value: SearchResultContentItem) => { | 192 | resultData.list.forEach((value: SearchResultContentItem) => { |
| 194 | const landscape = value.data.landscape | 193 | const landscape = value.data.landscape |
| 195 | let photos: FullColumnImgUrlDTO[] = [] | 194 | let photos: FullColumnImgUrlDTO[] = [] |
| 196 | // if (value.data.appStyle === 4) { | 195 | // if (value.data.appStyle === 4) { |
| 197 | value.data.appStyleImages.split("&&").forEach((value) => { | 196 | value.data.appStyleImages.split("&&").forEach((value) => { |
| 198 | - const resizeParams = this.extractResizeParams(value) | 197 | + let resizeParams = MinePageDatasModel.extractResizeParams(value) |
| 198 | + if(resizeParams && resizeParams.length === 2){ | ||
| 199 | photos.push( | 199 | photos.push( |
| 200 | { | 200 | { |
| 201 | fullUrl: value, | 201 | fullUrl: value, |
| 202 | - weight:resizeParams.width, | ||
| 203 | - height:resizeParams.height, | 202 | + weight:resizeParams[0], |
| 203 | + height:resizeParams[1], | ||
| 204 | landscape: Number(landscape), | 204 | landscape: Number(landscape), |
| 205 | } as FullColumnImgUrlDTO | 205 | } as FullColumnImgUrlDTO |
| 206 | ) | 206 | ) |
| 207 | + } | ||
| 207 | }) | 208 | }) |
| 208 | // } | 209 | // } |
| 209 | let contentDTO = this.dataTransform(rem,value, photos); | 210 | let contentDTO = this.dataTransform(rem,value, photos); |
| 210 | if(value.data.type != "13"){ | 211 | if(value.data.type != "13"){ |
| 211 | - this.tempList.push(contentDTO) | 212 | + this.data.push(contentDTO) |
| 212 | if(value.data.sameContentList != null && value.data.sameContentList.length > 0) { | 213 | if(value.data.sameContentList != null && value.data.sameContentList.length > 0) { |
| 213 | let contentDTO2 = new ContentDTO(); | 214 | let contentDTO2 = new ContentDTO(); |
| 214 | contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList) | 215 | contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList) |
| 215 | - isRemain = true | ||
| 216 | - this.tempList.push(contentDTO2) | 216 | + contentDTO2.sameContentListSize = value.data.sameContentList.length |
| 217 | + this.data.push(contentDTO2) | ||
| 217 | } | 218 | } |
| 218 | } | 219 | } |
| 219 | }) | 220 | }) |
| 220 | - if(!isRemain){ | ||
| 221 | - this.tempList.forEach((value) => { | ||
| 222 | - this.data.push(value) | ||
| 223 | - }) | 221 | + |
| 224 | this.tempList = [] | 222 | this.tempList = [] |
| 225 | this.data.notifyDataReload() | 223 | this.data.notifyDataReload() |
| 226 | this.count = this.data.totalCount() | 224 | this.count = this.data.totalCount() |
| @@ -230,9 +228,6 @@ export struct SearchResultContentComponent { | @@ -230,9 +228,6 @@ export struct SearchResultContentComponent { | ||
| 230 | this.hasMore = false | 228 | this.hasMore = false |
| 231 | } | 229 | } |
| 232 | this.isLoading = false | 230 | this.isLoading = false |
| 233 | - }else{ | ||
| 234 | - this.dealSameContent(resultData.totalCount) | ||
| 235 | - } | ||
| 236 | }).catch((err: Error) => { | 231 | }).catch((err: Error) => { |
| 237 | console.log(TAG, JSON.stringify(err)) | 232 | console.log(TAG, JSON.stringify(err)) |
| 238 | }) | 233 | }) |
| @@ -243,65 +238,6 @@ export struct SearchResultContentComponent { | @@ -243,65 +238,6 @@ export struct SearchResultContentComponent { | ||
| 243 | }) | 238 | }) |
| 244 | } | 239 | } |
| 245 | 240 | ||
| 246 | - async dealSameContent(count:number){ | ||
| 247 | - this.tempList.forEach(async (tempValue) => { | ||
| 248 | - if(StringUtils.isNotEmpty(tempValue.sameContentListJson)){ | ||
| 249 | - let data: contentListParams = { | ||
| 250 | - contentList: [] | ||
| 251 | - } | ||
| 252 | - let resultData : SearchDescription[] = JSON.parse(tempValue.sameContentListJson) as SearchDescription[] | ||
| 253 | - if(resultData!=null){ | ||
| 254 | - resultData.forEach((item) => { | ||
| 255 | - data.contentList.push({ | ||
| 256 | - contentId: item.id + '', | ||
| 257 | - contentType: Number.parseInt(item.type) | ||
| 258 | - }) | ||
| 259 | - }) | ||
| 260 | - | ||
| 261 | - let newValue = await SearcherAboutDataModel.getInteractListData(data, getContext(this)) | ||
| 262 | - newValue.forEach((item) => { | ||
| 263 | - resultData.forEach((data) => { | ||
| 264 | - if (item.contentId == data.id) { | ||
| 265 | - data.collectNum = item.collectNum + "" | ||
| 266 | - data.commentNum = item.commentNum + "" | ||
| 267 | - data.likeNum = item.likeNum + "" | ||
| 268 | - data.readNum = item.readNum + "" | ||
| 269 | - data.shareNum = item.shareNum + "" | ||
| 270 | - } | ||
| 271 | - }) | ||
| 272 | - }) | ||
| 273 | - let creatorIdList: string[] = [] | ||
| 274 | - resultData.forEach((value:SearchDescription) => { | ||
| 275 | - creatorIdList.push(value.creatorId) | ||
| 276 | - }) | ||
| 277 | - let rem = await SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}) | ||
| 278 | - resultData.forEach((value) => { | ||
| 279 | - let photos: FullColumnImgUrlDTO[] = [] | ||
| 280 | - value.appStyleImages.split("&&").forEach((value) => { | ||
| 281 | - const resizeParams = this.extractResizeParams(value) | ||
| 282 | - photos.push({ fullUrl: value,weight:resizeParams.width,height:resizeParams.height, } as FullColumnImgUrlDTO) | ||
| 283 | - }) | ||
| 284 | - let contentDTO = this.dataTransform2(rem,value, photos); | ||
| 285 | - tempValue.sameContentList.push(contentDTO) | ||
| 286 | - }) | ||
| 287 | - } | ||
| 288 | - } | ||
| 289 | - }) | ||
| 290 | - | ||
| 291 | - this.tempList.forEach((value) => { | ||
| 292 | - this.data.push(value) | ||
| 293 | - }) | ||
| 294 | - this.tempList = [] | ||
| 295 | - this.data.notifyDataReload() | ||
| 296 | - this.count = this.data.totalCount() | ||
| 297 | - if (this.count < count) { | ||
| 298 | - this.curPageNum++ | ||
| 299 | - } else { | ||
| 300 | - this.hasMore = false | ||
| 301 | - } | ||
| 302 | - this.isLoading = false | ||
| 303 | - } | ||
| 304 | - | ||
| 305 | build() { | 241 | build() { |
| 306 | Column() { | 242 | Column() { |
| 307 | if (this.count == 0) { | 243 | if (this.count == 0) { |
| @@ -326,7 +262,7 @@ export struct SearchResultContentComponent { | @@ -326,7 +262,7 @@ export struct SearchResultContentComponent { | ||
| 326 | Column() { | 262 | Column() { |
| 327 | if (this.searchType == "activity") { | 263 | if (this.searchType == "activity") { |
| 328 | ActivityItemComponent({ contentDTO: item }) | 264 | ActivityItemComponent({ contentDTO: item }) |
| 329 | - }else if(item.sameContentList != null && item.sameContentList.length > 0){ | 265 | + }else if(item.sameContentListSize > 0){ |
| 330 | MoreComponent({ contentDTO: item }) | 266 | MoreComponent({ contentDTO: item }) |
| 331 | } else { | 267 | } else { |
| 332 | CardParser({compDTO:new CompDTO, contentDTO: item }) | 268 | CardParser({compDTO:new CompDTO, contentDTO: item }) |
| @@ -553,92 +489,6 @@ export struct SearchResultContentComponent { | @@ -553,92 +489,6 @@ export struct SearchResultContentComponent { | ||
| 553 | return contentDTO; | 489 | return contentDTO; |
| 554 | } | 490 | } |
| 555 | 491 | ||
| 556 | - private dataTransform2(rem:CreatorDetailResponseItem[],value: SearchDescription, photos: FullColumnImgUrlDTO[]): ContentDTO { | ||
| 557 | - let rmhInfo = this.getRmhInfo2(rem,value) | ||
| 558 | - console.log('获取photos',JSON.stringify(photos)) | ||
| 559 | - console.log('获取value2',JSON.stringify(value)) | ||
| 560 | - let contentDTO = new ContentDTO(); | ||
| 561 | - contentDTO.appStyle = value.appStyle + "" | ||
| 562 | - contentDTO.cityCode = value.cityCode | ||
| 563 | - contentDTO.coverSize = "" | ||
| 564 | - contentDTO.coverType = value.type == "5" ? 1 : -1 | ||
| 565 | - contentDTO.coverUrl = | ||
| 566 | - this.searchType == "activity" ? value.zhChannelPageImg : value.appStyleImages.split("&&")[0]; | ||
| 567 | - contentDTO.description = value.description | ||
| 568 | - contentDTO.districtCode = value.districtCode | ||
| 569 | - contentDTO.endTime = value.endTime | ||
| 570 | - contentDTO.hImageUrl = "" | ||
| 571 | - contentDTO.heatValue = "" | ||
| 572 | - contentDTO.innerUrl = "" | ||
| 573 | - contentDTO.landscape = Number.parseInt(value.landscape) | ||
| 574 | - contentDTO.linkUrl = value.linkUrl | ||
| 575 | - contentDTO.openLikes = Number.parseInt(value.openLikes) | ||
| 576 | - contentDTO.openUrl = "" | ||
| 577 | - contentDTO.pageId = value.pageId | ||
| 578 | - contentDTO.programAuth = "" | ||
| 579 | - contentDTO.programId = "" | ||
| 580 | - contentDTO.programName = "" | ||
| 581 | - contentDTO.programSource = -1 | ||
| 582 | - contentDTO.programType = Number.parseInt(value.status) | ||
| 583 | - contentDTO.provinceCode = value.provinceCode | ||
| 584 | - contentDTO.showTitleEd = value.showTitleEd | ||
| 585 | - contentDTO.showTitleIng = value.showTitleIng | ||
| 586 | - contentDTO.showTitleNo = value.showTitleNo | ||
| 587 | - contentDTO.startTime = value.startTime | ||
| 588 | - contentDTO.subType = "" | ||
| 589 | - contentDTO.subtitle = "" | ||
| 590 | - contentDTO.title = value.title | ||
| 591 | - contentDTO.vImageUrl = "" | ||
| 592 | - contentDTO.screenType = "" | ||
| 593 | - contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName | ||
| 594 | - contentDTO.objectId = value.id | ||
| 595 | - contentDTO.objectType = value.type | ||
| 596 | - contentDTO.channelId = value.channelId | ||
| 597 | - contentDTO.relId = value.relId | ||
| 598 | - contentDTO.relType = value.relType | ||
| 599 | - contentDTO.newsTitle = value.titleLiteral; | ||
| 600 | - contentDTO.publishTime = | ||
| 601 | - StringUtils.isNotEmpty(value.firstPublishTime) ? value.firstPublishTime : value.publishTime | ||
| 602 | - contentDTO.visitorComment = -1 | ||
| 603 | - contentDTO.fullColumnImgUrls = photos | ||
| 604 | - contentDTO.newsSummary = "" | ||
| 605 | - contentDTO.hasMore = -1 | ||
| 606 | - contentDTO.slideShows = [] | ||
| 607 | - contentDTO.voiceInfo = {} as VoiceInfoDTO | ||
| 608 | - contentDTO.tagWord = -1 | ||
| 609 | - contentDTO.isSelect = true | ||
| 610 | - contentDTO.rmhInfo = {} as RmhInfoDTO | ||
| 611 | - contentDTO.photoNum = -1 | ||
| 612 | - contentDTO.liveInfo = {} as LiveInfoDTO; | ||
| 613 | - contentDTO.videoInfo = { | ||
| 614 | - videoDuration: Number.parseInt(value.duration) | ||
| 615 | - } as VideoInfoDTO; | ||
| 616 | - | ||
| 617 | - let interact = new InteractDataDTO() | ||
| 618 | - interact.collectNum = value.collectNum | ||
| 619 | - interact.commentNum = value.commentNum | ||
| 620 | - interact.contentId = value.id | ||
| 621 | - interact.contentType = Number.parseInt(value.type) | ||
| 622 | - interact.likeNum = value.likeNum | ||
| 623 | - interact.readNum = Number.parseInt(value.readNum) | ||
| 624 | - interact.shareNum = Number.parseInt(value.shareNum) | ||
| 625 | - contentDTO.interactData = interact | ||
| 626 | - contentDTO.corner = '' | ||
| 627 | - contentDTO.rmhPlatform = 0 | ||
| 628 | - contentDTO.newTags = '' | ||
| 629 | - contentDTO.isSearch = true | ||
| 630 | - contentDTO.publishTimestamp = "" | ||
| 631 | - contentDTO.bottomNavId = ''; | ||
| 632 | - contentDTO.openType = ''; | ||
| 633 | - contentDTO.extra = ''; | ||
| 634 | - contentDTO.titleShow = value.type == "5" ? 1 : 0; | ||
| 635 | - contentDTO.rmhInfo = rmhInfo | ||
| 636 | - contentDTO.shareFlag = value.shareFlag | ||
| 637 | - contentDTO.contentText = value.contentText | ||
| 638 | - return contentDTO; | ||
| 639 | - } | ||
| 640 | - | ||
| 641 | - | ||
| 642 | // 搜索数据转化rmhInfo | 492 | // 搜索数据转化rmhInfo |
| 643 | private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){ | 493 | private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){ |
| 644 | let obj = value.data | 494 | let obj = value.data |
| @@ -695,88 +545,4 @@ export struct SearchResultContentComponent { | @@ -695,88 +545,4 @@ export struct SearchResultContentComponent { | ||
| 695 | return rmhInfo | 545 | return rmhInfo |
| 696 | } | 546 | } |
| 697 | 547 | ||
| 698 | - // 搜索数据转化rmhInfo | ||
| 699 | - private getRmhInfo2(rem:CreatorDetailResponseItem[],value:SearchDescription){ | ||
| 700 | - let obj = value | ||
| 701 | - let rmhInfo:RmhInfoDTO = { | ||
| 702 | - rmhHeadUrl:obj.headerPhotoUrl, | ||
| 703 | - rmhName:obj.creatorName, | ||
| 704 | - rmhId:obj.creatorId, | ||
| 705 | - authIcon:obj.authIcon, | ||
| 706 | - authTitle: obj.authTitle, | ||
| 707 | - authTitle2: '', | ||
| 708 | - banControl: 0, | ||
| 709 | - cnIsAttention: 0, | ||
| 710 | - cnAttention: 0, | ||
| 711 | - cnlsComment: 0, | ||
| 712 | - cnlsLike: 0, | ||
| 713 | - cnMainControl: 0, | ||
| 714 | - cnShareControl: 0, | ||
| 715 | - cnIsComment: 0, | ||
| 716 | - cnIsLike:0, | ||
| 717 | - posterShareControl: 0, | ||
| 718 | - rmhDesc: obj.introduction, | ||
| 719 | - userId: obj.userId, | ||
| 720 | - userType: obj.userType, | ||
| 721 | - honoraryIcon:'' | ||
| 722 | - } | ||
| 723 | - if(rem.length>0){ | ||
| 724 | - rem.forEach(item=>{ | ||
| 725 | - if(item.creatorId === obj.creatorId){ | ||
| 726 | - rmhInfo = { | ||
| 727 | - rmhHeadUrl:item.headPhotoUrl, | ||
| 728 | - rmhName:item.userName, | ||
| 729 | - rmhId:item.creatorId, | ||
| 730 | - authIcon:item.authIcon, | ||
| 731 | - authTitle: item.authTitle, | ||
| 732 | - authTitle2: '', | ||
| 733 | - banControl: 0, | ||
| 734 | - cnIsAttention:item.isAttention, | ||
| 735 | - cnAttention: 0, | ||
| 736 | - cnlsComment: 0, | ||
| 737 | - cnlsLike: 0, | ||
| 738 | - cnMainControl: 0, | ||
| 739 | - cnShareControl: 0, | ||
| 740 | - cnIsComment: 0, | ||
| 741 | - cnIsLike:0, | ||
| 742 | - posterShareControl: 0, | ||
| 743 | - rmhDesc: item.introduction, | ||
| 744 | - userId: item.userId, | ||
| 745 | - userType: item.userType, | ||
| 746 | - honoraryIcon:'' | ||
| 747 | - } | ||
| 748 | - } | ||
| 749 | - }) | ||
| 750 | - } | ||
| 751 | - return rmhInfo | ||
| 752 | - } | ||
| 753 | - | ||
| 754 | - | ||
| 755 | - | ||
| 756 | - private extractResizeParams(url: string) { | ||
| 757 | - const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450 | ||
| 758 | - const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800 | ||
| 759 | - const heightMatch = url.match(heightRegex); | ||
| 760 | - const widthMatch = url.match(widthRegex); | ||
| 761 | - let height = heightMatch ? `h_${heightMatch[1]}` : undefined | ||
| 762 | - let width = widthMatch ? `w_${widthMatch[1]}` : undefined | ||
| 763 | - let h:number =0 | ||
| 764 | - let w:number =0 | ||
| 765 | - if(height){ | ||
| 766 | - h = Number(height.split('_')[1]) | ||
| 767 | - } | ||
| 768 | - if(width){ | ||
| 769 | - w = Number(width.split('_')[1]) | ||
| 770 | - } | ||
| 771 | - interface Obj{ | ||
| 772 | - width:number; | ||
| 773 | - height:number | ||
| 774 | - } | ||
| 775 | - let obj:Obj = { | ||
| 776 | - width:w, | ||
| 777 | - height:h | ||
| 778 | - } | ||
| 779 | - return obj | ||
| 780 | - } | ||
| 781 | - | ||
| 782 | } | 548 | } |
| @@ -28,6 +28,10 @@ import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem'; | @@ -28,6 +28,10 @@ import { MessageUnReadItem } from '../viewmodel/MessageUnReadItem'; | ||
| 28 | import { HistoryPushDataItem } from '../viewmodel/HistoryPushDataItem'; | 28 | import { HistoryPushDataItem } from '../viewmodel/HistoryPushDataItem'; |
| 29 | import { HashMap } from '@kit.ArkTS'; | 29 | import { HashMap } from '@kit.ArkTS'; |
| 30 | import { InteractMessageMItem } from './InteractMessageModel'; | 30 | import { InteractMessageMItem } from './InteractMessageModel'; |
| 31 | +import { FullColumnImgUrlDTO, ContentDTO, RmhInfoDTO, LiveInfoDTO, VideoInfoDTO, InteractDataDTO } from 'wdBean/Index'; | ||
| 32 | +import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'; | ||
| 33 | +import { CreatorDetailResponseItem } from '../viewmodel/CreatorDetailResponseItem'; | ||
| 34 | +import { SearchDescription } from '../viewmodel/SearchResultContentItem'; | ||
| 31 | 35 | ||
| 32 | const TAG = "MinePageDatasModel" | 36 | const TAG = "MinePageDatasModel" |
| 33 | 37 | ||
| @@ -749,6 +753,169 @@ class MinePageDatasModel{ | @@ -749,6 +753,169 @@ class MinePageDatasModel{ | ||
| 749 | return WDHttp.get<ResponseDTO<String>>(url) | 753 | return WDHttp.get<ResponseDTO<String>>(url) |
| 750 | }; | 754 | }; |
| 751 | 755 | ||
| 756 | + | ||
| 757 | + extractResizeParams(url: string) :number[]{ | ||
| 758 | + const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450 | ||
| 759 | + const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800 | ||
| 760 | + const heightMatch = url.match(heightRegex); | ||
| 761 | + const widthMatch = url.match(widthRegex); | ||
| 762 | + let height = heightMatch ? `h_${heightMatch[1]}` : undefined | ||
| 763 | + let width = widthMatch ? `w_${widthMatch[1]}` : undefined | ||
| 764 | + let h:number =0 | ||
| 765 | + let w:number =0 | ||
| 766 | + if(height){ | ||
| 767 | + h = Number(height.split('_')[1]) | ||
| 768 | + } | ||
| 769 | + if(width){ | ||
| 770 | + w = Number(width.split('_')[1]) | ||
| 771 | + } | ||
| 772 | + let arr:number[] = [] | ||
| 773 | + arr.push(w) | ||
| 774 | + arr.push(h) | ||
| 775 | + | ||
| 776 | + return arr | ||
| 777 | + } | ||
| 778 | + | ||
| 779 | + dataTransform(rem:CreatorDetailResponseItem[],value: SearchDescription, photos: FullColumnImgUrlDTO[]): ContentDTO { | ||
| 780 | + let rmhInfo = this.getRmhInfo(rem,value) | ||
| 781 | + console.log('获取photos',JSON.stringify(photos)) | ||
| 782 | + console.log('获取value2',JSON.stringify(value)) | ||
| 783 | + let contentDTO = new ContentDTO(); | ||
| 784 | + contentDTO.appStyle = value.appStyle + "" | ||
| 785 | + contentDTO.cityCode = value.cityCode | ||
| 786 | + contentDTO.coverSize = "" | ||
| 787 | + contentDTO.coverType = value.type == "5" ? 1 : -1 | ||
| 788 | + contentDTO.coverUrl = value.appStyleImages.split("&&")[0]; | ||
| 789 | + contentDTO.description = value.description | ||
| 790 | + contentDTO.districtCode = value.districtCode | ||
| 791 | + contentDTO.endTime = value.endTime | ||
| 792 | + contentDTO.hImageUrl = "" | ||
| 793 | + contentDTO.heatValue = "" | ||
| 794 | + contentDTO.innerUrl = "" | ||
| 795 | + contentDTO.landscape = Number.parseInt(value.landscape) | ||
| 796 | + contentDTO.linkUrl = value.linkUrl | ||
| 797 | + contentDTO.openLikes = Number.parseInt(value.openLikes) | ||
| 798 | + contentDTO.openUrl = "" | ||
| 799 | + contentDTO.pageId = value.pageId | ||
| 800 | + contentDTO.programAuth = "" | ||
| 801 | + contentDTO.programId = "" | ||
| 802 | + contentDTO.programName = "" | ||
| 803 | + contentDTO.programSource = -1 | ||
| 804 | + contentDTO.programType = Number.parseInt(value.status) | ||
| 805 | + contentDTO.provinceCode = value.provinceCode | ||
| 806 | + contentDTO.showTitleEd = value.showTitleEd | ||
| 807 | + contentDTO.showTitleIng = value.showTitleIng | ||
| 808 | + contentDTO.showTitleNo = value.showTitleNo | ||
| 809 | + contentDTO.startTime = value.startTime | ||
| 810 | + contentDTO.subType = "" | ||
| 811 | + contentDTO.subtitle = "" | ||
| 812 | + contentDTO.title = value.title | ||
| 813 | + contentDTO.vImageUrl = "" | ||
| 814 | + contentDTO.screenType = "" | ||
| 815 | + contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName | ||
| 816 | + contentDTO.objectId = value.id | ||
| 817 | + contentDTO.objectType = value.type | ||
| 818 | + contentDTO.channelId = value.channelId | ||
| 819 | + contentDTO.relId = value.relId | ||
| 820 | + contentDTO.relType = value.relType | ||
| 821 | + contentDTO.newsTitle = value.titleLiteral; | ||
| 822 | + contentDTO.publishTime = | ||
| 823 | + StringUtils.isNotEmpty(value.firstPublishTime) ? value.firstPublishTime : value.publishTime | ||
| 824 | + contentDTO.visitorComment = -1 | ||
| 825 | + contentDTO.fullColumnImgUrls = photos | ||
| 826 | + contentDTO.newsSummary = "" | ||
| 827 | + contentDTO.hasMore = -1 | ||
| 828 | + contentDTO.slideShows = [] | ||
| 829 | + contentDTO.voiceInfo = {} as VoiceInfoDTO | ||
| 830 | + contentDTO.tagWord = -1 | ||
| 831 | + contentDTO.isSelect = true | ||
| 832 | + contentDTO.rmhInfo = {} as RmhInfoDTO | ||
| 833 | + contentDTO.photoNum = -1 | ||
| 834 | + contentDTO.liveInfo = {} as LiveInfoDTO; | ||
| 835 | + contentDTO.videoInfo = { | ||
| 836 | + videoDuration: Number.parseInt(value.duration) | ||
| 837 | + } as VideoInfoDTO; | ||
| 838 | + | ||
| 839 | + let interact = new InteractDataDTO() | ||
| 840 | + interact.collectNum = value.collectNum | ||
| 841 | + interact.commentNum = value.commentNum | ||
| 842 | + interact.contentId = value.id | ||
| 843 | + interact.contentType = Number.parseInt(value.type) | ||
| 844 | + interact.likeNum = value.likeNum | ||
| 845 | + interact.readNum = Number.parseInt(value.readNum) | ||
| 846 | + interact.shareNum = Number.parseInt(value.shareNum) | ||
| 847 | + contentDTO.interactData = interact | ||
| 848 | + contentDTO.corner = '' | ||
| 849 | + contentDTO.rmhPlatform = 0 | ||
| 850 | + contentDTO.newTags = '' | ||
| 851 | + contentDTO.isSearch = true | ||
| 852 | + contentDTO.publishTimestamp = "" | ||
| 853 | + contentDTO.bottomNavId = ''; | ||
| 854 | + contentDTO.openType = ''; | ||
| 855 | + contentDTO.extra = ''; | ||
| 856 | + contentDTO.titleShow = value.type == "5" ? 1 : 0; | ||
| 857 | + contentDTO.rmhInfo = rmhInfo | ||
| 858 | + contentDTO.shareFlag = value.shareFlag | ||
| 859 | + contentDTO.contentText = value.contentText | ||
| 860 | + return contentDTO; | ||
| 861 | + } | ||
| 862 | + | ||
| 863 | + // 搜索数据转化rmhInfo | ||
| 864 | + getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchDescription){ | ||
| 865 | + let obj = value | ||
| 866 | + let rmhInfo:RmhInfoDTO = { | ||
| 867 | + rmhHeadUrl:obj.headerPhotoUrl, | ||
| 868 | + rmhName:obj.creatorName, | ||
| 869 | + rmhId:obj.creatorId, | ||
| 870 | + authIcon:obj.authIcon, | ||
| 871 | + authTitle: obj.authTitle, | ||
| 872 | + authTitle2: '', | ||
| 873 | + banControl: 0, | ||
| 874 | + cnIsAttention: 0, | ||
| 875 | + cnAttention: 0, | ||
| 876 | + cnlsComment: 0, | ||
| 877 | + cnlsLike: 0, | ||
| 878 | + cnMainControl: 0, | ||
| 879 | + cnShareControl: 0, | ||
| 880 | + cnIsComment: 0, | ||
| 881 | + cnIsLike:0, | ||
| 882 | + posterShareControl: 0, | ||
| 883 | + rmhDesc: obj.introduction, | ||
| 884 | + userId: obj.userId, | ||
| 885 | + userType: obj.userType, | ||
| 886 | + honoraryIcon:'' | ||
| 887 | + } | ||
| 888 | + if(rem.length>0){ | ||
| 889 | + rem.forEach(item=>{ | ||
| 890 | + if(item.creatorId === obj.creatorId){ | ||
| 891 | + rmhInfo = { | ||
| 892 | + rmhHeadUrl:item.headPhotoUrl, | ||
| 893 | + rmhName:item.userName, | ||
| 894 | + rmhId:item.creatorId, | ||
| 895 | + authIcon:item.authIcon, | ||
| 896 | + authTitle: item.authTitle, | ||
| 897 | + authTitle2: '', | ||
| 898 | + banControl: 0, | ||
| 899 | + cnIsAttention:item.isAttention, | ||
| 900 | + cnAttention: 0, | ||
| 901 | + cnlsComment: 0, | ||
| 902 | + cnlsLike: 0, | ||
| 903 | + cnMainControl: 0, | ||
| 904 | + cnShareControl: 0, | ||
| 905 | + cnIsComment: 0, | ||
| 906 | + cnIsLike:0, | ||
| 907 | + posterShareControl: 0, | ||
| 908 | + rmhDesc: item.introduction, | ||
| 909 | + userId: item.userId, | ||
| 910 | + userType: item.userType, | ||
| 911 | + honoraryIcon:'' | ||
| 912 | + } | ||
| 913 | + } | ||
| 914 | + }) | ||
| 915 | + } | ||
| 916 | + return rmhInfo | ||
| 917 | + } | ||
| 918 | + | ||
| 752 | } | 919 | } |
| 753 | 920 | ||
| 754 | const minePageDatasModel = MinePageDatasModel.getInstance() | 921 | const minePageDatasModel = MinePageDatasModel.getInstance() |
| @@ -49,6 +49,7 @@ export struct MultiPictureListPage { | @@ -49,6 +49,7 @@ export struct MultiPictureListPage { | ||
| 49 | left: { anchor: "__container__", align: HorizontalAlign.Start } | 49 | left: { anchor: "__container__", align: HorizontalAlign.Start } |
| 50 | }) | 50 | }) |
| 51 | .onClick(() => { | 51 | .onClick(() => { |
| 52 | + this.onBack(); | ||
| 52 | router.back(); | 53 | router.back(); |
| 53 | }) | 54 | }) |
| 54 | .id("backImg") | 55 | .id("backImg") |
| @@ -134,7 +135,7 @@ export struct MultiPictureListPage { | @@ -134,7 +135,7 @@ export struct MultiPictureListPage { | ||
| 134 | } | 135 | } |
| 135 | .width('100%') | 136 | .width('100%') |
| 136 | .height('100%') | 137 | .height('100%') |
| 137 | - .padding({top:$r('app.float.margin_44')}) | 138 | + // .padding({top:$r('app.float.margin_44')}) |
| 138 | .backgroundColor(Color.Black) | 139 | .backgroundColor(Color.Black) |
| 139 | .id('e_picture_container') | 140 | .id('e_picture_container') |
| 140 | // 设置顶部绘制延伸到状态栏 | 141 | // 设置顶部绘制延伸到状态栏 |
| @@ -148,7 +149,7 @@ export struct MultiPictureListPage { | @@ -148,7 +149,7 @@ export struct MultiPictureListPage { | ||
| 148 | */ | 149 | */ |
| 149 | openFullScreen() { | 150 | openFullScreen() { |
| 150 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 151 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 151 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 152 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 152 | // WindowModel.shared.setWindowSystemBarEnable([]) | 153 | // WindowModel.shared.setWindowSystemBarEnable([]) |
| 153 | } | 154 | } |
| 154 | 155 | ||
| @@ -163,7 +164,16 @@ export struct MultiPictureListPage { | @@ -163,7 +164,16 @@ export struct MultiPictureListPage { | ||
| 163 | */ | 164 | */ |
| 164 | closeFullScreen() { | 165 | closeFullScreen() { |
| 165 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 166 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 166 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 167 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 167 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | 168 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) |
| 168 | } | 169 | } |
| 170 | + | ||
| 171 | + onBackPress(): boolean | void { | ||
| 172 | + this.onBack() | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + private onBack() { | ||
| 176 | + // 提前设置,否则返回的页面展示有问题(有时延) | ||
| 177 | + this.closeFullScreen() | ||
| 178 | + } | ||
| 169 | } | 179 | } |
| @@ -91,7 +91,7 @@ struct MultiPictureDetailPage { | @@ -91,7 +91,7 @@ struct MultiPictureDetailPage { | ||
| 91 | */ | 91 | */ |
| 92 | openFullScreen() { | 92 | openFullScreen() { |
| 93 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) | 93 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) |
| 94 | - WindowModel.shared.setWindowLayoutFullScreen(true) | 94 | + // WindowModel.shared.setWindowLayoutFullScreen(true) |
| 95 | // WindowModel.shared.setWindowSystemBarEnable([]) | 95 | // WindowModel.shared.setWindowSystemBarEnable([]) |
| 96 | } | 96 | } |
| 97 | 97 | ||
| @@ -101,7 +101,7 @@ struct MultiPictureDetailPage { | @@ -101,7 +101,7 @@ struct MultiPictureDetailPage { | ||
| 101 | */ | 101 | */ |
| 102 | closeFullScreen() { | 102 | closeFullScreen() { |
| 103 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) | 103 | WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) |
| 104 | - WindowModel.shared.setWindowLayoutFullScreen(false) | 104 | + // WindowModel.shared.setWindowLayoutFullScreen(false) |
| 105 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) | 105 | // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) |
| 106 | } | 106 | } |
| 107 | 107 |
-
Please register or login to post a comment