diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets index f627e324833e5009563e5e5a97875f12c9ded4ce..64cdc90d4653c19360a07eb04de10aa6c72c35dc 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webONHttpErrorReceive.ets @@ -68,7 +68,6 @@ struct webONHttpErrorReceive { } catch (error) { console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); } - Utils.emitEvent(this.title, 490) break; } } @@ -101,8 +100,7 @@ struct webONHttpErrorReceive { Utils.emitEvent(event.response.getResponseMimeType(), 476); console.log('getResponseCode:' + event.response.getResponseCode()); Utils.emitEvent(event.response.getResponseCode(), 478); - this.title = JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(); - console.log("this.title result is :" + this.title); + console.log("this.title result is :" + JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl()); console.log('getReasonMessage:' + event.response.getReasonMessage()); Utils.emitEvent(event.response.getReasonMessage(), 480); let result = event.request.getRequestHeader() @@ -125,6 +123,7 @@ struct webONHttpErrorReceive { console.log('The response header last result is ' + this.responseKey + this.responseValue); Utils.emitEvent(this.responseKey, 486); Utils.emitEvent(this.responseValue, 488); + Utils.emitEvent(JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(), 490) }) } } diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets index 5bad37e7c24ff74dca352cbdd5cf950e1e2156b8..3f8fbe198319fac498cc37ec12acd38775e8ee73 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContFour.ets @@ -83,15 +83,10 @@ struct webOnFirstContFour { .onFirstContentfulPaint(event => { console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" + event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId) - if (event.firstContentfulPaintMs > 0 && event.firstContentfulPaintMs < 3000) { + if (event.firstContentfulPaintMs > 0 && event.navigationStartTick > 0) { this.firstcontentfulpaint = true; - console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); - } - }) - .onPageEnd((event) => { - console.log('url' + event.url + this.firstcontentfulpaint + this.firstId); - if (this.firstBoo) { Utils.emitEvent(this.firstcontentfulpaint, this.firstId) + console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); } }) } diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContThree.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContThree.ets index cff6f06f1f43e2d5f16e61030e3e711e1900d600..a7d80ac01ea2bb1b5345f4ffb32596aa0ac1d969 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContThree.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnFirstContThree.ets @@ -82,7 +82,7 @@ struct webOnFirstContThree { .onFirstContentfulPaint(event => { console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" + event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId) - if (event.firstContentfulPaintMs > 0 && event.firstContentfulPaintMs < 5000) { + if (event.firstContentfulPaintMs > 0 && event.navigationStartTick > 0) { this.firstcontentfulpaint = true; console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); } diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets index c89ef844de4b2d3d14b4312912c460b6062f0fe9..58ce74dcdf442ca9a5a5ce6436f840658f26d5b0 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/ets/MainAbility/pages/webOnSslError.ets @@ -85,11 +85,6 @@ struct webOnSslError { Utils.emitEvent(this.sslerrorText, this.firstId) return true }) - .onErrorReceive((event) => { - console.log('getErrorInfo:' + event.error.getErrorInfo()) - console.log('getErrorCode:' + event.error.getErrorCode()) - console.log('url:' + event.request.getRequestUrl()) - }) } } } \ No newline at end of file diff --git a/arkui/ace_ets_web_dev_webController/entry/src/main/module.json b/arkui/ace_ets_web_dev_webController/entry/src/main/module.json index 0729db882db60f8b8798a190efe02dbd546c03b4..0cc1dc2bd069ef62d5e58d99ac603873200ef6f6 100644 --- a/arkui/ace_ets_web_dev_webController/entry/src/main/module.json +++ b/arkui/ace_ets_web_dev_webController/entry/src/main/module.json @@ -8,7 +8,8 @@ "deviceTypes": [ "tablet", "default", - "phone" + "phone", + "2in1" ], "deliveryWithInstall": true, "installationFree": false, @@ -16,29 +17,33 @@ "pages": "$profile:main_pages", "metadata": [ { - "name": "ArkTSPartialUpdate", - "value": "true" + "name": "ArkTSPartialUpdate", + "value": "true" } - ], - "abilities": [{ - "name": "com.example.myapplication.MainAbility", - "srcEntrance": "./ets/MainAbility/MainAbility.ts", - "description": "$string:phone_entry_main", - "icon": "$media:icon", - "label": "$string:entry_label", - "visible": true, - "orientation": "portrait", - "skills": [{ - "actions": [ - "action.system.home" - ], - "entities": [ - "entity.system.home" + ], + "abilities": [ + { + "name": "com.example.myapplication.MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:phone_entry_main", + "icon": "$media:icon", + "label": "$string:entry_label", + "visible": true, + "orientation": "portrait", + "skills": [ + { + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + } ] - }] - }], + } + ], "requestPermissions": [ - { + { "name": "ohos.permission.LOCATION" }, {