chengen02

Merge remote-tracking branch 'origin/main'

... ... @@ -146,7 +146,7 @@ export struct RmhTitle {
.height(16)
}
}
Text(this.rmhInfo?.rmhDesc)
Text(this.rmhInfo?.rmhDesc.replaceAll('\n', ''))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
... ...
... ... @@ -112,6 +112,8 @@ interface picProps {
struct createImg {
@Prop fullColumnImgUrls: FullColumnImgUrlDTO[]
@State loadImg: boolean = false;
@State onePicW: number = 0; // 只有一张图时候图片的宽度
@State onePicH: number = 0; // 只有一张图时候图片的高度
async aboutToAppear(): Promise<void> {
if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
... ... @@ -177,7 +179,7 @@ struct createImg {
Image(this.loadImg ? item.fullUrl || item.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(172)
.height(198)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType(item.weight, item.height) === 2) {
... ... @@ -215,14 +217,18 @@ struct createImg {
}
} else {
GridCol({
span: item.landscape === 1 ? 12 : 8
span: this.onePicW > this.onePicH ? 12 : 8
}) {
Image(this.loadImg ? item.fullUrl : '')
.backgroundColor(0xf5f5f5)
.aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305)
.aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
.opacity(!item.weight && !item.height ? 0 : 1)
.onComplete((event?) => {
this.onePicW = event?.width || 0;
this.onePicH = event?.height || 0;
})
}
}
} else if (this.fullColumnImgUrls.length === 4) {
... ...
... ... @@ -401,7 +401,7 @@ export struct ZhSingleRow03 {
.fontWeight(600)
}
if (this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') {
if (!(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
... ...
... ... @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout {
aboutToAppear() {
this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]
this.myChannelList.forEach(item=>{
this.myChannelList.forEach(item => {
this.channelIds.push(item.channelId)
})
}
... ... @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout {
this.channelIds.splice(index2, 0, channelIdTmp[0])
AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
}
//删除频道
delChannelItem(index: number){
delChannelItem(index: number) {
let item = this.myChannelList.splice(index, 1)[0]
this.channelIds.splice(index, 1)
AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds))
... ... @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout {
this.localChannelList.unshift(item)
}
}
// 添加频道
addChannelItem(item: TopNavDTO){
addChannelItem(item: TopNavDTO) {
this.channelIds.push(item.channelId)
this.myChannelList.push(item)
AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
... ... @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout {
}
.width('23%')
.height(40)
.borderRadius(3)
.border({
width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1,
color: '#EDEDED',
width: 0.7,
color: item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#EDEDED',
radius: 3
})
.zIndex(this.dragItem == item.num ? 1 : 0)
... ... @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout {
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
width: 0.7,
color: '#EDEDED',
radius: 3
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
... ... @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout {
.width(80)
.height(40)
.border({
width: 1,
color: '#EDEDED'
width: 0.7,
color: '#EDEDED',
radius: 3
})
}, (item: TopNavDTO) => JSON.stringify(item))
}
... ...
... ... @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew {
moreChannelList: $moreChannelList,
localChannelList: $localChannelList,
changeTab: (index) => {
this.changePage(index)
}
})
... ...
... ... @@ -50,6 +50,16 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
... ... @@ -61,9 +71,24 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
Row() {
... ... @@ -87,19 +112,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.width(14)
.height(14)
}
.visibility(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '' ? Visibility.None : Visibility.Visible)
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.onClick(() => {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
this.liveToMore();
})
}.justifyContent(FlexAlign.SpaceBetween)
... ... @@ -141,7 +156,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
})
}
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
... ...
... ... @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent {
this.loadImg = await onlyWifiLoadImg();
}
showMore() {
return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
... ... @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent {
.fontWeight(600)
}
if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') {
if (this.showMore()) {
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
... ... @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent {
})
})
}
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
... ...
... ... @@ -125,7 +125,6 @@ export struct TopPlayComponent {
} else {
Logger.debug(TAG, `---0------>${playUrl}`)
if (StringUtils.isNotEmpty(playUrl)) {
Logger.debug(TAG, `---isNotEmpty------>`)
this.playUrl = playUrl
this.tryToPlay()
}
... ... @@ -152,8 +151,8 @@ export struct TopPlayComponent {
this.previewUrl = ''
}
}
Logger.debug(TAG,
`---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource)
// Logger.debug(TAG,
// `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource)
}
tryToPlay() {
... ...
... ... @@ -74,7 +74,10 @@ struct ForgetPasswordPage {
})
}.padding({ left: 25, right: 25 }).width('100%')
}.width('100%').height('100%').alignItems(HorizontalAlign.Start)
}.width('100%')
.height('100%')
.alignItems(HorizontalAlign.Start)
.backgroundColor(Color.White)
}
aboutToAppear() {
... ...
... ... @@ -241,7 +241,8 @@ struct LoginPage {
.visibility(this.isProtocol ? Visibility.Visible : Visibility.None)
}.width('100%')
.height('100%').backgroundColor(Color.White)
.height('100%')
.backgroundColor(Color.White)
}
@Builder
... ... @@ -280,6 +281,7 @@ struct LoginPage {
.width('100%')
}.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 })
.visibility(this.checkCodePage ? Visibility.None : Visibility.Visible)
.backgroundColor(Color.White)
}
... ...