提交 7112ca13 编写于 作者: T tianwenzhe

add change

Signed-off-by: Ntian-wenzhe411 <tianwenzhe2@huawei.com>
上级 e2641614
import AbilityStage from "@ohos.application.AbilityStage" import AbilityStage from "@ohos.app.ability.AbilityStage"
import Logger from '../pages/model/Logger' import Logger from '../pages/model/Logger'
export default class MyAbilityStage extends AbilityStage { export default class MyAbilityStage extends AbilityStage {
......
import Ability from '@ohos.application.Ability' import Ability from '@ohos.app.ability.UIAbility'
import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import abilityAccessCtrl from '@ohos.abilityAccessCtrl';
export default class MainAbility extends Ability { export default class MainAbility extends Ability {
...@@ -17,15 +17,15 @@ export default class MainAbility extends Ability { ...@@ -17,15 +17,15 @@ export default class MainAbility extends Ability {
console.log("[Demo] MainAbility onWindowStageCreate") console.log("[Demo] MainAbility onWindowStageCreate")
let AtManager = abilityAccessCtrl.createAtManager(); let AtManager = abilityAccessCtrl.createAtManager();
AtManager.requestPermissionsFromUser(this.context,["ohos.permission.READ_MEDIA","ohos.permission.WRITE_MEDIA", AtManager.requestPermissionsFromUser(this.context,['ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA',
"ohos.permission.CAPTURE_SCREEN","ohos.permission.INTERNET","ohos.permission.CAMERA", 'ohos.permission.CAPTURE_SCREEN', 'ohos.permission.INTERNET', 'ohos.permission.CAMERA',
"ohos.permission.MICROPHONE", "ohos.permission.START_INVISIBLE_ABILITY"]).then(() => {}) 'ohos.permission.MICROPHONE', 'ohos.permission.START_INVISIBLE_ABILITY']).then( () => {} );
windowStage.loadContent("pages/index", (err, data) => { windowStage.loadContent('pages/index', (err, data) => {
if (err.code) { if (err.code) {
console.error('Failed to load the content. Cause:' + JSON.stringify(err)); console.error( 'Failed to load the content. Cause:' + JSON.stringify(err) );
return; return;
} }
console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) console.info( 'Succeeded in loading the content. Data: ' + JSON.stringify(data) );
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册