未验证 提交 26e0919c 编写于 作者: O openharmony_ci 提交者: Gitee

!23665 【23663挑单】

Merge pull request !23665 from liuliu/fix0901monthly
......@@ -541,18 +541,20 @@ export default class FuncAbility extends UIAbility {
onWindowStageCreate(windowStage: window.WindowStage) {
// Main window is created, set main page for this ability
// ...
let url = 'pages/Index';
if (this.funcAbilityWant?.parameters?.router && this.funcAbilityWant.parameters.router === 'funcA') {
url = 'pages/Second';
}
let windowClass: window.Window;
windowStage.getMainWindow((err, data) => {
windowStage.loadContent(url, (err, data) => {
if (err.code) {
return;
}
let windowClass: window.Window;
windowStage.getMainWindow((err, data) => {
if (err.code) {
console.error(TAG, `Failed to obtain the main window. Code is ${err.code}, message is ${err.message}`);
console.error(`Failed to obtain the main window. Code is ${err.code}, message is ${err.message}`);
return;
}
windowClass = data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册