wangliang_wd

feat:优化启动广告

... ... @@ -45,7 +45,7 @@ struct EditUserNikeNamePage {
.alignItems(VerticalAlign.Center)
Divider()
.margin(20)
.margin({ top:0,bottom:20,left:20 ,right:20 })
Row(){
Text('1、账号中(头像、昵称等)不允许含有违禁违规内容;\n2、最多16个字,只能输入中文、数字、英文字母。')
... ...
... ... @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel';
import { CommonConstants, ViewType } from 'wdConstant'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
import { ErrorComponent } from '../view/ErrorComponent'
import { CompDTO, ContentDTO, contentListParams,contentListItem } from 'wdBean'
import { CompDTO, ContentDTO, contentListParams,contentListItem, InteractDataDTO } from 'wdBean'
import NoMoreLayout from './NoMoreLayout'
import { CustomSelectUI } from '../view/CustomSelectUI';
import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
... ... @@ -16,6 +16,7 @@ import { NetworkUtil } from 'wdKit/Index';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import { TrackConstants, TrackingButton, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel';
@Entry
@Component
struct MyCollectionListPage {
... ... @@ -28,6 +29,8 @@ struct MyCollectionListPage {
@Provide deleteNum :number = 0;
@Provide isAllSelect:boolean = false
@Provide commentList: InteractDataDTO[] = []
@State currentPage: number = 1;
private scroller: Scroller = new Scroller();
emptyType: WDViewDefaultType = WDViewDefaultType.WDViewDefaultType_Default
... ... @@ -175,6 +178,10 @@ struct MyCollectionListPage {
this.allDatas.push(compDTO)
}
if (this.allDatas.length > 0){
this.getContentData()
}
if (collectionItem.hasNext === 0) {
this.browSingModel.hasMore = false;
} else {
... ... @@ -259,12 +266,28 @@ struct MyCollectionListPage {
}
}
getContentData(){
async getContentData(){
try {
// 获取列表数据
const params: contentListParams = {
contentList: []
}
this.allDatas.forEach((item: ContentDTO) => {
params.contentList.push({
contentId: item.objectId,
contentType: Number(item.objectType ?? '1')
})
})
this.commentList = await PeopleShipMainViewModel.getContentInteractInfo(params)
let datas: ContentDTO[] = [];
for (let index = 0; index < this.allDatas.length; index++) {
const compDTO = this.allDatas[index];
compDTO.isCollection = true ///用于时间展示
this.allDatas.push(compDTO)
compDTO.interactData = this.commentList[index]
datas.push(compDTO)
}
this.allDatas.push(...datas)
} catch (exception) {
}
}
}
\ No newline at end of file
... ...
... ... @@ -64,5 +64,6 @@ struct MorningEveningPaperPage {
onBackPress() {
Logger.info(TAG, 'onBackPress');
return true
}
}
\ No newline at end of file
... ...
... ... @@ -74,8 +74,11 @@ struct LaunchAdvertisingPage {
bottom: 0
})
if (this.defaultModel.isAd === '1'){
Stack({alignContent:Alignment.TopStart}){
Stack(){
Column(){
Row(){
if (this.defaultModel.isAd === '1') {
Text('广告')
.fontColor(Color.White)
.textAlign(TextAlign.Center)
... ... @@ -85,19 +88,16 @@ struct LaunchAdvertisingPage {
.borderRadius(2)
.margin({top:'15lpx',left:'19lpx'})
.backgroundColor('#80000000')
.margin({left:16})
}
.width('100%')
.height('100%')
}
Stack({alignContent:Alignment.TopEnd}){
Blank()
Button(){
Text(this.time + 's 跳过')
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.fontSize('27lpx')
.fontColor(Color.White)
.margin({left:'28lpx',right:'28lpx'})
}
.width('148lpx')
.height('56lpx')
... ... @@ -106,13 +106,13 @@ struct LaunchAdvertisingPage {
.onClick(() => {
this.enter()
this.trackingLaunchJumpOver()
})
}
.width('100%')
.height('100%')
}).margin({right:16})
}.margin({top:10}).width('100%').height('56lpx')
Blank()
if(this.defaultModel.screenType != '2'){
//底部logo样式 按钮加载在背景展示图上
if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){
Button(){
Row(){
Text('点击跳转至详情')
... ... @@ -137,45 +137,24 @@ struct LaunchAdvertisingPage {
this.action()
})
}
if(this.defaultModel.screenType === '1') {
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({top: '28lpx',bottom:'28lpx'})
}
}
.width('100%')
.height('84%')
.margin({top:'0'})
if(this.defaultModel.screenType === '2'){
//全屏样式,底部无logo 按钮放在原底部logo位置
Button(){
Row(){
Text('点击跳转至详情')
.fontSize('31lpx')
.fontColor(Color.White)
.margin({
left:'55lpx'
})
Image($r('app.media.Slice'))
.width('46lpx')
.height('46lpx')
.margin({right:'55lpx'})
}.alignItems(VerticalAlign.Center)
.height('100%')
}
.width('566lpx')
.height('111lpx')
.margin({
top: '28lpx'
})
.backgroundColor('#80000000')
.onClick(()=>{
this.action()
})
}else {
//底部logo样式
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({top: '28lpx'})
.width('100%')
.height('100%')
}
}
.width('100%')
.height('100%')
.margin({top:'0'})
}
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.width('100%')
.height('100%')
... ... @@ -230,7 +209,12 @@ struct LaunchAdvertisingPage {
this.defaultModel.screenName = dataModel.launchAdInfo[0].matInfo.advTitle
this.defaultModel.durations = dataModel.launchAdInfo[0].displayDuration
this.defaultModel.linkUrl = dataModel.launchAdInfo[0].matInfo.linkUrl
this.defaultModel.screenType = dataModel.launchAdInfo[0].matInfo.startStyle
if (dataModel.launchAdInfo[0].matInfo.startStyle === '1') {
this.defaultModel.screenType = '2'
}else {
this.defaultModel.screenType = '1'
}
this.defaultModel.bootScreenUrl = dataModel.launchAdInfo[0].matInfo.matImageUrl[0]
this.defaultModel.bootVideoUrl = dataModel.launchAdInfo[0].matInfo.matVideoUrl
this.defaultModel.showType = dataModel.launchAdInfo[0].matInfo.matType
... ...