| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| AppScope/ | 06-May-2025 | - | 35 | 32 | ||
| entry/ | 06-May-2025 | - | 677 | 610 | ||
| hvigor/ | 06-May-2025 | - | 38 | 36 | ||
| screenshots/ | 06-May-2025 | - | ||||
| .gitignore | D | 06-May-2025 | 133 | 12 | 12 | |
| README.md | D | 06-May-2025 | 3.7 KiB | 71 | 51 | |
| build-profile.json5 | D | 06-May-2025 | 1.3 KiB | 52 | 51 | |
| code-linter.json5 | D | 06-May-2025 | 958 | 35 | 34 | |
| hvigorfile.ts | D | 06-May-2025 | 843 | 22 | 5 | |
| oh-package.json5 | D | 06-May-2025 | 834 | 26 | 24 | |
| ohosTest.md | D | 06-May-2025 | 1.7 KiB | 11 | 9 |
README.md
1# 管理分布式账号(仅对系统应用开放) 2 3### 介绍 4 51.OEM厂商可以通过[分布式账号SDK](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-basic-services-kit/js-apis-distributed-account.md)将自有账号与本地系统账号建立关联关系。 6 72.实现对以下指南文档中 [管理分布式账号](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/basic-services/account/manage-distributed-account.md) 示例代码片段的工程化,保证指南中示例代码与sample工程文件同源。 8 9### 效果预览 10 11| 首页 | 执行Log in and bind distributed account on the current system account | 12| :----------------------------------------------------------: | :----------------------------------------------------------: | 13| <img src="./screenshots/ManageDistributedAccount_1.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/ManageDistributedAccount_2.png" width="360" style="zoom:33%;" /> | 14| **执行Log out and unbind distributed account on the current system account** | **执行Log in and bind distributed account on the specified system account** | 15| <img src="./screenshots/ManageDistributedAccount_3.png" width="360" style="zoom:33%;" /> | <img src="./screenshots/ManageDistributedAccount_4.png" width="360" style="zoom:33%;" /> | 16| **执行Log out and unbind distributed account on the specified system account** | | 17| <img src="./screenshots/ManageDistributedAccount_5.png" width="360" style="zoom:33%;" /> | | 18 19### 使用说明 20 211. 在主界面,点击'Log in and bind distributed account on the current system account',执行Log in and bind distributed account on the current system account。 222. 点击'Log out and unbind distributed account on the current system account',执行Log out and unbind distributed account on the current system account。 233. 点击'Log in and bind distributed account on the specified system account',执行Log in and bind distributed account on the specified system account。 244. 点击'Log out and unbind distributed account on the specified system account',执行Log out and unbind distributed account on the specified system account。 255. 执行结果会即时反馈在屏幕中央,并在控制台打印log。 26 27### 工程目录 28 29``` 30entry/src/ 31 ├── main 32 │ ├── ets 33 │ │ ├── entryability 34 │ │ ├── entrybackupability 35 │ │ └── pages 36 │ │ └── Index.ets // 管理分布式账号示例代码 37 │ ├── module.json5 38 │ └── resources 39 ├── ohosTest 40 │ ├── ets 41 │ │ └── test 42 │ │ └── Ability.test.ets // 自动化测试代码 43``` 44 45### 相关权限 46 47ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS 48 49### 依赖 50 51不涉及。 52 53### 约束与限制 54 551.本示例仅支持标准系统上运行, 支持设备:RK3568。 56 572.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.58。 58 593.本示例需要使用DevEco Studio 5.0.1 Release (Build Version: 5.0.5.306, built on December 6, 2024)及以上版本才可编译运行。 60 61### 下载 62 63如需单独下载本工程,执行如下命令: 64 65```` 66git init 67git config core.sparsecheckout true 68echo code/DocsSample/Account/ManageDistributedAccount > .git/info/sparse-checkout 69git remote add origin https://gitee.com/openharmony/applications_app_samples.git 70git pull origin master 71````