xugenyuan

ref |> 桌面组件相关

@@ -98,6 +98,7 @@ export class NewspaperDataFetcher { @@ -98,6 +98,7 @@ export class NewspaperDataFetcher {
98 let file = fs.openSync(filePath) 98 let file = fs.openSync(filePath)
99 fileFDs[fileName] = file.fd 99 fileFDs[fileName] = file.fd
100 data.paperInfo.localLeftImageFileName = fileName 100 data.paperInfo.localLeftImageFileName = fileName
  101 + data.paperInfo.localLeftImageFilePath = filePath
101 data.formImages = fileFDs 102 data.formImages = fileFDs
102 103
103 if (--donwloadCount == 0) { refreshCallback(data) } 104 if (--donwloadCount == 0) { refreshCallback(data) }
@@ -125,6 +126,7 @@ export class NewspaperDataFetcher { @@ -125,6 +126,7 @@ export class NewspaperDataFetcher {
125 let file = fs.openSync(filePath) 126 let file = fs.openSync(filePath)
126 fileFDs[fileName] = file.fd 127 fileFDs[fileName] = file.fd
127 data.paperContents[index].localCoverFileName = fileName 128 data.paperContents[index].localCoverFileName = fileName
  129 + data.paperContents[index].localCoverFilePath = filePath
128 data.formImages = fileFDs 130 data.formImages = fileFDs
129 131
130 if (--donwloadCount == 0) { refreshCallback(data) } 132 if (--donwloadCount == 0) { refreshCallback(data) }
@@ -13,6 +13,7 @@ export class FormNewspaperPaperInfo { @@ -13,6 +13,7 @@ export class FormNewspaperPaperInfo {
13 leftImageUrl?: string 13 leftImageUrl?: string
14 localLeftImageFileName?: ResourceStr // 传递图片用 14 localLeftImageFileName?: ResourceStr // 传递图片用
15 localLeftImageFileFD? : number // 传递图片用 15 localLeftImageFileFD? : number // 传递图片用
  16 + localLeftImageFilePath? : string // 传递图片用
16 leftTitle?: string 17 leftTitle?: string
17 leftDeepLink?: string 18 leftDeepLink?: string
18 19
@@ -24,6 +25,7 @@ export class FormNewspaperPaperContent { @@ -24,6 +25,7 @@ export class FormNewspaperPaperContent {
24 coverUrl?: string 25 coverUrl?: string
25 localCoverFileName?: ResourceStr // 传递图片用 26 localCoverFileName?: ResourceStr // 传递图片用
26 localCoverFileFD? : number // 传递图片用 27 localCoverFileFD? : number // 传递图片用
  28 + localCoverFilePath? : string // 传递图片用
27 deepLink: string = "" 29 deepLink: string = ""
28 } 30 }
29 31
@@ -109,6 +109,7 @@ struct ContentCellView { @@ -109,6 +109,7 @@ struct ContentCellView {
109 bottom: this.hasImage ? 0 : 6}) 109 bottom: this.hasImage ? 0 : 6})
110 110
111 if (this.hasImage) { 111 if (this.hasImage) {
  112 + // Image(this.content.localCoverFilePath)
112 Image("memory://" + this.content.localCoverFileName) 113 Image("memory://" + this.content.localCoverFileName)
113 // Image(this.content.coverUrl) 114 // Image(this.content.coverUrl)
114 .alt($r("app.media.desktop_card_comp_place_holder_3_4")) 115 .alt($r("app.media.desktop_card_comp_place_holder_3_4"))