xugenyuan

ref |> 桌面组件相关

... ... @@ -98,6 +98,7 @@ export class NewspaperDataFetcher {
let file = fs.openSync(filePath)
fileFDs[fileName] = file.fd
data.paperInfo.localLeftImageFileName = fileName
data.paperInfo.localLeftImageFilePath = filePath
data.formImages = fileFDs
if (--donwloadCount == 0) { refreshCallback(data) }
... ... @@ -125,6 +126,7 @@ export class NewspaperDataFetcher {
let file = fs.openSync(filePath)
fileFDs[fileName] = file.fd
data.paperContents[index].localCoverFileName = fileName
data.paperContents[index].localCoverFilePath = filePath
data.formImages = fileFDs
if (--donwloadCount == 0) { refreshCallback(data) }
... ...
... ... @@ -13,6 +13,7 @@ export class FormNewspaperPaperInfo {
leftImageUrl?: string
localLeftImageFileName?: ResourceStr // 传递图片用
localLeftImageFileFD? : number // 传递图片用
localLeftImageFilePath? : string // 传递图片用
leftTitle?: string
leftDeepLink?: string
... ... @@ -24,6 +25,7 @@ export class FormNewspaperPaperContent {
coverUrl?: string
localCoverFileName?: ResourceStr // 传递图片用
localCoverFileFD? : number // 传递图片用
localCoverFilePath? : string // 传递图片用
deepLink: string = ""
}
... ...
... ... @@ -109,6 +109,7 @@ struct ContentCellView {
bottom: this.hasImage ? 0 : 6})
if (this.hasImage) {
// Image(this.content.localCoverFilePath)
Image("memory://" + this.content.localCoverFileName)
// Image(this.content.coverUrl)
.alt($r("app.media.desktop_card_comp_place_holder_3_4"))
... ...