提交 b41867d3 编写于 作者: Z zhangxinyue

bug fix

Signed-off-by: Nzhangxinyue <zhangxinyue38@huawei.com>
上级 2dcaede2
...@@ -61,7 +61,8 @@ ...@@ -61,7 +61,8 @@
"pages/index", "pages/index",
"pages/webStyle", "pages/webStyle",
"pages/webProp", "pages/webProp",
"pages/webEvent" "pages/webEvent",
"pages/webExtra"
], ],
"name": ".MainAbility", "name": ".MainAbility",
"window": { "window": {
......
...@@ -224,7 +224,11 @@ struct Index { ...@@ -224,7 +224,11 @@ struct Index {
console.log('error:' + error); console.log('error:' + error);
return; return;
} }
this.text = result.toString(); if (result > 20000) {
this.text = "true"
} else {
this.text = "false"
}
console.log("usage is:" + this.text) console.log("usage is:" + this.text)
}) })
setTimeout(()=>{ setTimeout(()=>{
...@@ -240,7 +244,12 @@ struct Index { ...@@ -240,7 +244,12 @@ struct Index {
.then(usage=>{ .then(usage=>{
console.log('usage: '+usage) console.log('usage: '+usage)
setTimeout(()=>{ setTimeout(()=>{
Utils.emitEvent(usage.toString(),447) if (usage > 20000) {
this.text = "true"
} else {
this.text = "false"
}
Utils.emitEvent(this.text,447)
},3000) },3000)
}) })
.catch(error=>{ .catch(error=>{
......
...@@ -151,7 +151,7 @@ export default function webJsunit() { ...@@ -151,7 +151,7 @@ export default function webJsunit() {
*/ */
it('getOriginUsage',0,async function(done){ it('getOriginUsage',0,async function(done){
emitKey="emitGetOriginQuota"; emitKey="emitGetOriginQuota";
Utils.registerEvent("getOriginUsage","24576",432,done); Utils.registerEvent("getOriginUsage","true",432,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -231,7 +231,7 @@ export default function webJsunit() { ...@@ -231,7 +231,7 @@ export default function webJsunit() {
*/ */
it('getOriginUsagePromise',0,async function(done){ it('getOriginUsagePromise',0,async function(done){
emitKey="emitGetOriginQuotaPromise"; emitKey="emitGetOriginQuotaPromise";
Utils.registerEvent("getOriginUsagePromise",'24576',447,done); Utils.registerEvent("getOriginUsagePromise",'true',447,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册