Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
陈剑华
2024-05-18 14:47:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2d165c90a5741d23ad2254c2b0998f3a1fe4eee5
2d165c90
1 parent
cbe3a8c3
feat: 17448 功能缺陷--地方频道下的人民号动态多图无法打开指定位置的图片
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
2d165c9
...
...
@@ -62,20 +62,7 @@ export struct Card19Component {
}
// 图片-从无图到9图展示
createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls })
.onClick(() => {
const photoList: PhotoListBean[] = this.contentDTO.fullColumnImgUrls.map(item => {
const photo: PhotoListBean = {
width: item.weight,
height: item.height,
picPath: item.fullUrl||item.url,
picDesc: '',
itemType:2,
id:0
}
return photo
})
ProcessUtils.gotoMultiPictureListPage(photoList, 0)
})
CarderInteraction({ contentDTO: this.contentDTO })
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
...
...
@@ -107,12 +94,12 @@ struct createImg {
@State loadImg: boolean = false;
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位
this.fullColumnImgUrls.splice(2, 0, {
fullUrl: ''
} as FullColumnImgUrlDTO)
}
this.loadImg = await onlyWifiLoadImg();
console.log('card19-this.fullColumnImgUrls',JSON.stringify(this.fullColumnImgUrls))
}
...
...
@@ -167,14 +154,14 @@ struct createImg {
alignContent: Alignment.BottomEnd
}) {
if (this.getPicType() === 1) {
Image(this.loadImg ? item.fullUrl
||
item.url : '')
Image(this.loadImg ? item.fullUrl
||
item.url : '')
.backgroundColor(0xf5f5f5)
.width('100%')
.height(172)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
} else if (this.getPicType() === 2) {
Image(this.loadImg ? item.fullUrl
||
item.url : '')
Image(this.loadImg ? item.fullUrl
||
item.url : '')
.width('100%')
.height(305)
.autoResize(true)
...
...
@@ -291,6 +278,20 @@ struct createImg {
.padding({ bottom: 3 })
}
}
.onClick(() => {
const photoList: PhotoListBean[] = this.fullColumnImgUrls.map(item => {
const photo: PhotoListBean = {
width: item.weight,
height: item.height,
picPath: item.fullUrl||item.url,
picDesc: '',
itemType:2,
id:0
}
return photo
})
ProcessUtils.gotoMultiPictureListPage(photoList, index)
})
}
}
})
...
...
Please
register
or
login
to post a comment