diff --git a/product/phone/src/main/ets/pages/compatibilityAssessment.ets b/product/phone/src/main/ets/pages/compatibilityAssessment.ets index 1ea7e8486814b5bab5180db2f8ead1889b0c3917..002d083f9d4a257d8c6366ea62e998090d47cd8a 100644 --- a/product/phone/src/main/ets/pages/compatibilityAssessment.ets +++ b/product/phone/src/main/ets/pages/compatibilityAssessment.ets @@ -40,6 +40,14 @@ struct compatibilityAssessment { .height($r("app.float.wh_value_64")) .width($r("app.float.wh_value_64")) .margin({top: $r("app.float.wh_value_32")}) + .onError((error)=>{ + LogUtil.info(MODULE_TAG + "load image error: " + this.assessmentImage + + "message: " + error?.message); + }) + .onComplete((event)=>{ + LogUtil.info(MODULE_TAG + "load image complete: width" + event?.width + + "height: " + event?.height); + }) Text(this.assessmentResult) .fontFamily('HarmonyHeiTi') .fontSize($r("app.float.font_20")) @@ -94,6 +102,8 @@ struct compatibilityAssessment { } aboutToAppear(): void{ + this.assessmentImage = '/res/image/assessmentQueryFailed-light.svg' + LogUtil.info(MODULE_TAG + "load image path00: " + this.assessmentImage); this.assessmentIntroduction = JSON.parse(JSON.stringify($r("app.string.assessmentIntroduction"))) try { deviceAttest.getAttestStatus().then((attestResultInfo) => { @@ -107,24 +117,28 @@ struct compatibilityAssessment { this.assessmentResult =JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailed"))) this.assessmentImage = '/res/image/assessmentQueryFailed-light.svg' this.assessmentResultText = JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailedText"))) + LogUtil.info(MODULE_TAG + "load image path1: " + this.assessmentImage); }else{ this.assessmentResult =JSON.parse(JSON.stringify($r("app.string.assessmentPassFailed"))) this.assessmentImage = '/res/image/assessmentPassFailed-light.svg' this.assessmentResultText = JSON.parse(JSON.stringify($r("app.string.assessmentPassFailedText"))) } LogUtil.info(MODULE_TAG + "attestResultInfo success"+JSON.stringify(attestResultInfo)); + LogUtil.info(MODULE_TAG + "load image path2: " + this.assessmentImage); }) .catch((error: BusinessError) => { this.assessmentResult =JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailed"))) this.assessmentImage = '/res/image/assessmentQueryFailed-light.svg' this.assessmentResultText = JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailedText"))) LogUtil.info(MODULE_TAG + "assessmentQueryFailed"+error); + LogUtil.info(MODULE_TAG + "load image path3: " + this.assessmentImage); }); }catch (error){ this.assessmentResult =JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailed"))) this.assessmentImage = '/res/image/assessmentQueryFailed-light.svg' this.assessmentResultText = JSON.parse(JSON.stringify($r("app.string.assessmentQueryFailedText"))) LogUtil.info(MODULE_TAG + "assessmentQueryFailed"+error); + LogUtil.info(MODULE_TAG + "load image path4: " + this.assessmentImage); } }