From 2e36e738ca39afc8d02f3d11013bd12f937cc874 Mon Sep 17 00:00:00 2001
From: zhaomingwork <61895407+zhaomingwork@users.noreply.github.com>
Date: 星期三, 08 十一月 2023 09:22:06 +0800
Subject: [PATCH] fix bug for h5 hotwords (#1067)
---
runtime/html5/static/main.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/html5/static/main.js b/runtime/html5/static/main.js
index 52a8d96..e8408e9 100644
--- a/runtime/html5/static/main.js
+++ b/runtime/html5/static/main.js
@@ -262,7 +262,7 @@
var obj = document.getElementById("varHot");
if(typeof(obj) == 'undefined' || obj==null || obj.value.length<=0){
- return "";
+ return null;
}
let val = obj.value.toString();
@@ -279,11 +279,11 @@
for(var i=0;i<result.length-1;i++)
wordstr=wordstr+result[i]+" ";
- jsonresult[wordstr.trim()]=result[result.length-1];
+ jsonresult[wordstr.trim()]= parseInt(result[result.length-1]);
}
}
console.log("jsonresult="+JSON.stringify(jsonresult));
- return jsonresult;
+ return JSON.stringify(jsonresult);
}
function getAsrMode(){
--
Gitblit v1.9.1