Showing
2 changed files
with
17 additions
and
8 deletions
| @@ -40,6 +40,7 @@ export struct MorningEveningPaperComponent { | @@ -40,6 +40,7 @@ export struct MorningEveningPaperComponent { | ||
| 40 | @Provide commentList: InteractDataDTO[] = [] | 40 | @Provide commentList: InteractDataDTO[] = [] |
| 41 | @State audioPlayUrl: string = "" | 41 | @State audioPlayUrl: string = "" |
| 42 | @State isNoListContent:boolean = false; | 42 | @State isNoListContent:boolean = false; |
| 43 | + @State executedStartTime:number = new Date().getTime() | ||
| 43 | // @Consume dailyPaperTopicPageId: number | 44 | // @Consume dailyPaperTopicPageId: number |
| 44 | // @Provide compListItem: CompList = {} as CompList | 45 | // @Provide compListItem: CompList = {} as CompList |
| 45 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { | 46 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { |
| @@ -75,6 +76,8 @@ export struct MorningEveningPaperComponent { | @@ -75,6 +76,8 @@ export struct MorningEveningPaperComponent { | ||
| 75 | @State scrollOffset: number = 0 | 76 | @State scrollOffset: number = 0 |
| 76 | @State currentStatus: number | string |undefined = 0; | 77 | @State currentStatus: number | string |undefined = 0; |
| 77 | 78 | ||
| 79 | + @State dailyPaperTopicPageId: string = '' | ||
| 80 | + | ||
| 78 | private audioDataList: AudioDataList[] = [] | 81 | private audioDataList: AudioDataList[] = [] |
| 79 | private playerController: WDPlayerController = new WDPlayerController(); | 82 | private playerController: WDPlayerController = new WDPlayerController(); |
| 80 | simpleAudioDialog: CustomDialogController = new CustomDialogController({ | 83 | simpleAudioDialog: CustomDialogController = new CustomDialogController({ |
| @@ -122,19 +125,17 @@ export struct MorningEveningPaperComponent { | @@ -122,19 +125,17 @@ export struct MorningEveningPaperComponent { | ||
| 122 | } | 125 | } |
| 123 | 126 | ||
| 124 | async aboutToAppear() { | 127 | async aboutToAppear() { |
| 125 | - const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String | ||
| 126 | - console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) | 128 | + this.dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as string |
| 129 | + | ||
| 130 | + console.info(TAG, `aboutToAppear = ` + this.dailyPaperTopicPageId) | ||
| 127 | const currentTime = new Date().getTime() | 131 | const currentTime = new Date().getTime() |
| 128 | console.log(TAG, "currentTime = " + currentTime) | 132 | console.log(TAG, "currentTime = " + currentTime) |
| 129 | console.log(TAG, `currentTime = ${currentTime}`) | 133 | console.log(TAG, `currentTime = ${currentTime}`) |
| 130 | try { | 134 | try { |
| 131 | 135 | ||
| 132 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) | 136 | // let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) |
| 133 | - let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId) //"25091" | 137 | + let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) //"25091" |
| 134 | this.pageInfoBean = pageInfoBean; | 138 | this.pageInfoBean = pageInfoBean; |
| 135 | - //早晚报意图上报 | ||
| 136 | - let context = getContext(this) as common.UIAbilityContext; | ||
| 137 | - viewColumInsightIntentShare(context,String(dailyPaperTopicPageId), this.pageInfoBean) | ||
| 138 | 139 | ||
| 139 | this.title = this.pageInfoBean?.topicInfo?.title | 140 | this.title = this.pageInfoBean?.topicInfo?.title |
| 140 | this.topicInfo = this.pageInfoBean?.topicInfo | 141 | this.topicInfo = this.pageInfoBean?.topicInfo |
| @@ -244,6 +245,9 @@ export struct MorningEveningPaperComponent { | @@ -244,6 +245,9 @@ export struct MorningEveningPaperComponent { | ||
| 244 | } | 245 | } |
| 245 | 246 | ||
| 246 | async aboutToDisappear() { | 247 | async aboutToDisappear() { |
| 248 | + //早晚报意图上报 | ||
| 249 | + let context = getContext(this) as common.UIAbilityContext; | ||
| 250 | + viewColumInsightIntentShare(this.executedStartTime,context,String(this.dailyPaperTopicPageId), this.pageInfoBean) | ||
| 247 | } | 251 | } |
| 248 | 252 | ||
| 249 | onPageHide() { | 253 | onPageHide() { |
| @@ -134,15 +134,20 @@ export function viewBlogItemInsightIntentShare(executedStartTime: number ,contex | @@ -134,15 +134,20 @@ export function viewBlogItemInsightIntentShare(executedStartTime: number ,contex | ||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | //ViewColumn意图共享-早晚报 | 136 | //ViewColumn意图共享-早晚报 |
| 137 | -export function viewColumInsightIntentShare(context: common.UIAbilityContext, entityId: string, | 137 | +export function viewColumInsightIntentShare(executedStartTime: number ,context: common.UIAbilityContext, entityId: string, |
| 138 | pageInfoBean: PageInfoBean) { | 138 | pageInfoBean: PageInfoBean) { |
| 139 | console.log('viewColumInsightIntentShare') | 139 | console.log('viewColumInsightIntentShare') |
| 140 | + let executedEndTime: number = new Date().getTime() | ||
| 140 | let viewColumInsightIntentItem: insightIntent.InsightIntent = { | 141 | let viewColumInsightIntentItem: insightIntent.InsightIntent = { |
| 141 | intentName: 'ViewColumn', | 142 | intentName: 'ViewColumn', |
| 142 | intentVersion: '1.0.1', | 143 | intentVersion: '1.0.1', |
| 143 | identifier: generateUUID(), | 144 | identifier: generateUUID(), |
| 144 | intentActionInfo: { | 145 | intentActionInfo: { |
| 145 | - actionMode: ActionMode.EXPECTED | 146 | + actionMode: ActionMode.EXECUTED, |
| 147 | + executedTimeSlots: { | ||
| 148 | + executedEndTime: executedEndTime, | ||
| 149 | + executedStartTime: executedStartTime | ||
| 150 | + } | ||
| 146 | }, | 151 | }, |
| 147 | intentEntityInfo: { | 152 | intentEntityInfo: { |
| 148 | entityName: 'Column', | 153 | entityName: 'Column', |
-
Please register or login to post a comment