wangliang_wd

feat:优化接口判断

... ... @@ -23,9 +23,6 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel
import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel'
import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import {TrackConstants,TrackParamConvert}from 'wdTracking/Index'
import { ColorHsv, ColorRgb, ColorUtils } from '../../utils/ColorUtils';
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
... ... @@ -245,7 +242,7 @@ export struct MorningEveningPaperComponent {
if (imageSource) {
const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
let color = colorPicker.getLargestProportionColor();
let color = colorPicker.getMainColorSync();
console.log(TAG, "compInfoBean compStyle = " + color)
// color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
// 将取色器选取的color示例转换为十六进制颜色代码
... ...
... ... @@ -68,7 +68,7 @@ export struct LikeComponent {
onDataUpdated() {
console.log(TAG, '点赞点击')
if (this.data) {
if (this.data['contentType'] !== 'undefined') {
if (this.data['contentType'] !== undefined ) {
//获取点赞状态
this.getLikeStatus()
//获取点赞数
... ...
... ... @@ -149,7 +149,6 @@ export struct OperRowListView {
if(this.contentDetailData.userInfo?.userName) {
this.likeBean['userName'] = this.contentDetailData.userInfo?.userName + ''
}
this.likeBean['contentType'] = this.contentDetailData.newsType + ''
if(this.contentDetailData.newsTitle) {
this.likeBean['title'] = this.contentDetailData.newsTitle + ''
}
... ... @@ -165,6 +164,9 @@ export struct OperRowListView {
if(this.contentDetailData?.reLInfo?.relId) {
this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
}
this.likeBean['contentType'] = this.contentDetailData.newsType + ''
console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen))
console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
... ...