wangliang_wd

feat:优化早晚主色取值

@@ -249,8 +249,7 @@ export struct MorningEveningPaperComponent { @@ -249,8 +249,7 @@ export struct MorningEveningPaperComponent {
249 // 图片转换为PixelMap对象 249 // 图片转换为PixelMap对象
250 // const pixelMap: image.PixelMap = await image2PixelMap(item.icon); 250 // const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
251 // console.log(TAG, "compInfoBean compStyle = " + imageUrl) 251 // console.log(TAG, "compInfoBean compStyle = " + imageUrl)
252 -  
253 - if (this.pageInfoBean.backgroundColor.length > 0){ 252 + if (this.pageInfoBean.backgroundColor.length > 0 && this.pageInfoBean.topicInfo?.frontLinkObject != undefined){
254 let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor) 253 let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor)
255 let color = ColorUtils.getMorningEveningPaperRgb({red:colorDatas[0],green:colorDatas[1],blue:colorDatas[2],alpha:1}) 254 let color = ColorUtils.getMorningEveningPaperRgb({red:colorDatas[0],green:colorDatas[1],blue:colorDatas[2],alpha:1})
256 this.mixedBgColor = "#ff" + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0'); 255 this.mixedBgColor = "#ff" + color.red.toString(16).padStart(2,'0') + color.green.toString(16).padStart(2,'0') + color.blue.toString(16).padStart(2,'0');
@@ -258,6 +257,7 @@ export struct MorningEveningPaperComponent { @@ -258,6 +257,7 @@ export struct MorningEveningPaperComponent {
258 } 257 }
259 258
260 if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) { 259 if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) {
  260 +
261 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl) 261 const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
262 this.pickColor(imageSource) 262 this.pickColor(imageSource)
263 } else { 263 } else {