提交 25e62501 编写于 作者: Z zhangxinyue

bug fix

Signed-off-by: Nzhangxinyue <zhangxinyue38@huawei.com>
上级 95430a3d
...@@ -255,8 +255,12 @@ struct Index { ...@@ -255,8 +255,12 @@ struct Index {
console.log('error:' + error); console.log('error:' + error);
return; return;
} }
this.text = result.toString(); if (result > 2500000000) {
console.log("usage is:" + this.text) this.text = "true"
} else {
this.text = "false"
}
console.log("usage is:" + result)
}) })
setTimeout(()=>{ setTimeout(()=>{
Utils.emitEvent(this.text,434) Utils.emitEvent(this.text,434)
...@@ -269,7 +273,12 @@ struct Index { ...@@ -269,7 +273,12 @@ struct Index {
.then(quota=>{ .then(quota=>{
console.log('usage: '+quota) console.log('usage: '+quota)
setTimeout(()=>{ setTimeout(()=>{
Utils.emitEvent(quota.toString(),448) if (result > 2500000000) {
this.text = "true"
} else {
this.text = "false"
}
Utils.emitEvent(this.text,448)
},3000) },3000)
}) })
.catch(error=>{ .catch(error=>{
......
...@@ -161,7 +161,7 @@ export default function webJsunit() { ...@@ -161,7 +161,7 @@ export default function webJsunit() {
*/ */
it('getOriginQuota',0,async function(done){ it('getOriginQuota',0,async function(done){
emitKey="emitGetOrigins"; emitKey="emitGetOrigins";
Utils.registerEvent("getOriginQuota","2575722086",434,done); Utils.registerEvent("getOriginQuota","true",434,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
...@@ -241,7 +241,7 @@ export default function webJsunit() { ...@@ -241,7 +241,7 @@ export default function webJsunit() {
*/ */
it('getOriginQuotaPromise',0,async function(done){ it('getOriginQuotaPromise',0,async function(done){
emitKey="emitGetOriginsPromise"; emitKey="emitGetOriginsPromise";
Utils.registerEvent("getOriginQuotaPromise",'2575722086',448,done); Utils.registerEvent("getOriginQuotaPromise",'true',448,done);
sendEventByKey('webcomponent',10,''); sendEventByKey('webcomponent',10,'');
}) })
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册