Showing
4 changed files
with
62 additions
and
54 deletions
| @@ -45,7 +45,7 @@ struct EditUserNikeNamePage { | @@ -45,7 +45,7 @@ struct EditUserNikeNamePage { | ||
| 45 | .alignItems(VerticalAlign.Center) | 45 | .alignItems(VerticalAlign.Center) |
| 46 | 46 | ||
| 47 | Divider() | 47 | Divider() |
| 48 | - .margin(20) | 48 | + .margin({ top:0,bottom:20,left:20 ,right:20 }) |
| 49 | 49 | ||
| 50 | Row(){ | 50 | Row(){ |
| 51 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') | 51 | Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。') |
| @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 4 | import { CommonConstants, ViewType } from 'wdConstant' | 4 | import { CommonConstants, ViewType } from 'wdConstant' |
| 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' | 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' |
| 6 | import { ErrorComponent } from '../view/ErrorComponent' | 6 | import { ErrorComponent } from '../view/ErrorComponent' |
| 7 | -import { CompDTO, ContentDTO, contentListParams,contentListItem } from 'wdBean' | 7 | +import { CompDTO, ContentDTO, contentListParams,contentListItem, InteractDataDTO } from 'wdBean' |
| 8 | import NoMoreLayout from './NoMoreLayout' | 8 | import NoMoreLayout from './NoMoreLayout' |
| 9 | import { CustomSelectUI } from '../view/CustomSelectUI'; | 9 | import { CustomSelectUI } from '../view/CustomSelectUI'; |
| 10 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; | 10 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; |
| @@ -16,6 +16,7 @@ import { NetworkUtil } from 'wdKit/Index'; | @@ -16,6 +16,7 @@ import { NetworkUtil } from 'wdKit/Index'; | ||
| 16 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 16 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 17 | import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; | 17 | import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index'; |
| 18 | 18 | ||
| 19 | +import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel'; | ||
| 19 | @Entry | 20 | @Entry |
| 20 | @Component | 21 | @Component |
| 21 | struct MyCollectionListPage { | 22 | struct MyCollectionListPage { |
| @@ -28,6 +29,8 @@ struct MyCollectionListPage { | @@ -28,6 +29,8 @@ struct MyCollectionListPage { | ||
| 28 | @Provide deleteNum :number = 0; | 29 | @Provide deleteNum :number = 0; |
| 29 | @Provide isAllSelect:boolean = false | 30 | @Provide isAllSelect:boolean = false |
| 30 | 31 | ||
| 32 | + @Provide commentList: InteractDataDTO[] = [] | ||
| 33 | + | ||
| 31 | @State currentPage: number = 1; | 34 | @State currentPage: number = 1; |
| 32 | private scroller: Scroller = new Scroller(); | 35 | private scroller: Scroller = new Scroller(); |
| 33 | emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default | 36 | emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default |
| @@ -175,6 +178,10 @@ struct MyCollectionListPage { | @@ -175,6 +178,10 @@ struct MyCollectionListPage { | ||
| 175 | this.allDatas.push(compDTO) | 178 | this.allDatas.push(compDTO) |
| 176 | } | 179 | } |
| 177 | 180 | ||
| 181 | + if (this.allDatas.length > 0){ | ||
| 182 | + this.getContentData() | ||
| 183 | + } | ||
| 184 | + | ||
| 178 | if (collectionItem.hasNext === 0) { | 185 | if (collectionItem.hasNext === 0) { |
| 179 | this.browSingModel.hasMore = false; | 186 | this.browSingModel.hasMore = false; |
| 180 | } else { | 187 | } else { |
| @@ -259,12 +266,28 @@ struct MyCollectionListPage { | @@ -259,12 +266,28 @@ struct MyCollectionListPage { | ||
| 259 | } | 266 | } |
| 260 | } | 267 | } |
| 261 | 268 | ||
| 262 | - getContentData(){ | 269 | + async getContentData(){ |
| 270 | + try { | ||
| 271 | + // 获取列表数据 | ||
| 272 | + const params: contentListParams = { | ||
| 273 | + contentList: [] | ||
| 274 | + } | ||
| 275 | + this.allDatas.forEach((item: ContentDTO) => { | ||
| 276 | + params.contentList.push({ | ||
| 277 | + contentId: item.objectId, | ||
| 278 | + contentType: Number(item.objectType ?? '1') | ||
| 279 | + }) | ||
| 280 | + }) | ||
| 281 | + this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params) | ||
| 282 | + | ||
| 283 | + let datas: ContentDTO[] = []; | ||
| 263 | for (let index = 0; index < this.allDatas.length; index++) { | 284 | for (let index = 0; index < this.allDatas.length; index++) { |
| 264 | const compDTO = this.allDatas[index]; | 285 | const compDTO = this.allDatas[index]; |
| 265 | - compDTO.isCollection = true ///用于时间展示 | ||
| 266 | - this.allDatas.push(compDTO) | 286 | + compDTO.interactData = this.commentList[index] |
| 287 | + datas.push(compDTO) | ||
| 288 | + } | ||
| 289 | + this.allDatas.push(...datas) | ||
| 290 | + } catch (exception) { | ||
| 267 | } | 291 | } |
| 268 | } | 292 | } |
| 269 | - | ||
| 270 | } | 293 | } |
| @@ -74,8 +74,11 @@ struct LaunchAdvertisingPage { | @@ -74,8 +74,11 @@ struct LaunchAdvertisingPage { | ||
| 74 | bottom: 0 | 74 | bottom: 0 |
| 75 | }) | 75 | }) |
| 76 | 76 | ||
| 77 | - if (this.defaultModel.isAd === '1'){ | ||
| 78 | - Stack({alignContent:Alignment.TopStart}){ | 77 | + |
| 78 | + Stack(){ | ||
| 79 | + Column(){ | ||
| 80 | + Row(){ | ||
| 81 | + if (this.defaultModel.isAd === '1') { | ||
| 79 | Text('广告') | 82 | Text('广告') |
| 80 | .fontColor(Color.White) | 83 | .fontColor(Color.White) |
| 81 | .textAlign(TextAlign.Center) | 84 | .textAlign(TextAlign.Center) |
| @@ -85,19 +88,16 @@ struct LaunchAdvertisingPage { | @@ -85,19 +88,16 @@ struct LaunchAdvertisingPage { | ||
| 85 | .borderRadius(2) | 88 | .borderRadius(2) |
| 86 | .margin({top:'15lpx',left:'19lpx'}) | 89 | .margin({top:'15lpx',left:'19lpx'}) |
| 87 | .backgroundColor('#80000000') | 90 | .backgroundColor('#80000000') |
| 91 | + .margin({left:16}) | ||
| 88 | } | 92 | } |
| 89 | - .width('100%') | ||
| 90 | - .height('100%') | ||
| 91 | - } | ||
| 92 | 93 | ||
| 93 | - Stack({alignContent:Alignment.TopEnd}){ | 94 | + Blank() |
| 95 | + | ||
| 94 | Button(){ | 96 | Button(){ |
| 95 | Text(this.time + 's 跳过') | 97 | Text(this.time + 's 跳过') |
| 96 | - // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 97 | .fontSize('27lpx') | 98 | .fontSize('27lpx') |
| 98 | .fontColor(Color.White) | 99 | .fontColor(Color.White) |
| 99 | .margin({left:'28lpx',right:'28lpx'}) | 100 | .margin({left:'28lpx',right:'28lpx'}) |
| 100 | - | ||
| 101 | } | 101 | } |
| 102 | .width('148lpx') | 102 | .width('148lpx') |
| 103 | .height('56lpx') | 103 | .height('56lpx') |
| @@ -106,13 +106,13 @@ struct LaunchAdvertisingPage { | @@ -106,13 +106,13 @@ struct LaunchAdvertisingPage { | ||
| 106 | .onClick(() => { | 106 | .onClick(() => { |
| 107 | this.enter() | 107 | this.enter() |
| 108 | this.trackingLaunchJumpOver() | 108 | this.trackingLaunchJumpOver() |
| 109 | - }) | ||
| 110 | - } | ||
| 111 | - .width('100%') | ||
| 112 | - .height('100%') | 109 | + }).margin({right:16}) |
| 110 | + | ||
| 111 | + }.margin({top:10}).width('100%').height('56lpx') | ||
| 112 | + | ||
| 113 | + Blank() | ||
| 113 | 114 | ||
| 114 | - if(this.defaultModel.screenType != '2'){ | ||
| 115 | - //底部logo样式 按钮加载在背景展示图上 | 115 | + if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){ |
| 116 | Button(){ | 116 | Button(){ |
| 117 | Row(){ | 117 | Row(){ |
| 118 | Text('点击跳转至详情') | 118 | Text('点击跳转至详情') |
| @@ -137,45 +137,24 @@ struct LaunchAdvertisingPage { | @@ -137,45 +137,24 @@ struct LaunchAdvertisingPage { | ||
| 137 | this.action() | 137 | this.action() |
| 138 | }) | 138 | }) |
| 139 | } | 139 | } |
| 140 | + if(this.defaultModel.screenType === '1') { | ||
| 141 | + Image($r('app.media.LaunchPage_logo')) | ||
| 142 | + .width('278lpx') | ||
| 143 | + .height('154lpx') | ||
| 144 | + .margin({top: '28lpx',bottom:'28lpx'}) | ||
| 140 | } | 145 | } |
| 141 | } | 146 | } |
| 142 | .width('100%') | 147 | .width('100%') |
| 143 | - .height('84%') | ||
| 144 | - .margin({top:'0'}) | ||
| 145 | - | ||
| 146 | - if(this.defaultModel.screenType === '2'){ | ||
| 147 | - //全屏样式,底部无logo 按钮放在原底部logo位置 | ||
| 148 | - Button(){ | ||
| 149 | - Row(){ | ||
| 150 | - Text('点击跳转至详情') | ||
| 151 | - .fontSize('31lpx') | ||
| 152 | - .fontColor(Color.White) | ||
| 153 | - .margin({ | ||
| 154 | - left:'55lpx' | ||
| 155 | - }) | ||
| 156 | - Image($r('app.media.Slice')) | ||
| 157 | - .width('46lpx') | ||
| 158 | - .height('46lpx') | ||
| 159 | - .margin({right:'55lpx'}) | ||
| 160 | - }.alignItems(VerticalAlign.Center) | 148 | + .height('100%') |
| 161 | } | 149 | } |
| 162 | - .width('566lpx') | ||
| 163 | - .height('111lpx') | ||
| 164 | - .margin({ | ||
| 165 | - top: '28lpx' | ||
| 166 | - }) | ||
| 167 | - .backgroundColor('#80000000') | ||
| 168 | - .onClick(()=>{ | ||
| 169 | - this.action() | ||
| 170 | - }) | ||
| 171 | - }else { | ||
| 172 | - //底部logo样式 | ||
| 173 | - Image($r('app.media.LaunchPage_logo')) | ||
| 174 | - .width('278lpx') | ||
| 175 | - .height('154lpx') | ||
| 176 | - .margin({top: '28lpx'}) | 150 | + .width('100%') |
| 151 | + .height('100%') | ||
| 177 | } | 152 | } |
| 178 | } | 153 | } |
| 154 | + .width('100%') | ||
| 155 | + .height('100%') | ||
| 156 | + .margin({top:'0'}) | ||
| 157 | + } | ||
| 179 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | 158 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 180 | .width('100%') | 159 | .width('100%') |
| 181 | .height('100%') | 160 | .height('100%') |
| @@ -230,7 +209,12 @@ struct LaunchAdvertisingPage { | @@ -230,7 +209,12 @@ struct LaunchAdvertisingPage { | ||
| 230 | this.defaultModel.screenName = dataModel.launchAdInfo[0].matInfo.advTitle | 209 | this.defaultModel.screenName = dataModel.launchAdInfo[0].matInfo.advTitle |
| 231 | this.defaultModel.durations = dataModel.launchAdInfo[0].displayDuration | 210 | this.defaultModel.durations = dataModel.launchAdInfo[0].displayDuration |
| 232 | this.defaultModel.linkUrl = dataModel.launchAdInfo[0].matInfo.linkUrl | 211 | this.defaultModel.linkUrl = dataModel.launchAdInfo[0].matInfo.linkUrl |
| 233 | - this.defaultModel.screenType = dataModel.launchAdInfo[0].matInfo.startStyle | 212 | + if (dataModel.launchAdInfo[0].matInfo.startStyle === '1') { |
| 213 | + this.defaultModel.screenType = '2' | ||
| 214 | + }else { | ||
| 215 | + this.defaultModel.screenType = '1' | ||
| 216 | + } | ||
| 217 | + | ||
| 234 | this.defaultModel.bootScreenUrl = dataModel.launchAdInfo[0].matInfo.matImageUrl[0] | 218 | this.defaultModel.bootScreenUrl = dataModel.launchAdInfo[0].matInfo.matImageUrl[0] |
| 235 | this.defaultModel.bootVideoUrl = dataModel.launchAdInfo[0].matInfo.matVideoUrl | 219 | this.defaultModel.bootVideoUrl = dataModel.launchAdInfo[0].matInfo.matVideoUrl |
| 236 | this.defaultModel.showType = dataModel.launchAdInfo[0].matInfo.matType | 220 | this.defaultModel.showType = dataModel.launchAdInfo[0].matInfo.matType |
-
Please register or login to post a comment