wangliang_wd

feat:优化接口判断

@@ -23,9 +23,6 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel @@ -23,9 +23,6 @@ import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel
23 import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel' 23 import { AudioSuspensionModel } from '../../viewmodel/AudioSuspensionModel'
24 import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare' 24 import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare'
25 import { common } from '@kit.AbilityKit'; 25 import { common } from '@kit.AbilityKit';
26 -import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'  
27 -import {TrackConstants,TrackParamConvert}from 'wdTracking/Index'  
28 -import { ColorHsv, ColorRgb, ColorUtils } from '../../utils/ColorUtils';  
29 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; 26 import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
30 import { EmitterEventId, EmitterUtils } from 'wdKit/Index' 27 import { EmitterEventId, EmitterUtils } from 'wdKit/Index'
31 28
@@ -245,7 +242,7 @@ export struct MorningEveningPaperComponent { @@ -245,7 +242,7 @@ export struct MorningEveningPaperComponent {
245 if (imageSource) { 242 if (imageSource) {
246 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); 243 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
247 effectKit.createColorPicker(pixelMap, (err, colorPicker) => { 244 effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
248 - let color = colorPicker.getLargestProportionColor(); 245 + let color = colorPicker.getMainColorSync();
249 console.log(TAG, "compInfoBean compStyle = " + color) 246 console.log(TAG, "compInfoBean compStyle = " + color)
250 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) 247 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
251 // 将取色器选取的color示例转换为十六进制颜色代码 248 // 将取色器选取的color示例转换为十六进制颜色代码
@@ -68,7 +68,7 @@ export struct LikeComponent { @@ -68,7 +68,7 @@ export struct LikeComponent {
68 onDataUpdated() { 68 onDataUpdated() {
69 console.log(TAG, '点赞点击') 69 console.log(TAG, '点赞点击')
70 if (this.data) { 70 if (this.data) {
71 - if (this.data['contentType'] !== 'undefined') { 71 + if (this.data['contentType'] !== undefined ) {
72 //获取点赞状态 72 //获取点赞状态
73 this.getLikeStatus() 73 this.getLikeStatus()
74 //获取点赞数 74 //获取点赞数
@@ -149,7 +149,6 @@ export struct OperRowListView { @@ -149,7 +149,6 @@ export struct OperRowListView {
149 if(this.contentDetailData.userInfo?.userName) { 149 if(this.contentDetailData.userInfo?.userName) {
150 this.likeBean['userName'] = this.contentDetailData.userInfo?.userName + '' 150 this.likeBean['userName'] = this.contentDetailData.userInfo?.userName + ''
151 } 151 }
152 - this.likeBean['contentType'] = this.contentDetailData.newsType + ''  
153 if(this.contentDetailData.newsTitle) { 152 if(this.contentDetailData.newsTitle) {
154 this.likeBean['title'] = this.contentDetailData.newsTitle + '' 153 this.likeBean['title'] = this.contentDetailData.newsTitle + ''
155 } 154 }
@@ -165,6 +164,9 @@ export struct OperRowListView { @@ -165,6 +164,9 @@ export struct OperRowListView {
165 if(this.contentDetailData?.reLInfo?.relId) { 164 if(this.contentDetailData?.reLInfo?.relId) {
166 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + '' 165 this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
167 } 166 }
  167 +
  168 + this.likeBean['contentType'] = this.contentDetailData.newsType + ''
  169 +
168 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData)) 170 console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
169 console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen)) 171 console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen))
170 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean)) 172 console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))