“e99597d35ce7e235b2386f54e1fb4729f718d24c”上不存在“...tensorrt/git@gitcode.net:s920243400/PaddleDetection.git”
未验证 提交 a9907ec0 编写于 作者: O openharmony_ci 提交者: Gitee

!8755 修复Stage模型startAbility示例错误( data为undefined)

Merge pull request !8755 from 张亚菲/zyfRelease
...@@ -86,7 +86,7 @@ Ability功能如下(Ability类,具体的API详见[接口文档](../reference ...@@ -86,7 +86,7 @@ Ability功能如下(Ability类,具体的API详见[接口文档](../reference
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log("MainAbility onWindowStageCreate") console.log("MainAbility onWindowStageCreate")
windowStage.loadContent("pages/index").then((data) => { windowStage.loadContent("pages/index").then(() => {
console.log("MainAbility load content succeed") console.log("MainAbility load content succeed")
}).catch((error) => { }).catch((error) => {
console.error("MainAbility load content failed with error: "+ JSON.stringify(error)) console.error("MainAbility load content failed with error: "+ JSON.stringify(error))
...@@ -228,8 +228,8 @@ var want = { ...@@ -228,8 +228,8 @@ var want = {
"bundleName": "com.example.MyApplication", "bundleName": "com.example.MyApplication",
"abilityName": "MainAbility" "abilityName": "MainAbility"
}; };
context.startAbility(want).then((data) => { context.startAbility(want).then(() => {
console.log("Succeed to start ability with data: " + JSON.stringify(data)) console.log("Succeed to start ability")
}).catch((error) => { }).catch((error) => {
console.error("Failed to start ability with error: "+ JSON.stringify(error)) console.error("Failed to start ability with error: "+ JSON.stringify(error))
}) })
...@@ -245,8 +245,8 @@ var want = { ...@@ -245,8 +245,8 @@ var want = {
"bundleName": "com.example.MyApplication", "bundleName": "com.example.MyApplication",
"abilityName": "MainAbility" "abilityName": "MainAbility"
}; };
context.startAbility(want).then((data) => { context.startAbility(want).then(() => {
console.log("Succeed to start remote ability with data: " + JSON.stringify(data)) console.log("Succeed to start remote ability")
}).catch((error) => { }).catch((error) => {
console.error("Failed to start remote ability with error: " + JSON.stringify(error)) console.error("Failed to start remote ability with error: " + JSON.stringify(error))
}) })
......
...@@ -126,7 +126,7 @@ var options = { ...@@ -126,7 +126,7 @@ var options = {
windowMode: 0, windowMode: 0,
}; };
this.context.startAbility(want, options) this.context.startAbility(want, options)
.then((data) => { .then(() => {
console.log('Operation successful.') console.log('Operation successful.')
}).catch((error) => { }).catch((error) => {
console.log('Operation failed.'); console.log('Operation failed.');
...@@ -850,4 +850,4 @@ var contentStorage = { ...@@ -850,4 +850,4 @@ var contentStorage = {
"link": 'link', "link": 'link',
}; };
this.context.restoreWindowStage(contentStorage); this.context.restoreWindowStage(contentStorage);
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册