wangliang_wd

feat:优化早晚主色取值

... ... @@ -249,8 +249,7 @@ export struct MorningEveningPaperComponent {
// 图片转换为PixelMap对象
// const pixelMap: image.PixelMap = await image2PixelMap(item.icon);
// console.log(TAG, "compInfoBean compStyle = " + imageUrl)
if (this.pageInfoBean.backgroundColor.length > 0){
if (this.pageInfoBean.backgroundColor.length > 0 && this.pageInfoBean.topicInfo?.frontLinkObject != undefined){
let colorDatas = ColorUtils.hexColorValueToRGB(this.pageInfoBean.backgroundColor)
let color = ColorUtils.getMorningEveningPaperRgb({red:colorDatas[0],green:colorDatas[1],blue:colorDatas[2],alpha:1})
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 {
}
if (imageUrl.length > 0 && this.pageInfoBean.topicInfo.frontFlag === 1) {
const imageSource: image.ImageSource | undefined = await getPicture(imageUrl)
this.pickColor(imageSource)
} else {
... ...