Commit da264751 authored by Chen Jiping's avatar Chen Jiping

Merge branch 'master' of http://vcs.ireadabc.com/template/JM-07

parents 85284206 efcc58a5
...@@ -762,7 +762,7 @@ body { ...@@ -762,7 +762,7 @@ body {
z-index: 400; z-index: 400;
bottom: 0rem; bottom: 0rem;
left: -0.65rem; left: -0.65rem;
animation: celebrate 1s steps(18); animation: celebrate 1s steps(18) forwards;
} }
@keyframes celebrate { @keyframes celebrate {
......
...@@ -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.2.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>
......
...@@ -91,6 +91,10 @@ $(function () { ...@@ -91,6 +91,10 @@ $(function () {
//初始化监听事件 //初始化监听事件
initListener(); initListener();
console.log('-----------------');
console.log();
console.log('-----------------');
//在页面加载、事件、动画等都初始化完成后,一定要记得调用此方法,否则模板将是不可用的 //在页面加载、事件、动画等都初始化完成后,一定要记得调用此方法,否则模板将是不可用的
window.air.hideAirClassLoading(key, this.data); window.air.hideAirClassLoading(key, this.data);
}); });
...@@ -829,8 +833,6 @@ function drawResult(data, text) { ...@@ -829,8 +833,6 @@ function drawResult(data, text) {
$("#exercise").hide(); $("#exercise").hide();
$("#result").show(); $("#result").show();
console.log(data);
let temp = JSON.parse(data); 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);
...@@ -867,6 +869,17 @@ function drawResult(data, text) { ...@@ -867,6 +869,17 @@ function drawResult(data, text) {
$("#score").empty().append(score); $("#score").empty().append(score);
$("#recorder-text").html(annotationHtml); $("#recorder-text").html(annotationHtml);
$("#evaluation").html(evaluateHtml); $("#evaluation").html(evaluateHtml);
// 上报成绩
cw.sendAnswer({
"duration": timeLen,
"recorderArr": stuUserAspect.recorderArr,
"score": score,
"complete": Math.floor(integrity * 100),
"fluent": Math.floor(fluency * 100),
"grammar": temp.overall,
"detail": temp.detail
});
} }
function insertString(string, insert, index){ function insertString(string, insert, index){
...@@ -904,8 +917,10 @@ function annotation(text, detail){ ...@@ -904,8 +917,10 @@ function annotation(text, detail){
function scoreByText(text, keyWords, timeLen) { function scoreByText(text, keyWords, timeLen) {
const smallText = text.toLowerCase(); const smallText = text.toLowerCase();
let detailArr = [];
const detailArr = keyWords; if(keyWords){
detailArr = keyWords.toLowerCase().split(",");
}
const mainArr = []; const mainArr = [];
const speakedDetailWordArr = []; const speakedDetailWordArr = [];
......
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