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
yangchenggong1_wd
2024-09-25 17:16:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9208ada1f5122ded8f1491fa19b0d8619fb0f490
9208ada1
1 parent
86b74fe0
fix |> 19569 【8.0新需求】APP拉起换端,去掉广告页显示(从启动页直接跳详情页,返回到首页)功能未实现
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
8 deletions
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/AppLinkingManager.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
View file @
9208ada
...
...
@@ -64,4 +64,6 @@ export class SpConstants{
// 个推推送
static GETUI_PUSH_CID = "cid"
static GETUI_PUSH_DEVICE_TOKEN = "deviceToken"
//link
static HAS_LINK="has_link"
}
\ No newline at end of file
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/AppLinkingManager.ets
View file @
9208ada
import { Logger } from 'wdKit'
import { Logger
, SPHelper, StringUtils
} from 'wdKit'
import { Want } from '@kit.AbilityKit'
import { url } from '@kit.ArkTS'
import { AppInnerLinkGenerator } from './AppInnerLinkGenerator'
...
...
@@ -6,6 +6,7 @@ import { ContentType } from '../common/ContentType'
import { AppInnerLink } from './AppInnerLink'
import { HttpBizUtil, HttpUrlUtils, ResponseDTO } from 'wdNetwork'
import { ContentDetailDTO } from 'wdBean'
import { SpConstants } from 'wdConstant'
const TAG = "AppLinkingManager"
...
...
@@ -16,6 +17,7 @@ export class AppLinkingManager {
private hasEnterMain = false
private lastUrlObj?: url.URL
private isJumpInnerLink:boolean = true
private static manager: AppLinkingManager
private constructor() {
...
...
@@ -58,13 +60,19 @@ export class AppLinkingManager {
this.comsumeLastUriContent()
}
comsumeLastUriContent() {
comsumeLastUriContent(isJump:boolean = true) {
this.isJumpInnerLink = isJump
Logger.debug(TAG, "尝试消费拉起链接: " + this.lastUrlObj?.toString())
if (!this.lastUrlObj) {
return
}
let path = this.lastUrlObj?.pathname ?? ""
if(!this.isJumpInnerLink && StringUtils.isNotEmpty(path)){
SPHelper.default.save(SpConstants.HAS_LINK, true)
return
}
if (this.dealWithRMHArticle()
|| this.dealWithNormalArticle()
|| this.dealWithCreator()
...
...
@@ -187,7 +195,9 @@ export class AppLinkingManager {
}
jumpInnerLink(innerLink: string) {
Logger.debug(TAG, "即将跳转链接: " + innerLink)
AppInnerLink.jumpWithLink(innerLink)
if(this.isJumpInnerLink){
Logger.debug(TAG, "即将跳转链接: " + innerLink)
AppInnerLink.jumpWithLink(innerLink)
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/MoreComponent.ets
View file @
9208ada
...
...
@@ -118,7 +118,6 @@ export struct MoreComponent {
let contentDTO = MinePageDatasModel.dataTransform(rem,value, photos);
if(value.type != "13"){
this.contentDTO.sameContentList.push(contentDTO)
console.log("ycg","123")
}
})
...
...
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
View file @
9208ada
...
...
@@ -7,6 +7,7 @@ import { BusinessError } from '@ohos.base';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { StartupManager } from '../startupmanager/StartupManager';
import { AppLinkingManager } from 'wdRouter';
let floatWindowClass: window.Window | null = null;
const TAG = 'EntryAbility'
...
...
@@ -19,7 +20,8 @@ export default class EntryAbility extends UIAbility {
StartupManager.sharedInstance().appAgreedProtocol()
}
Logger.info(TAG, 'Ability onCreate');
//只判断不跳转
AppLinkingManager.sharedInstance().comsumeLastUriContent(false)
// 还没深色模式需求,暂直接不跟随系统。
this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT);
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
9208ada
...
...
@@ -59,7 +59,14 @@ struct LaunchPage {
this.timerId = setTimeout(() => {
this.isJumpToAdvertising = true;
WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
let hasLink = SPHelper.default.getSync(SpConstants.HAS_LINK,false)
if(hasLink){
SPHelper.default.deleteSync(SpConstants.HAS_LINK)
WDRouterRule.jumpWithPage(WDRouterPage.mainPage)
}else{
WDRouterRule.jumpWithPage(WDRouterPage.launchAdvertisingPage)
}
// router.pushUrl({
// url: 'pages/LaunchAdvertisingPage'
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
9208ada
...
...
@@ -214,7 +214,7 @@ export struct BottomNavigationComponent {
},
onLoadListener:{
onLoadFailed:(err)=>{
console.error("
ycg","
Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
console.error("Load Failed Reason: " + err + " cost " + (new Date().getTime() ) + " milliseconds");
}
}
};
...
...
Please
register
or
login
to post a comment