From 1b66668fd58e6b03c44fe7164f3d77dd97ec5e94 Mon Sep 17 00:00:00 2001 From: yuandongping Date: Thu, 22 May 2025 16:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yuandongping --- .../entry/src/main/ets/common/AccountInfo.ets | 26 ++++++++++--------- .../src/main/ets/common/NavigationBar.ets | 24 ++++++++++------- .../entry/src/main/ets/pages/Modify.ets | 18 ++++++++----- 3 files changed, 39 insertions(+), 29 deletions(-) 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 9c63973cee..86513b8221 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 2a3a0a8588..ba9680580f 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 db860e28da..303ccca9b3 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 }) -- Gitee