liyubing

Merge remote-tracking branch 'origin/main'

... ... @@ -44,10 +44,10 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
},
intentEntityInfo: {
entityName: 'Blog',
entityId: item?.objectId || '',//必传
entityId: `objectId=${item?.objectId}&objectType=${item?.objectType}` || '',//必传
displayName: item?.newsTitle || '', //必传
entityGroupId, //channelId
logoURL: item?.coverUrl,
logoURL: item?.coverUrl || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png',
metadataModificationTime: Number(item?.publishTime) || 0,//int
blogTitle: item?.newsTitle,
blogType: 'Normal',
... ... @@ -99,7 +99,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
entityId: String(item?.newsId) || '',
displayName: item?.newsTitle || '',
entityGroupId: String(item?.reLInfo?.channelId), //channelId
logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri,
logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png',
metadataModificationTime: new Date(item.publishTime).getTime() || 0,
blogTitle: item?.newsTitle,
blogType: 'Normal',
... ...
import Url from '@ohos.url'
import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
import { window } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit';
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel'
... ... @@ -52,6 +54,12 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
// TODO 热启动是否切到主页
pageLoader.loadContent('pages/MainPage')
.then(() => {
let url: string = param?.entityId as string || ''
let urlParams = new Url.URLParams(url);
let content = new ContentDTO()
content.objectId = urlParams.get('objectId') || ''
content.objectType = urlParams.get('objectType') || ''
ProcessUtils.processPage(content)
resolve({
code: 0,
result: {
... ... @@ -79,7 +87,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
return new Promise((resolve, reject) => {
pageLoader.loadContent('pages/MainPage')
.then( async () => {
.then(async () => {
if (NetworkUtil.isNetConnected()) {
if (await FastClickUtil.isMinDelayTime()) {
return
... ... @@ -92,7 +100,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
ToastUtils.showToast('暂无早晚报信息', 1000)
}
}).catch((err: string) => {
console.log('yzlerr',JSON.stringify(err))
console.log('yzlerr', JSON.stringify(err))
ToastUtils.showToast('暂无早晚报信息', 1000)
})
} else {
... ...