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

!8518 accesstoken-guidelines.md代码空格缩进问题

Merge pull request !8518 from 三三四四/feature_2
...@@ -47,30 +47,30 @@ ...@@ -47,30 +47,30 @@
```json ```json
{ {
"module" : { "module" : {
"reqPermissions":[ "reqPermissions":[
{ {
"name" : "ohos.permission.PERMISSION1", "name" : "ohos.permission.PERMISSION1",
"reason": "$string:reason", "reason": "$string:reason",
"usedScene": { "usedScene": {
"ability": [ "ability": [
"FormAbility" "FormAbility"
], ],
"when":"inuse" "when":"inuse"
} }
}, },
{ {
"name" : "ohos.permission.PERMISSION2", "name" : "ohos.permission.PERMISSION2",
"reason": "$string:reason", "reason": "$string:reason",
"usedScene": { "usedScene": {
"ability": [ "ability": [
"FormAbility" "FormAbility"
], ],
"when":"always" "when":"always"
} }
} }
] ]
} }
} }
``` ```
...@@ -82,30 +82,30 @@ ...@@ -82,30 +82,30 @@
```json ```json
{ {
"module" : { "module" : {
"requestPermissions":[ "requestPermissions":[
{ {
"name" : "ohos.permission.PERMISSION1", "name" : "ohos.permission.PERMISSION1",
"reason": "$string:reason", "reason": "$string:reason",
"usedScene": { "usedScene": {
"abilities": [ "abilities": [
"FormAbility" "FormAbility"
], ],
"when":"inuse" "when":"inuse"
} }
}, },
{ {
"name" : "ohos.permission.PERMISSION2", "name" : "ohos.permission.PERMISSION2",
"reason": "$string:reason", "reason": "$string:reason",
"usedScene": { "usedScene": {
"abilities": [ "abilities": [
"FormAbility" "FormAbility"
], ],
"when":"always" "when":"always"
} }
} }
] ],
} }
} }
``` ```
...@@ -119,11 +119,11 @@ ...@@ -119,11 +119,11 @@
```json ```json
{ {
"acls": { "acls": {
"allowed-acls": [ "allowed-acls": [
"ohos.permission.PERMISSION2" "ohos.permission.PERMISSION2"
] ]
} },
} }
``` ```
...@@ -154,12 +154,12 @@ ...@@ -154,12 +154,12 @@
let array:Array<string> = ["ohos.permission.PERMISSION2"]; let array:Array<string> = ["ohos.permission.PERMISSION2"];
//requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗 //requestPermissionsFromUser会判断权限的授权状态来决定是否唤起弹窗
context.requestPermissionsFromUser(array).then(function(data) { context.requestPermissionsFromUser(array).then(function(data) {
console.log("data type:" + typeof(data)); console.log("data type:" + typeof(data));
console.log("data:" + data); console.log("data:" + data);
console.log("data permissions:" + data.permissions); console.log("data permissions:" + data.permissions);
console.log("data result:" + data.authResults); console.log("data result:" + data.authResults);
}, (err) => { }, (err) => {
console.error('Failed to start ability', err.code); console.error('Failed to start ability', err.code);
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册