Showing
4 changed files
with
107 additions
and
99 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(){ | ||
| 263 | - for (let index = 0; index < this.allDatas.length; index++) { | ||
| 264 | - const compDTO = this.allDatas[index]; | ||
| 265 | - compDTO.isCollection = true ///用于时间展示 | ||
| 266 | - this.allDatas.push(compDTO) | 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[] = []; | ||
| 284 | + for (let index = 0; index < this.allDatas.length; index++) { | ||
| 285 | + const compDTO = this.allDatas[index]; | ||
| 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,107 +74,86 @@ struct LaunchAdvertisingPage { | @@ -74,107 +74,86 @@ struct LaunchAdvertisingPage { | ||
| 74 | bottom: 0 | 74 | bottom: 0 |
| 75 | }) | 75 | }) |
| 76 | 76 | ||
| 77 | - if (this.defaultModel.isAd === '1'){ | ||
| 78 | - Stack({alignContent:Alignment.TopStart}){ | ||
| 79 | - Text('广告') | ||
| 80 | - .fontColor(Color.White) | ||
| 81 | - .textAlign(TextAlign.Center) | ||
| 82 | - .fontSize('24lpx') | ||
| 83 | - .width('72lpx') | ||
| 84 | - .height('36lpx') | ||
| 85 | - .borderRadius(2) | ||
| 86 | - .margin({top:'15lpx',left:'19lpx'}) | 77 | + |
| 78 | + Stack(){ | ||
| 79 | + Column(){ | ||
| 80 | + Row(){ | ||
| 81 | + if (this.defaultModel.isAd === '1') { | ||
| 82 | + Text('广告') | ||
| 83 | + .fontColor(Color.White) | ||
| 84 | + .textAlign(TextAlign.Center) | ||
| 85 | + .fontSize('24lpx') | ||
| 86 | + .width('72lpx') | ||
| 87 | + .height('36lpx') | ||
| 88 | + .borderRadius(2) | ||
| 89 | + .margin({top:'15lpx',left:'19lpx'}) | ||
| 90 | + .backgroundColor('#80000000') | ||
| 91 | + .margin({left:16}) | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + Blank() | ||
| 95 | + | ||
| 96 | + Button(){ | ||
| 97 | + Text(this.time + 's 跳过') | ||
| 98 | + .fontSize('27lpx') | ||
| 99 | + .fontColor(Color.White) | ||
| 100 | + .margin({left:'28lpx',right:'28lpx'}) | ||
| 101 | + } | ||
| 102 | + .width('148lpx') | ||
| 103 | + .height('56lpx') | ||
| 104 | + .margin({top:'10lpx',right:'19lpx'}) | ||
| 105 | + .backgroundColor('#80000000') | ||
| 106 | + .onClick(() => { | ||
| 107 | + this.enter() | ||
| 108 | + this.trackingLaunchJumpOver() | ||
| 109 | + }).margin({right:16}) | ||
| 110 | + | ||
| 111 | + }.margin({top:10}).width('100%').height('56lpx') | ||
| 112 | + | ||
| 113 | + Blank() | ||
| 114 | + | ||
| 115 | + if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){ | ||
| 116 | + Button(){ | ||
| 117 | + Row(){ | ||
| 118 | + Text('点击跳转至详情') | ||
| 119 | + .fontSize('31lpx') | ||
| 120 | + .fontColor(Color.White) | ||
| 121 | + .margin({ | ||
| 122 | + left:'55lpx' | ||
| 123 | + }) | ||
| 124 | + Image($r('app.media.Slice')) | ||
| 125 | + .width('46lpx') | ||
| 126 | + .height('46lpx') | ||
| 127 | + .margin({right:'55lpx'}) | ||
| 128 | + }.alignItems(VerticalAlign.Center) | ||
| 129 | + } | ||
| 130 | + .width('566lpx') | ||
| 131 | + .height('111lpx') | ||
| 132 | + .margin({ | ||
| 133 | + bottom: '51lpx' | ||
| 134 | + }) | ||
| 87 | .backgroundColor('#80000000') | 135 | .backgroundColor('#80000000') |
| 136 | + .onClick(()=>{ | ||
| 137 | + this.action() | ||
| 138 | + }) | ||
| 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'}) | ||
| 145 | + } | ||
| 88 | } | 146 | } |
| 89 | .width('100%') | 147 | .width('100%') |
| 90 | .height('100%') | 148 | .height('100%') |
| 91 | } | 149 | } |
| 92 | - | ||
| 93 | - Stack({alignContent:Alignment.TopEnd}){ | ||
| 94 | - Button(){ | ||
| 95 | - Text(this.time + 's 跳过') | ||
| 96 | - // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 97 | - .fontSize('27lpx') | ||
| 98 | - .fontColor(Color.White) | ||
| 99 | - .margin({left:'28lpx',right:'28lpx'}) | ||
| 100 | - | ||
| 101 | - } | ||
| 102 | - .width('148lpx') | ||
| 103 | - .height('56lpx') | ||
| 104 | - .margin({top:'10lpx',right:'19lpx'}) | ||
| 105 | - .backgroundColor('#80000000') | ||
| 106 | - .onClick(() => { | ||
| 107 | - this.enter() | ||
| 108 | - this.trackingLaunchJumpOver() | ||
| 109 | - }) | ||
| 110 | - } | ||
| 111 | .width('100%') | 150 | .width('100%') |
| 112 | .height('100%') | 151 | .height('100%') |
| 113 | - | ||
| 114 | - if(this.defaultModel.screenType != '2'){ | ||
| 115 | - //底部logo样式 按钮加载在背景展示图上 | ||
| 116 | - Button(){ | ||
| 117 | - Row(){ | ||
| 118 | - Text('点击跳转至详情') | ||
| 119 | - .fontSize('31lpx') | ||
| 120 | - .fontColor(Color.White) | ||
| 121 | - .margin({ | ||
| 122 | - left:'55lpx' | ||
| 123 | - }) | ||
| 124 | - Image($r('app.media.Slice')) | ||
| 125 | - .width('46lpx') | ||
| 126 | - .height('46lpx') | ||
| 127 | - .margin({right:'55lpx'}) | ||
| 128 | - }.alignItems(VerticalAlign.Center) | ||
| 129 | - } | ||
| 130 | - .width('566lpx') | ||
| 131 | - .height('111lpx') | ||
| 132 | - .margin({ | ||
| 133 | - bottom: '51lpx' | ||
| 134 | - }) | ||
| 135 | - .backgroundColor('#80000000') | ||
| 136 | - .onClick(()=>{ | ||
| 137 | - this.action() | ||
| 138 | - }) | ||
| 139 | - } | ||
| 140 | } | 152 | } |
| 141 | } | 153 | } |
| 142 | .width('100%') | 154 | .width('100%') |
| 143 | - .height('84%') | 155 | + .height('100%') |
| 144 | .margin({top:'0'}) | 156 | .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) | ||
| 161 | - } | ||
| 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'}) | ||
| 177 | - } | ||
| 178 | } | 157 | } |
| 179 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | 158 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 180 | .width('100%') | 159 | .width('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