提交 b41867d3 编写于 作者: Z zhangxinyue

bug fix

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