Commit 20699f42 authored by liujiaxin's avatar liujiaxin

feat: add vconsole

parent 5771e98b
......@@ -12,10 +12,10 @@
<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 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>
window.vConsole = new window.VConsole()
</script> -->
</script>
</head>
<body>
......@@ -206,4 +206,4 @@
</body>
<script src="./index.js"></script>
<script src="./util.js"></script>
</html>
\ No newline at end of file
</html>
......@@ -837,9 +837,9 @@ function bindConfirmBtn() {
let data = JSON.parse(recorderArr[i].data);
text += " " + data.text;
}
console.log('greadPapersForText1', text);
cw.greadPapersForText(text, function (data) {
console.log('greadPapersForText2', data);
stuUserAspect.recorderScoreObj = {
result: data,
text: text
......@@ -859,11 +859,16 @@ function bindConfirmBtn() {
}
function drawResult(data, text) {
console.log('drawResult data', data);
console.log('drawResult text', text);
$("#exercise").hide();
$("#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);
let { integrity, fluency } = scoreByText(text, $("#keyWord").val(), timeLen);
......@@ -926,6 +931,9 @@ function insertString(string, insert, index){
}
function annotation(text, detail){
if (!detail) {
return {annotationHtml: '', evaluateHtml: '很遗憾您这次没有获得成绩,下次请认真对待哦~'};
}
let annotationHtml = "";
const allFeatureAdvice = detail.AllFeatureAdvice;
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