diff --git a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/AccountInfo.ets b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/AccountInfo.ets index 9c63973cee64f276b6907aadecd7623a6f230ce4..86513b8221493a0734d9a23c14564fd2686b4bc0 100644 --- a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/AccountInfo.ets +++ b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/AccountInfo.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,20 +13,20 @@ * limitations under the License. */ -import router from '@ohos.router' -import Logger from '../model/Logger' -import { AccountData } from '../model/AccountData' +import router from '@ohos.router'; +import Logger from '../model/Logger'; +import { AccountData } from '../model/AccountData'; import { AccountModel } from '../model/AccountModel'; -const TAG: string = '[AccountInfo]' +const TAG: string = '[AccountInfo]'; @Component export struct AccountInfo { - @Prop email: string - @Prop username: string - @Prop signature: string - @Prop bundleName: string - private storage: AccountData = AccountData.getInstance() + @Prop email: string; + @Prop username: string; + @Prop signature: string; + @Prop bundleName: string; + private storage: AccountData = AccountData.getInstance(); private accountModel: AccountModel = new AccountModel(); @Builder infoShow(title: Resource, value: string) { @@ -61,11 +61,13 @@ export struct AccountInfo { .fontColor(Color.White) .type(ButtonType.Capsule) .onClick(() => { - router.push({ + router.pushUrl({ url: 'pages/Modify', params: { username: this.username, - bundleName: this.bundleName + bundleName: this.bundleName, + signature: this.signature, + email: this.email } }) }) diff --git a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/NavigationBar.ets b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/NavigationBar.ets index 2a3a0a858877c9fb93408a1a7a25fd5706cfb5fa..ba9680580fc694f7c210fc5d465e8ad3606e5852 100644 --- a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/NavigationBar.ets +++ b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/common/NavigationBar.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,18 +13,20 @@ * limitations under the License. */ -import router from '@ohos.router' -import Logger from '../model/Logger' +import router from '@ohos.router'; +import Logger from '../model/Logger'; const TAG: string = '[NavigationBar]' @Component export struct NavigationBar { - private url: string = '' - private username: string = '' - private bundleName: string = '' - private flag: boolean = undefined - private title: Resource = undefined + private url: string = ''; + private username: string = ''; + private bundleName: string = ''; + private signature: string = ''; + private email: string = ''; + private flag: boolean = undefined; + private title: Resource = undefined; build() { Row() { @@ -49,11 +51,13 @@ export struct NavigationBar { primaryButton: { value: $r('app.string.confirm'), action: () => { - router.push({ + router.pushUrl({ url: this.url, params: { bundleName: this.bundleName, - username: this.username + username: this.username, + signature: this.signature, + email: this.email } }) } diff --git a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/pages/Modify.ets b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/pages/Modify.ets index db860e28da6f0b57d709e6507320f95a5f68ef7b..303ccca9b38a65a409b51a9c562560468b475f53 100644 --- a/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/pages/Modify.ets +++ b/code/BasicFeature/Security/AppAccountManager/entry/src/main/ets/pages/Modify.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,15 +13,17 @@ * limitations under the License. */ -import router from '@ohos.router' -import { ModifyInfo } from '../common/ModifyInfo' -import { NavigationBar } from '../common/NavigationBar' +import router from '@ohos.router'; +import { ModifyInfo } from '../common/ModifyInfo'; +import { NavigationBar } from '../common/NavigationBar'; @Entry @Component struct Modify { - @State username: string = router.getParams()["username"] - @State bundleName: string = router.getParams()["bundleName"] + @State username: string = router.getParams()["username"]; + @State bundleName: string = router.getParams()["bundleName"]; + @State signature: string = router.getParams()['signature']; + @State email: string = router.getParams()['email']; build() { Scroll() { @@ -31,7 +33,9 @@ struct Modify { flag: true, url: 'pages/Account', username: this.username, - bundleName: this.bundleName + bundleName: this.bundleName, + signature: this.signature, + email: this.email }) ModifyInfo({ bundleName: this.bundleName, username: this.username })