wangliang_wd

feat:更新早晚报意图上报

... ... @@ -40,6 +40,7 @@ export struct MorningEveningPaperComponent {
@Provide commentList: InteractDataDTO[] = []
@State audioPlayUrl: string = ""
@State isNoListContent:boolean = false;
@State executedStartTime:number = new Date().getTime()
// @Consume dailyPaperTopicPageId: number
// @Provide compListItem: CompList = {} as CompList
// @State morningEveningPaperDTO: MorningEveningPaperDTO = {
... ... @@ -75,6 +76,8 @@ export struct MorningEveningPaperComponent {
@State scrollOffset: number = 0
@State currentStatus: number | string |undefined = 0;
@State dailyPaperTopicPageId: string = ''
private audioDataList: AudioDataList[] = []
private playerController: WDPlayerController = new WDPlayerController();
simpleAudioDialog: CustomDialogController = new CustomDialogController({
... ... @@ -122,19 +125,17 @@ export struct MorningEveningPaperComponent {
}
async aboutToAppear() {
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
this.dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as string
console.info(TAG, `aboutToAppear = ` + this.dailyPaperTopicPageId)
const currentTime = new Date().getTime()
console.log(TAG, "currentTime = " + currentTime)
console.log(TAG, `currentTime = ${currentTime}`)
try {
// let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId)
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + dailyPaperTopicPageId) //"25091"
let pageInfoBean = await MorningEveningViewModel.getMorningEveningPageInfo("" + this.dailyPaperTopicPageId) //"25091"
this.pageInfoBean = pageInfoBean;
//早晚报意图上报
let context = getContext(this) as common.UIAbilityContext;
viewColumInsightIntentShare(context,String(dailyPaperTopicPageId), this.pageInfoBean)
this.title = this.pageInfoBean?.topicInfo?.title
this.topicInfo = this.pageInfoBean?.topicInfo
... ... @@ -244,6 +245,9 @@ export struct MorningEveningPaperComponent {
}
async aboutToDisappear() {
//早晚报意图上报
let context = getContext(this) as common.UIAbilityContext;
viewColumInsightIntentShare(this.executedStartTime,context,String(this.dailyPaperTopicPageId), this.pageInfoBean)
}
onPageHide() {
... ...
... ... @@ -134,15 +134,20 @@ export function viewBlogItemInsightIntentShare(executedStartTime: number ,contex
}
//ViewColumn意图共享-早晚报
export function viewColumInsightIntentShare(context: common.UIAbilityContext, entityId: string,
export function viewColumInsightIntentShare(executedStartTime: number ,context: common.UIAbilityContext, entityId: string,
pageInfoBean: PageInfoBean) {
console.log('viewColumInsightIntentShare')
let executedEndTime: number = new Date().getTime()
let viewColumInsightIntentItem: insightIntent.InsightIntent = {
intentName: 'ViewColumn',
intentVersion: '1.0.1',
identifier: generateUUID(),
intentActionInfo: {
actionMode: ActionMode.EXPECTED
actionMode: ActionMode.EXECUTED,
executedTimeSlots: {
executedEndTime: executedEndTime,
executedStartTime: executedStartTime
}
},
intentEntityInfo: {
entityName: 'Column',
... ...