提交 a69a50b3 编写于 作者: Y yupeng

xiugai-api

Signed-off-by: Nyupeng <yupeng78@huawei.com>
上级 ea2c699b
...@@ -68,7 +68,6 @@ struct webONHttpErrorReceive { ...@@ -68,7 +68,6 @@ struct webONHttpErrorReceive {
} catch (error) { } catch (error) {
console.error(`ErrorCode: ${error.code}, Message: ${error.message}`); console.error(`ErrorCode: ${error.code}, Message: ${error.message}`);
} }
Utils.emitEvent(this.title, 490)
break; break;
} }
} }
...@@ -101,8 +100,7 @@ struct webONHttpErrorReceive { ...@@ -101,8 +100,7 @@ struct webONHttpErrorReceive {
Utils.emitEvent(event.response.getResponseMimeType(), 476); Utils.emitEvent(event.response.getResponseMimeType(), 476);
console.log('getResponseCode:' + event.response.getResponseCode()); console.log('getResponseCode:' + event.response.getResponseCode());
Utils.emitEvent(event.response.getResponseCode(), 478); Utils.emitEvent(event.response.getResponseCode(), 478);
this.title = JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(); console.log("this.title result is :" + JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl());
console.log("this.title result is :" + this.title);
console.log('getReasonMessage:' + event.response.getReasonMessage()); console.log('getReasonMessage:' + event.response.getReasonMessage());
Utils.emitEvent(event.response.getReasonMessage(), 480); Utils.emitEvent(event.response.getReasonMessage(), 480);
let result = event.request.getRequestHeader() let result = event.request.getRequestHeader()
...@@ -125,6 +123,7 @@ struct webONHttpErrorReceive { ...@@ -125,6 +123,7 @@ struct webONHttpErrorReceive {
console.log('The response header last result is ' + this.responseKey + this.responseValue); console.log('The response header last result is ' + this.responseKey + this.responseValue);
Utils.emitEvent(this.responseKey, 486); Utils.emitEvent(this.responseKey, 486);
Utils.emitEvent(this.responseValue, 488); Utils.emitEvent(this.responseValue, 488);
Utils.emitEvent(JSON.stringify(event.response.getResponseCode()) + event.request.getRequestUrl(), 490)
}) })
} }
} }
......
...@@ -83,15 +83,10 @@ struct webOnFirstContFour { ...@@ -83,15 +83,10 @@ struct webOnFirstContFour {
.onFirstContentfulPaint(event => { .onFirstContentfulPaint(event => {
console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" + console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" +
event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId) event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId)
if (event.firstContentfulPaintMs > 0 && event.firstContentfulPaintMs < 3000) { if (event.firstContentfulPaintMs > 0 && event.navigationStartTick > 0) {
this.firstcontentfulpaint = true; 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) Utils.emitEvent(this.firstcontentfulpaint, this.firstId)
console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId);
} }
}) })
} }
......
...@@ -82,7 +82,7 @@ struct webOnFirstContThree { ...@@ -82,7 +82,7 @@ struct webOnFirstContThree {
.onFirstContentfulPaint(event => { .onFirstContentfulPaint(event => {
console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" + console.log("onFirstContentfulPaint:" + "[navigationStartTick]:" +
event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId) event.navigationStartTick + ", [firstContentfulPaintMs]:" + event.firstContentfulPaintMs + this.firstId)
if (event.firstContentfulPaintMs > 0 && event.firstContentfulPaintMs < 5000) { if (event.firstContentfulPaintMs > 0 && event.navigationStartTick > 0) {
this.firstcontentfulpaint = true; this.firstcontentfulpaint = true;
console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId); console.error("result of onFirstContentfulPaint is: "+ this.firstcontentfulpaint + this.firstId);
} }
......
...@@ -85,11 +85,6 @@ struct webOnSslError { ...@@ -85,11 +85,6 @@ struct webOnSslError {
Utils.emitEvent(this.sslerrorText, this.firstId) Utils.emitEvent(this.sslerrorText, this.firstId)
return true 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
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
"deviceTypes": [ "deviceTypes": [
"tablet", "tablet",
"default", "default",
"phone" "phone",
"2in1"
], ],
"deliveryWithInstall": true, "deliveryWithInstall": true,
"installationFree": false, "installationFree": false,
...@@ -16,29 +17,33 @@ ...@@ -16,29 +17,33 @@
"pages": "$profile:main_pages", "pages": "$profile:main_pages",
"metadata": [ "metadata": [
{ {
"name": "ArkTSPartialUpdate", "name": "ArkTSPartialUpdate",
"value": "true" "value": "true"
} }
], ],
"abilities": [{ "abilities": [
"name": "com.example.myapplication.MainAbility", {
"srcEntrance": "./ets/MainAbility/MainAbility.ts", "name": "com.example.myapplication.MainAbility",
"description": "$string:phone_entry_main", "srcEntrance": "./ets/MainAbility/MainAbility.ts",
"icon": "$media:icon", "description": "$string:phone_entry_main",
"label": "$string:entry_label", "icon": "$media:icon",
"visible": true, "label": "$string:entry_label",
"orientation": "portrait", "visible": true,
"skills": [{ "orientation": "portrait",
"actions": [ "skills": [
"action.system.home" {
], "actions": [
"entities": [ "action.system.home"
"entity.system.home" ],
"entities": [
"entity.system.home"
]
}
] ]
}] }
}], ],
"requestPermissions": [ "requestPermissions": [
{ {
"name": "ohos.permission.LOCATION" "name": "ohos.permission.LOCATION"
}, },
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册