diff --git a/entry/build/default/intermediates/res/default/resources/rawfile/index.html b/entry/build/default/intermediates/res/default/resources/rawfile/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..d5f13d0f284118c67e3e79c4ee956006624a1f21
--- /dev/null
+++ b/entry/build/default/intermediates/res/default/resources/rawfile/index.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
Hello Web
+
跳转回Web页面
+ // [Start example1]
+
跳转到其他页面
+ // [End example1]
+ // [Start origin_page]
+
跳转到ArkTS页面
+ // [End origin_page]
+ // [Start detail1]
+
去应用市场下载
+
打开应用
+ // [End detail1]
+ // [Start pull_special]
+
拉起指定类型应用
+ // [End pull_special]
+ // [Start select_photo]
+
拉起系统应用
+ // [End select_photo]
+
+
+
+
diff --git a/entry/build/default/intermediates/res/default/resources/rawfile/index1_cn.html b/entry/build/default/intermediates/res/default/resources/rawfile/index1_cn.html
new file mode 100644
index 0000000000000000000000000000000000000000..b2bef50c772c2fa241dffd3b936e36cc8fd1b2e3
--- /dev/null
+++ b/entry/build/default/intermediates/res/default/resources/rawfile/index1_cn.html
@@ -0,0 +1,30 @@
+
+
+
+
+
web and application jump and pull up
+
+
+
+
+
diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets
index be9dc3ac02f3d30427ddf44bfdeba26bda8d5a10..7068246d41dbf4531923dbac6b4f5dc6df7cd772 100644
--- a/entry/src/main/ets/pages/Index.ets
+++ b/entry/src/main/ets/pages/Index.ets
@@ -133,7 +133,6 @@ struct Index {
}
build() {
- // [Start navigation]
Navigation(this.navPathStack) {
Column() {
Web({
@@ -149,9 +148,8 @@ struct Index {
})
}
}
- // [End navigation]
.hideTitleBar(true)
.navDestination(this.PageMap)
.mode(NavigationMode.Stack)
}
-}
\ No newline at end of file
+}
diff --git a/entry/src/main/ets/pages/Navigation.ets b/entry/src/main/ets/pages/Navigation.ets
new file mode 100644
index 0000000000000000000000000000000000000000..805e17010090647caa40dcef76cdb97f06dfb791
--- /dev/null
+++ b/entry/src/main/ets/pages/Navigation.ets
@@ -0,0 +1,21 @@
+@Component
+export struct Navigation1 {
+ @Consume('navPathStack') navPathStack: NavPathStack;
+
+ build() {
+ // [Start navigation]
+ NavDestination() {
+ Column() {
+ Button($r('app.string.back_to_web_page'))
+ .width('100%')
+ .height(40)
+ .onClick(() => {
+ this.navPathStack.pushPath({ name: 'WebPage' });
+ })
+ }
+ // ...
+ }
+ .title('ArkTS页面')
+ // [End navigation]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Navigation1.ets b/entry/src/main/ets/pages/Navigation1.ets
new file mode 100644
index 0000000000000000000000000000000000000000..348fe0d50b41a0ec3a13adfa32ae80746b600294
--- /dev/null
+++ b/entry/src/main/ets/pages/Navigation1.ets
@@ -0,0 +1,32 @@
+class PathStack{
+ pop(){
+ return
+ }
+}
+@Component
+export struct Navigation2 {
+ private controller:ESObject;
+ private navPathStack=new PathStack()
+build() {
+ // [Start navigation1]
+ NavDestination() {
+ Column() {
+ Web({
+ src: $rawfile('index.html'),
+ controller: this.controller
+ })
+ .zoomAccess(false)
+ .onLoadIntercept((event) => {
+ const url: string = event.data.getRequestUrl();
+ if (url === 'arkts://pages/toOriginPage') {
+ this.navPathStack.pop();
+ }
+ // [StartExclude navigation1]
+ return false;
+ // [EndExclude navigation1]
+ })
+ }
+ }
+ // [End navigation1]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Navigation2.ets b/entry/src/main/ets/pages/Navigation2.ets
new file mode 100644
index 0000000000000000000000000000000000000000..c83bc3f1f31f69785af2066993ff56527c6f3cb1
--- /dev/null
+++ b/entry/src/main/ets/pages/Navigation2.ets
@@ -0,0 +1,49 @@
+import { bundleManager, OpenLinkOptions } from "@kit.AbilityKit";
+import { BusinessError } from "@kit.BasicServicesKit";
+// [Start link1]
+const link: string = "appScheme://www.test.com:80/path1";
+// [End link1]
+@Component
+export struct Navigation3 {
+ private controller:ESObject;
+ private navPathStack:ESObject
+ private context:ESObject;
+ build() {
+ // [Start link3]
+ Navigation(this.navPathStack) {
+ Column() {
+ Web({
+ src: $rawfile('index2.html'),
+ controller: this.controller
+ })
+ .zoomAccess(false)
+ .onLoadIntercept((event) => {
+ const url: string = event.data.getRequestUrl();
+ if (url === 'third-party://pages/toThirdApp') {
+ const link: string = "appScheme://www.test.com:80/path1";
+ // [Start link2]
+ if (!bundleManager.canOpenLink(link)) {
+ return true;
+ }
+ // [End link1]
+ // Configuration parameter.
+ const openLinkOptions: OpenLinkOptions = {
+ appLinkingOnly: false,
+ parameters: {
+ name: 'test'
+ }
+ };
+ // Open the application using the openLink interface.
+ this.context.openLink(link, openLinkOptions).then(() => {
+ console.info('open link success.');
+ }).catch((err: BusinessError) => {
+ console.error(`open link failed. Code is ${err.code}, message is ${err.message}`);
+ })
+ }
+ return url !== 'resource://rawfile/index2.html';
+ })
+ }
+ }
+ // [End link3]
+ }
+}
\ No newline at end of file
diff --git a/entry/src/main/ets/pages/Navigation3.ets b/entry/src/main/ets/pages/Navigation3.ets
new file mode 100644
index 0000000000000000000000000000000000000000..3e658f935c9ef1692b591aba2f013316427013c4
--- /dev/null
+++ b/entry/src/main/ets/pages/Navigation3.ets
@@ -0,0 +1,60 @@
+import { hilog } from "@kit.PerformanceAnalysisKit";
+import { common } from "@kit.AbilityKit";
+
+class context{
+ startAbilityByType(name:string,a:ESObject,b:ESObject){
+ return
+ }
+}
+@Component
+export struct Navigation4 {
+ private controller:ESObject;
+ private navPathStack:ESObject
+ private context=new context()
+ build() {
+ // [Start path_stack1]
+ Navigation(this.navPathStack) {
+ Column() {
+ Web({
+ src: $rawfile('index.html'),
+ controller: this.controller
+ })
+ .zoomAccess(false)
+ .onLoadIntercept((event) => {
+ const url: string = event.data.getRequestUrl();
+ if (url === 'arkts://pullSpeciallyApp') {
+ const wantParam: Record