王士厅
@@ -84,6 +84,7 @@ export struct DynamicDetailComponent { @@ -84,6 +84,7 @@ export struct DynamicDetailComponent {
84 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 84 @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
85 @State offsetY: number = 0 85 @State offsetY: number = 0
86 @State isScrollTop: boolean = true 86 @State isScrollTop: boolean = true
  87 + @State executedStartTime: number = new Date().getTime()
87 88
88 pageParam: ParamType = {} 89 pageParam: ParamType = {}
89 commentListAreaInfo?: Area 90 commentListAreaInfo?: Area
@@ -118,7 +119,9 @@ export struct DynamicDetailComponent { @@ -118,7 +119,9 @@ export struct DynamicDetailComponent {
118 }) 119 })
119 120
120 } 121 }
121 - 122 + aboutToDisappear() {
  123 + this.viewBlogInsightIntentShare()
  124 + }
122 onPageHide() { 125 onPageHide() {
123 126
124 } 127 }
@@ -675,7 +678,6 @@ export struct DynamicDetailComponent { @@ -675,7 +678,6 @@ export struct DynamicDetailComponent {
675 this.getInteractDataStatus() 678 this.getInteractDataStatus()
676 this.makeJumpInfo() 679 this.makeJumpInfo()
677 this.interactDataV2() 680 this.interactDataV2()
678 - this.viewBlogInsightIntentShare()  
679 681
680 this.pageParam = { 682 this.pageParam = {
681 'contentType': `${this.contentDetailData.newsType}`, 683 'contentType': `${this.contentDetailData.newsType}`,
@@ -858,7 +860,7 @@ export struct DynamicDetailComponent { @@ -858,7 +860,7 @@ export struct DynamicDetailComponent {
858 */ 860 */
859 private viewBlogInsightIntentShare(){ 861 private viewBlogInsightIntentShare(){
860 let context = getContext(this) as common.UIAbilityContext; 862 let context = getContext(this) as common.UIAbilityContext;
861 - viewBlogItemInsightIntentShare(context,this.contentDetailData, this.interactDataDTO) 863 + viewBlogItemInsightIntentShare(this.executedStartTime, context,this.contentDetailData, this.interactDataDTO)
862 } 864 }
863 865
864 checkToScrollCommentArea() { 866 checkToScrollCommentArea() {
@@ -64,6 +64,7 @@ export struct ImageAndTextPageComponent { @@ -64,6 +64,7 @@ export struct ImageAndTextPageComponent {
64 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 64 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
65 @State isScrollTop: boolean = true 65 @State isScrollTop: boolean = true
66 @State offsetY: number = 0 66 @State offsetY: number = 0
  67 + @State executedStartTime: number = new Date().getTime()
67 pageShowTime:number = 0; 68 pageShowTime:number = 0;
68 pageHideTime:number = 0; 69 pageHideTime:number = 0;
69 lastTimeoutId?: number 70 lastTimeoutId?: number
@@ -324,9 +325,6 @@ export struct ImageAndTextPageComponent { @@ -324,9 +325,6 @@ export struct ImageAndTextPageComponent {
324 } else { 325 } else {
325 this.operationButtonList = ['comment', 'collect', 'share'] 326 this.operationButtonList = ['comment', 'collect', 'share']
326 } 327 }
327 -  
328 - //意图上报  
329 - this.viewBlogInsightIntentShare()  
330 } 328 }
331 } 329 }
332 } 330 }
@@ -334,7 +332,7 @@ export struct ImageAndTextPageComponent { @@ -334,7 +332,7 @@ export struct ImageAndTextPageComponent {
334 //意图上报 332 //意图上报
335 private viewBlogInsightIntentShare() { 333 private viewBlogInsightIntentShare() {
336 let context = getContext(this) as common.UIAbilityContext; 334 let context = getContext(this) as common.UIAbilityContext;
337 - viewBlogItemInsightIntentShare(context, this.contentDetailData, this.interactData) 335 + viewBlogItemInsightIntentShare(this.executedStartTime, context, this.contentDetailData, this.interactData)
338 } 336 }
339 337
340 private async getRecommend() { 338 private async getRecommend() {
@@ -463,6 +461,8 @@ export struct ImageAndTextPageComponent { @@ -463,6 +461,8 @@ export struct ImageAndTextPageComponent {
463 } 461 }
464 462
465 aboutToDisappear() { 463 aboutToDisappear() {
  464 + //意图上报
  465 + this.viewBlogInsightIntentShare()
466 } 466 }
467 467
468 checkToScrollCommentArea() { 468 checkToScrollCommentArea() {
@@ -122,12 +122,6 @@ export struct MorningEveningPaperComponent { @@ -122,12 +122,6 @@ export struct MorningEveningPaperComponent {
122 } 122 }
123 123
124 async aboutToAppear() { 124 async aboutToAppear() {
125 - // let windowHight: window.Window = await window.getLastWindow(getContext(this));  
126 - // await windowHight.setWindowLayoutFullScreen(true);  
127 - // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })  
128 - // this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)  
129 - // this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)  
130 -  
131 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String 125 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
132 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) 126 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
133 const currentTime = new Date().getTime() 127 const currentTime = new Date().getTime()
@@ -238,12 +232,6 @@ export struct MorningEveningPaperComponent { @@ -238,12 +232,6 @@ export struct MorningEveningPaperComponent {
238 private async pickColor(imageSource: image.ImageSource | undefined) { 232 private async pickColor(imageSource: image.ImageSource | undefined) {
239 if (imageSource) { 233 if (imageSource) {
240 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); 234 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
241 - // let allPixels: number[] = await traverseAllPixel(pixelMap);  
242 - // let maxPixel: number = findMaxPixel(allPixels);  
243 - // let rgb: ColorRgb = ColorUtils.numberToRgb(maxPixel);  
244 - // let hsv: ColorHsv = ColorUtils.rgb2hsv(rgb);  
245 - // rgb = ColorUtils.hsv2rgb(hsv);  
246 - // this.mixedBgColor = "#" + rgb.red.toString(16) + rgb.green.toString(16) + rgb.blue.toString(16);  
247 effectKit.createColorPicker(pixelMap, (err, colorPicker) => { 235 effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
248 let color = colorPicker.getLargestProportionColor(); 236 let color = colorPicker.getLargestProportionColor();
249 console.log(TAG, "compInfoBean compStyle = " + color) 237 console.log(TAG, "compInfoBean compStyle = " + color)
@@ -256,9 +244,6 @@ export struct MorningEveningPaperComponent { @@ -256,9 +244,6 @@ export struct MorningEveningPaperComponent {
256 } 244 }
257 245
258 async aboutToDisappear() { 246 async aboutToDisappear() {
259 - // let windowHight: window.Window = await window.getLastWindow(getContext(this));  
260 - // await windowHight.setWindowLayoutFullScreen(false);  
261 - // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })  
262 } 247 }
263 248
264 onPageHide() { 249 onPageHide() {
1 -import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO, TopicInfo,TopicDetailData,ShareInfoDTO } from 'wdBean'; 1 +import {
  2 + Action,
  3 + H5ReceiveDetailBean,
  4 + ContentDetailDTO,
  5 + InteractDataDTO,
  6 + TopicInfo,
  7 + TopicDetailData,
  8 + ShareInfoDTO
  9 +} from 'wdBean';
2 import { WdWebComponent } from 'wdWebComponent'; 10 import { WdWebComponent } from 'wdWebComponent';
3 import { CommonConstants } from 'wdConstant' 11 import { CommonConstants } from 'wdConstant'
4 import { BridgeWebViewControl } from 'wdJsBridge/Index'; 12 import { BridgeWebViewControl } from 'wdJsBridge/Index';
@@ -7,7 +15,7 @@ import { OperRowListView } from './view/OperRowListView'; @@ -7,7 +15,7 @@ import { OperRowListView } from './view/OperRowListView';
7 import DetailViewModel from '../viewmodel/DetailViewModel'; 15 import DetailViewModel from '../viewmodel/DetailViewModel';
8 import { publishCommentModel } from '../components/comment/model/PublishCommentModel'; 16 import { publishCommentModel } from '../components/comment/model/PublishCommentModel';
9 import { EmptyComponent } from '../components/view/EmptyComponent'; 17 import { EmptyComponent } from '../components/view/EmptyComponent';
10 -import { NetworkUtil, WindowModel,Logger } from 'wdKit'; 18 +import { NetworkUtil, WindowModel, Logger } from 'wdKit';
11 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' 19 import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
12 import { common } from '@kit.AbilityKit'; 20 import { common } from '@kit.AbilityKit';
13 import { PageRepository } from '../repository/PageRepository'; 21 import { PageRepository } from '../repository/PageRepository';
@@ -45,6 +53,7 @@ export struct SpacialTopicPageComponent { @@ -45,6 +53,7 @@ export struct SpacialTopicPageComponent {
45 @State topicDetail: TopicDetailData = {} as TopicDetailData 53 @State topicDetail: TopicDetailData = {} as TopicDetailData
46 @State shareInfo: ShareInfoDTO = {} as ShareInfoDTO 54 @State shareInfo: ShareInfoDTO = {} as ShareInfoDTO
47 @State showBottomView: boolean = false; 55 @State showBottomView: boolean = false;
  56 + @State executedStartTime: number = new Date().getTime()
48 57
49 private trySendData2H5() { 58 private trySendData2H5() {
50 if (!this.webPrepared) { 59 if (!this.webPrepared) {
@@ -60,24 +69,24 @@ export struct SpacialTopicPageComponent { @@ -60,24 +69,24 @@ export struct SpacialTopicPageComponent {
60 } 69 }
61 70
62 private sendContentData2H5(h5ReceiveAppData: H5ReceiveDetailBean) { 71 private sendContentData2H5(h5ReceiveAppData: H5ReceiveDetailBean) {
63 - Logger.debug('SpacialTopicPageComponent', 'jsCall_receiveAppData',JSON.stringify(h5ReceiveAppData)); 72 + Logger.debug('SpacialTopicPageComponent', 'jsCall_receiveAppData', JSON.stringify(h5ReceiveAppData));
64 this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData, 73 this.webviewControl.callHandle(NativeCallH5Type.jsCall_receiveAppData,
65 JSON.stringify(h5ReceiveAppData), (data: string) => { 74 JSON.stringify(h5ReceiveAppData), (data: string) => {
66 Logger.debug('SpacialTopicPageComponent', "from js data = " + data); 75 Logger.debug('SpacialTopicPageComponent', "from js data = " + data);
67 }) 76 })
68 } 77 }
69 78
70 - private receiveH5SendToNativeData(dataString:string | undefined) { 79 + private receiveH5SendToNativeData(dataString: string | undefined) {
71 // this.topicDetail = JSON.parse(dataString); 80 // this.topicDetail = JSON.parse(dataString);
72 if (dataString == undefined) { 81 if (dataString == undefined) {
73 return 82 return
74 } 83 }
75 - Logger.debug('SpacialTopicPageComponent111',dataString); 84 + Logger.debug('SpacialTopicPageComponent111', dataString);
76 85
77 this.topicDetail = JSON.parse(dataString); 86 this.topicDetail = JSON.parse(dataString);
78 this.topicInfo = this.topicDetail.topicInfo; 87 this.topicInfo = this.topicDetail.topicInfo;
79 88
80 - if(this.topicInfo){ 89 + if (this.topicInfo) {
81 // 转换详情数据 90 // 转换详情数据
82 this.contentDetailData.openComment = Number(this.topicInfo.commentFlag) 91 this.contentDetailData.openComment = Number(this.topicInfo.commentFlag)
83 this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag) 92 this.contentDetailData.commentDisplay = Number(this.topicInfo.commentShowFlag)
@@ -94,7 +103,7 @@ export struct SpacialTopicPageComponent { @@ -94,7 +103,7 @@ export struct SpacialTopicPageComponent {
94 this.shareInfo.shareSummary = this.topicInfo.shareSummary 103 this.shareInfo.shareSummary = this.topicInfo.shareSummary
95 this.shareInfo.shareTitle = this.topicInfo.shareTitle 104 this.shareInfo.shareTitle = this.topicInfo.shareTitle
96 this.shareInfo.shareUrl = this.topicInfo.shareUrl 105 this.shareInfo.shareUrl = this.topicInfo.shareUrl
97 - this.contentDetailData.shareInfo = this.shareInfo 106 + this.contentDetailData.shareInfo = this.shareInfo
98 107
99 console.log('contentDetailData111', JSON.stringify(this.contentDetailData)) 108 console.log('contentDetailData111', JSON.stringify(this.contentDetailData))
100 // if(this.topicInfo.shareOpen === 1){ 109 // if(this.topicInfo.shareOpen === 1){
@@ -121,9 +130,9 @@ export struct SpacialTopicPageComponent { @@ -121,9 +130,9 @@ export struct SpacialTopicPageComponent {
121 } 130 }
122 131
123 //意图上报 132 //意图上报
124 - private viewBlogInsightIntentShare(){ 133 + private viewBlogInsightIntentShare() {
125 let context = getContext(this) as common.UIAbilityContext; 134 let context = getContext(this) as common.UIAbilityContext;
126 - viewBlogItemInsightIntentShare(context,this.contentDetailData) 135 + viewBlogItemInsightIntentShare(this.executedStartTime, context, this.contentDetailData)
127 } 136 }
128 137
129 build() { 138 build() {
@@ -158,23 +167,23 @@ export struct SpacialTopicPageComponent { @@ -158,23 +167,23 @@ export struct SpacialTopicPageComponent {
158 emptyButton: true, 167 emptyButton: true,
159 retry: () => { 168 retry: () => {
160 // this.getDetail() 169 // this.getDetail()
161 - this.reload ++ 170 + this.reload++
162 } 171 }
163 }).padding({ bottom: 200 }) 172 }).padding({ bottom: 200 })
164 } else { 173 } else {
165 if (!this.isPageEnd) { 174 if (!this.isPageEnd) {
166 - channelSkeleton().padding({ top:`${this.topSafeHeight}px`,bottom: this.bottomSafeHeight }) 175 + channelSkeleton().padding({ top: `${this.topSafeHeight}px`, bottom: this.bottomSafeHeight })
167 } 176 }
168 } 177 }
169 //底部交互区 178 //底部交互区
170 - if (this.showBottomView){ 179 + if (this.showBottomView) {
171 OperRowListView({ 180 OperRowListView({
172 contentDetailData: this.contentDetailData, 181 contentDetailData: this.contentDetailData,
173 publishCommentModel: this.publishCommentModel, 182 publishCommentModel: this.publishCommentModel,
174 operationButtonList: this.operationButtonList, 183 operationButtonList: this.operationButtonList,
175 topicInfo: this.topicInfo, 184 topicInfo: this.topicInfo,
176 styleType: 1, 185 styleType: 1,
177 - onCommentIconClick:()=>{ 186 + onCommentIconClick: () => {
178 this.showCommentList = true 187 this.showCommentList = true
179 } 188 }
180 }) 189 })
@@ -185,7 +194,7 @@ export struct SpacialTopicPageComponent { @@ -185,7 +194,7 @@ export struct SpacialTopicPageComponent {
185 showCommentList: $showCommentList, 194 showCommentList: $showCommentList,
186 publishCommentModel: $publishCommentModel, 195 publishCommentModel: $publishCommentModel,
187 interactData: $interactData, 196 interactData: $interactData,
188 - }).visibility(this.showComment?Visibility.Visible:Visibility.Hidden) 197 + }).visibility(this.showComment ? Visibility.Visible : Visibility.Hidden)
189 } 198 }
190 } 199 }
191 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT) 200 }.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
@@ -39,11 +39,6 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent @@ -39,11 +39,6 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
39 identifier, 39 identifier,
40 intentActionInfo: { 40 intentActionInfo: {
41 actionMode 41 actionMode
42 - //目前不考虑发生时段  
43 - // executedTimeSlots: {  
44 - // executedEndTime: new Date().getTime(),  
45 - // executedStartTime: pageModel.executedStartTime  
46 - // }  
47 }, 42 },
48 intentEntityInfo: { 43 intentEntityInfo: {
49 entityName: 'Blog', 44 entityName: 'Blog',
@@ -86,16 +81,21 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent @@ -86,16 +81,21 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
86 } 81 }
87 82
88 //ViewBlog意图共享-节目详情 详情页上报 83 //ViewBlog意图共享-节目详情 详情页上报
89 -export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, item: ContentDetailDTO, 84 +export function viewBlogItemInsightIntentShare(executedStartTime: number ,context: common.UIAbilityContext, item: ContentDetailDTO,
90 interactData?: InteractDataDTO) { 85 interactData?: InteractDataDTO) {
91 let identifier = generateUUID() 86 let identifier = generateUUID()
92 console.log('zzzz', JSON.stringify(item)) 87 console.log('zzzz', JSON.stringify(item))
  88 + let executedEndTime: number = new Date().getTime()
93 let viewBlogInsightIntentItem: insightIntent.InsightIntent = { 89 let viewBlogInsightIntentItem: insightIntent.InsightIntent = {
94 intentName: 'ViewBlog', 90 intentName: 'ViewBlog',
95 intentVersion: '1.0.1', 91 intentVersion: '1.0.1',
96 identifier, 92 identifier,
97 intentActionInfo: { 93 intentActionInfo: {
98 - actionMode: ActionMode.EXECUTED 94 + actionMode: ActionMode.EXECUTED,
  95 + executedTimeSlots: {
  96 + executedEndTime: executedEndTime,
  97 + executedStartTime: executedStartTime
  98 + }
99 }, 99 },
100 intentEntityInfo: { 100 intentEntityInfo: {
101 entityName: 'Blog', 101 entityName: 'Blog',
@@ -142,7 +142,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en @@ -142,7 +142,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
142 intentVersion: '1.0.1', 142 intentVersion: '1.0.1',
143 identifier: generateUUID(), 143 identifier: generateUUID(),
144 intentActionInfo: { 144 intentActionInfo: {
145 - actionMode: ActionMode.EXECUTED 145 + actionMode: ActionMode.EXPECTED
146 }, 146 },
147 intentEntityInfo: { 147 intentEntityInfo: {
148 entityName: 'Column', 148 entityName: 'Column',
@@ -161,11 +161,11 @@ struct LaunchInterestsHobbiesPage { @@ -161,11 +161,11 @@ struct LaunchInterestsHobbiesPage {
161 .backgroundColor('#ED2800') 161 .backgroundColor('#ED2800')
162 .type(ButtonType.Normal) 162 .type(ButtonType.Normal)
163 .borderRadius(5) 163 .borderRadius(5)
164 - .width(320) 164 + .width('640lpx')
165 .height(44) 165 .height(44)
166 .margin({top:5}) 166 .margin({top:5})
167 Image('') 167 Image('')
168 - .width(320) 168 + .width('640lpx')
169 .height(44) 169 .height(44)
170 .margin({top:5}) 170 .margin({top:5})
171 .backgroundColor(Color.White) 171 .backgroundColor(Color.White)
@@ -60,6 +60,7 @@ export struct MultiPictureDetailPageComponent { @@ -60,6 +60,7 @@ export struct MultiPictureDetailPageComponent {
60 @State isEnableSwipe: boolean = true; 60 @State isEnableSwipe: boolean = true;
61 @State isScrollerTop: boolean = false; 61 @State isScrollerTop: boolean = false;
62 @Provide duration: number = 0 62 @Provide duration: number = 0
  63 + @State executedStartTime: number = new Date().getTime()
63 64
64 //watch监听页码回调 65 //watch监听页码回调
65 onCurrentPageNumUpdated(): void { 66 onCurrentPageNumUpdated(): void {
@@ -100,7 +101,7 @@ export struct MultiPictureDetailPageComponent { @@ -100,7 +101,7 @@ export struct MultiPictureDetailPageComponent {
100 } 101 }
101 102
102 aboutToDisappear() { 103 aboutToDisappear() {
103 - 104 + this.viewBlogInsightIntentShare()
104 } 105 }
105 106
106 build() { 107 build() {
@@ -572,7 +573,6 @@ export struct MultiPictureDetailPageComponent { @@ -572,7 +573,6 @@ export struct MultiPictureDetailPageComponent {
572 this.getInteractBrowsOperate() 573 this.getInteractBrowsOperate()
573 this.getBatchAttentionStatus() 574 this.getBatchAttentionStatus()
574 } 575 }
575 - this.viewBlogInsightIntentShare()  
576 }) 576 })
577 .catch((err: Error) => { 577 .catch((err: Error) => {
578 Logger.info(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`); 578 Logger.info(TAG, `fetchDetailData then,err: ${JSON.stringify(err)}`);
@@ -658,6 +658,6 @@ export struct MultiPictureDetailPageComponent { @@ -658,6 +658,6 @@ export struct MultiPictureDetailPageComponent {
658 */ 658 */
659 private viewBlogInsightIntentShare() { 659 private viewBlogInsightIntentShare() {
660 let context = getContext(this) as common.UIAbilityContext; 660 let context = getContext(this) as common.UIAbilityContext;
661 - viewBlogItemInsightIntentShare(context, this.contentDetailData) 661 + viewBlogItemInsightIntentShare(this.executedStartTime, context, this.contentDetailData)
662 } 662 }
663 } 663 }