Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yuzhilin
2024-06-18 12:04:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d6f37dd73f258235e2267adc77a44cddfe11ee8
8d6f37dd
1 parent
c1c5e790
习惯推 entityId 改成参数拼接方案、习惯推默认 logo
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
sight_harmony/products/phone/src/main/ets/utils/InsightIntentExecutorImpl.ets
sight_harmony/features/wdComponent/src/main/ets/utils/InsightIntentShare.ets
View file @
8d6f37d
...
...
@@ -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',
...
...
sight_harmony/products/phone/src/main/ets/utils/InsightIntentExecutorImpl.ets
View file @
8d6f37d
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 {
...
...
Please
register
or
login
to post a comment