Commit 20699f42 authored by liujiaxin's avatar liujiaxin

feat: add vconsole

parent 5771e98b
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
<link href="./index.css" rel="stylesheet"> <link href="./index.css" rel="stylesheet">
<script type="text/javascript"src="//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air_online_open.js"></script> <script type="text/javascript"src="//staging-teach.cdn.ireadabc.com/h5template/h5-static-lib/js/air_online_open.js"></script>
<!-- <script src='https://cdn.bootcss.com/vConsole/3.2.2/vconsole.min.js' type="text/javascript" charset="utf-8"></script> <script src='https://cdn.bootcss.com/vConsole/3.9.2/vconsole.min.js' type="text/javascript" charset="utf-8"></script>
<script> <script>
window.vConsole = new window.VConsole() window.vConsole = new window.VConsole()
</script> --> </script>
</head> </head>
<body> <body>
...@@ -206,4 +206,4 @@ ...@@ -206,4 +206,4 @@
</body> </body>
<script src="./index.js"></script> <script src="./index.js"></script>
<script src="./util.js"></script> <script src="./util.js"></script>
</html> </html>
\ No newline at end of file
...@@ -837,9 +837,9 @@ function bindConfirmBtn() { ...@@ -837,9 +837,9 @@ function bindConfirmBtn() {
let data = JSON.parse(recorderArr[i].data); let data = JSON.parse(recorderArr[i].data);
text += " " + data.text; text += " " + data.text;
} }
console.log('greadPapersForText1', text);
cw.greadPapersForText(text, function (data) { cw.greadPapersForText(text, function (data) {
console.log('greadPapersForText2', data);
stuUserAspect.recorderScoreObj = { stuUserAspect.recorderScoreObj = {
result: data, result: data,
text: text text: text
...@@ -859,11 +859,16 @@ function bindConfirmBtn() { ...@@ -859,11 +859,16 @@ function bindConfirmBtn() {
} }
function drawResult(data, text) { function drawResult(data, text) {
console.log('drawResult data', data);
console.log('drawResult text', text);
$("#exercise").hide(); $("#exercise").hide();
$("#result").show(); $("#result").show();
let temp = {overall: 0,detail: null}
try{
temp = JSON.parse(data);
}catch (e) {
let temp = JSON.parse(data); }
const timeLen = stuUserAspect.recorderTimeLenArr.reduce((a, b) => a + b, 0); const timeLen = stuUserAspect.recorderTimeLenArr.reduce((a, b) => a + b, 0);
let { integrity, fluency } = scoreByText(text, $("#keyWord").val(), timeLen); let { integrity, fluency } = scoreByText(text, $("#keyWord").val(), timeLen);
...@@ -926,6 +931,9 @@ function insertString(string, insert, index){ ...@@ -926,6 +931,9 @@ function insertString(string, insert, index){
} }
function annotation(text, detail){ function annotation(text, detail){
if (!detail) {
return {annotationHtml: '', evaluateHtml: '很遗憾您这次没有获得成绩,下次请认真对待哦~'};
}
let annotationHtml = ""; let annotationHtml = "";
const allFeatureAdvice = detail.AllFeatureAdvice; const allFeatureAdvice = detail.AllFeatureAdvice;
let evaluateHtml = `${allFeatureAdvice.WordDiversity};${allFeatureAdvice.Structure};${allFeatureAdvice.Spelling};${allFeatureAdvice.Grammar}<br>`; let evaluateHtml = `${allFeatureAdvice.WordDiversity};${allFeatureAdvice.Structure};${allFeatureAdvice.Spelling};${allFeatureAdvice.Grammar}<br>`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment