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

!4887 元能力-编译报错修改

Merge pull request !4887 from chengxingzhen/master
...@@ -131,8 +131,8 @@ export default function ConnectAbilityTest() { ...@@ -131,8 +131,8 @@ export default function ConnectAbilityTest() {
var deviceid = "0"; var deviceid = "0";
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.deviceId));
deviceid = data.ability.deviceId; deviceid = data.deviceId;
}) })
await sleep(500); await sleep(500);
var request1 = { var request1 = {
...@@ -167,8 +167,8 @@ export default function ConnectAbilityTest() { ...@@ -167,8 +167,8 @@ export default function ConnectAbilityTest() {
var deviceid = "0"; var deviceid = "0";
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.deviceId));
deviceid = data.ability.deviceId; deviceid = data.deviceId;
}) })
await sleep(500); await sleep(500);
var request2 = { var request2 = {
......
...@@ -126,8 +126,8 @@ export default function ConnectAbilityTest(abilityContext) { ...@@ -126,8 +126,8 @@ export default function ConnectAbilityTest(abilityContext) {
var deviceid = "0"; var deviceid = "0";
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.deviceId));
deviceid = data.ability.deviceId; deviceid = data.deviceId;
}) })
await sleep(500); await sleep(500);
var request1 = { var request1 = {
...@@ -157,8 +157,8 @@ export default function ConnectAbilityTest(abilityContext) { ...@@ -157,8 +157,8 @@ export default function ConnectAbilityTest(abilityContext) {
var deviceid = "0"; var deviceid = "0";
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceid:' + JSON.stringify(data.deviceId));
deviceid = data.ability.deviceId; deviceid = data.deviceId;
}) })
await sleep(500); await sleep(500);
var request2 = { var request2 = {
......
...@@ -37,7 +37,6 @@ struct Third { ...@@ -37,7 +37,6 @@ struct Third {
private content: string = "Third Page" private content: string = "Third Page"
private contextText: string= ''; private contextText: string= '';
private localDeviceId: string= ''; private localDeviceId: string= '';
private backgroundColor = Color.Grey;
private tipsMsg = '请输入对端的deviceId'; private tipsMsg = '请输入对端的deviceId';
private isOn = false; private isOn = false;
...@@ -100,7 +99,7 @@ struct Third { ...@@ -100,7 +99,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
this.updateModuleUpgradeFlag('StartAbilityPromise006','entry'); this.updateModuleUpgradeFlag('StartAbilityPromise006','entry');
}); });
...@@ -112,7 +111,7 @@ struct Third { ...@@ -112,7 +111,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -136,7 +135,7 @@ struct Third { ...@@ -136,7 +135,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -156,7 +155,7 @@ struct Third { ...@@ -156,7 +155,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
if ('' === remoteDeviceId && '' === this.contextText) { if ('' === remoteDeviceId && '' === this.contextText) {
this.tips(this.tipsMsg); this.tips(this.tipsMsg);
...@@ -185,7 +184,7 @@ struct Third { ...@@ -185,7 +184,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
this.updateModuleUpgradeFlag('StartAbilityPromiseKSB006','entry'); this.updateModuleUpgradeFlag('StartAbilityPromiseKSB006','entry');
}); });
...@@ -197,7 +196,7 @@ struct Third { ...@@ -197,7 +196,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -218,7 +217,7 @@ struct Third { ...@@ -218,7 +217,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
if ('' === remoteDeviceId && '' === this.contextText) { if ('' === remoteDeviceId && '' === this.contextText) {
this.tips(this.tipsMsg); this.tips(this.tipsMsg);
...@@ -248,7 +247,7 @@ struct Third { ...@@ -248,7 +247,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -360,7 +359,7 @@ struct Third { ...@@ -360,7 +359,7 @@ struct Third {
console.log('[startAbility] get device onBackPress out'); console.log('[startAbility] get device onBackPress out');
} }
private aboutToAppear(): void { aboutToAppear(): void {
console.info('[startAbility] aboutToAppear in'); console.info('[startAbility] aboutToAppear in');
remoteDeviceModel = new RemoteDeviceModel; remoteDeviceModel = new RemoteDeviceModel;
remoteDeviceModel.registerDeviceListCallback(); remoteDeviceModel.registerDeviceListCallback();
...@@ -378,7 +377,7 @@ struct Third { ...@@ -378,7 +377,7 @@ struct Third {
console.info('[startAbility] onPageShow deviceId is ' + remoteDeviceId); console.info('[startAbility] onPageShow deviceId is ' + remoteDeviceId);
} }
private aboutToDisappear() { aboutToDisappear() {
console.info('[startAbility] aboutToDisappear in'); console.info('[startAbility] aboutToDisappear in');
remoteDeviceModel.unregisterDeviceListCallback(); remoteDeviceModel.unregisterDeviceListCallback();
console.info('[startAbility] aboutToDisappear out'); console.info('[startAbility] aboutToDisappear out');
......
...@@ -35,8 +35,6 @@ async function routePage() { ...@@ -35,8 +35,6 @@ async function routePage() {
@Component @Component
struct Index { struct Index {
private backgroundColor = Color.Grey;
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('hm2') Text('hm2')
...@@ -62,7 +60,7 @@ struct Index { ...@@ -62,7 +60,7 @@ struct Index {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
......
...@@ -301,8 +301,8 @@ export default function startAbilityTest() { ...@@ -301,8 +301,8 @@ export default function startAbilityTest() {
var deviceId = ""; var deviceId = "";
await abilityManager.getTopAbility((err, data) => { await abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.deviceId));
deviceId = data.ability.deviceId; deviceId = data.deviceId;
}) })
await sleep(1000); await sleep(1000);
let details; let details;
...@@ -340,8 +340,8 @@ export default function startAbilityTest() { ...@@ -340,8 +340,8 @@ export default function startAbilityTest() {
var deviceId = ""; var deviceId = "";
await abilityManager.getTopAbility((err, data) => { await abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.deviceId));
deviceId = data.ability.deviceId; deviceId = data.deviceId;
}) })
await sleep(1000); await sleep(1000);
let details; let details;
...@@ -559,7 +559,7 @@ export default function startAbilityTest() { ...@@ -559,7 +559,7 @@ export default function startAbilityTest() {
"bundleName": "com.example.qianyiyingyong.hmservice", "bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility", "abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry", "moduleName": "entry",
"flags": '94.31' "flags": 94.31
} }
} }
await featureAbility.startAbility(str).then((data) => { await featureAbility.startAbility(str).then((data) => {
...@@ -594,7 +594,7 @@ export default function startAbilityTest() { ...@@ -594,7 +594,7 @@ export default function startAbilityTest() {
"bundleName": "com.example.qianyiyingyong.hmservice", "bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility", "abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry", "moduleName": "entry",
"flags": '94.31' "flags": 94.31
} }
} }
await featureAbility.startAbility(str).then((data) => { await featureAbility.startAbility(str).then((data) => {
...@@ -625,7 +625,6 @@ export default function startAbilityTest() { ...@@ -625,7 +625,6 @@ export default function startAbilityTest() {
"bundleName": "com.example.qianyiyingyong.hmservice", "bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility", "abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry", "moduleName": "entry",
"flags": ''
} }
} }
await featureAbility.startAbility(str).then((data) => { await featureAbility.startAbility(str).then((data) => {
...@@ -660,7 +659,6 @@ export default function startAbilityTest() { ...@@ -660,7 +659,6 @@ export default function startAbilityTest() {
"bundleName": "com.example.qianyiyingyong.hmservice", "bundleName": "com.example.qianyiyingyong.hmservice",
"abilityName": "com.example.qianyiyingyong.MainAbility", "abilityName": "com.example.qianyiyingyong.MainAbility",
"moduleName": "entry", "moduleName": "entry",
"flags": ''
} }
} }
await featureAbility.startAbility(str).then((data) => { await featureAbility.startAbility(str).then((data) => {
......
...@@ -34,7 +34,6 @@ struct Third { ...@@ -34,7 +34,6 @@ struct Third {
private content: string = "Third Page" private content: string = "Third Page"
private contextText: string= ''; private contextText: string= '';
private localDeviceId: string= ''; private localDeviceId: string= '';
private backgroundColor = Color.Grey;
private tipsMsg = '请输入对端的deviceId'; private tipsMsg = '请输入对端的deviceId';
private isOn = false; private isOn = false;
...@@ -97,7 +96,7 @@ struct Third { ...@@ -97,7 +96,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -120,7 +119,7 @@ struct Third { ...@@ -120,7 +119,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -139,7 +138,7 @@ struct Third { ...@@ -139,7 +138,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
this.updateModuleUpgradeFlag('fAStartAbilityPromiseSameBundleName006','entry'); this.updateModuleUpgradeFlag('fAStartAbilityPromiseSameBundleName006','entry');
}); });
...@@ -151,7 +150,7 @@ struct Third { ...@@ -151,7 +150,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
if ('' === remoteDeviceId && '' === this.contextText) { if ('' === remoteDeviceId && '' === this.contextText) {
this.tips(this.tipsMsg); this.tips(this.tipsMsg);
...@@ -179,7 +178,7 @@ struct Third { ...@@ -179,7 +178,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
if ('' === remoteDeviceId && '' === this.contextText) { if ('' === remoteDeviceId && '' === this.contextText) {
this.tips(this.tipsMsg); this.tips(this.tipsMsg);
...@@ -207,7 +206,7 @@ struct Third { ...@@ -207,7 +206,7 @@ struct Third {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
...@@ -317,7 +316,7 @@ struct Third { ...@@ -317,7 +316,7 @@ struct Third {
console.log('[startAbility] get device onBackPress out'); console.log('[startAbility] get device onBackPress out');
} }
private aboutToAppear(): void { aboutToAppear(): void {
console.info('[startAbility] aboutToAppear in'); console.info('[startAbility] aboutToAppear in');
remoteDeviceModel = new RemoteDeviceModel; remoteDeviceModel = new RemoteDeviceModel;
remoteDeviceModel.registerDeviceListCallback(); remoteDeviceModel.registerDeviceListCallback();
...@@ -335,7 +334,7 @@ struct Third { ...@@ -335,7 +334,7 @@ struct Third {
console.info('[startAbility] onPageShow deviceId is ' + remoteDeviceId); console.info('[startAbility] onPageShow deviceId is ' + remoteDeviceId);
} }
private aboutToDisappear() { aboutToDisappear() {
console.info('[startAbility] aboutToDisappear in'); console.info('[startAbility] aboutToDisappear in');
remoteDeviceModel.unregisterDeviceListCallback(); remoteDeviceModel.unregisterDeviceListCallback();
console.info('[startAbility] aboutToDisappear out'); console.info('[startAbility] aboutToDisappear out');
......
...@@ -35,8 +35,6 @@ async function routePage() { ...@@ -35,8 +35,6 @@ async function routePage() {
@Component @Component
struct Index { struct Index {
private backgroundColor = Color.Grey;
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Text('Hello World') Text('Hello World')
...@@ -62,7 +60,7 @@ struct Index { ...@@ -62,7 +60,7 @@ struct Index {
.fontColor(Color.White) .fontColor(Color.White)
.fontWeight(FontWeight.Bold) .fontWeight(FontWeight.Bold)
.margin({ top: 20 }) .margin({ top: 20 })
.backgroundColor(this.backgroundColor) .backgroundColor(Color.Grey)
.onClick(() => { .onClick(() => {
var str = { var str = {
'want': { 'want': {
......
...@@ -19,7 +19,6 @@ import router from '@system.router'; ...@@ -19,7 +19,6 @@ import router from '@system.router';
@Component @Component
struct Index { struct Index {
@State message: string = 'Hello World' @State message: string = 'Hello World'
private height: number = 25
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
......
...@@ -24,7 +24,6 @@ const ABILITY_NAME1 = 'hnm2MainAbility'; ...@@ -24,7 +24,6 @@ const ABILITY_NAME1 = 'hnm2MainAbility';
@Entry @Entry
@Component @Component
struct Index { struct Index {
private backgroundColor = Color.Grey;
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
......
...@@ -24,7 +24,6 @@ const ABILITY_NAME1 = 'hnm2MainAbility'; ...@@ -24,7 +24,6 @@ const ABILITY_NAME1 = 'hnm2MainAbility';
@Entry @Entry
@Component @Component
struct Index { struct Index {
private backgroundColor = Color.Grey;
build() { build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
......
...@@ -316,8 +316,8 @@ export default function startAbilityTest(abilityContext) { ...@@ -316,8 +316,8 @@ export default function startAbilityTest(abilityContext) {
await sleep(1000); await sleep(1000);
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.deviceId));
deviceId = data.ability.deviceId; deviceId = data.deviceId;
}) })
await sleep(2000); await sleep(2000);
var str = { var str = {
...@@ -355,8 +355,8 @@ export default function startAbilityTest(abilityContext) { ...@@ -355,8 +355,8 @@ export default function startAbilityTest(abilityContext) {
await sleep(1000); await sleep(1000);
abilityManager.getTopAbility((err, data) => { abilityManager.getTopAbility((err, data) => {
console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err)); console.log(TAG + 'getTopAbility result: ' + JSON.stringify(data) + " , err: " + JSON.stringify(err));
console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.ability.deviceId)); console.log(TAG + 'getTopAbility result deviceId:' + JSON.stringify(data.deviceId));
deviceId = data.ability.deviceId; deviceId = data.deviceId;
}) })
await sleep(2000); await sleep(2000);
var str = { var str = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册