| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>耀荣康健</title>
- <link rel="stylesheet" type="text/css" href="/analysis/css/styles.css">
- <link rel="stylesheet" type="text/css" href="/analysis/js/layui/css/layui.css">
- <script src="/analysis/js/jquery-3.2.1.min.js"></script>
- <script src="/analysis/js/layer.js"></script>
- <script src="/analysis/js/timeUtils.js"></script>
- <script src="/analysis/js/chart.js"></script>
- <script src="/analysis/js/laydate.js"></script>
- <script src="/analysis/js/layui/layui.js"></script>
- <style>
- /*body{ color: #333333 }*/
- </style>
- </head>
- <body>
- <div style="margin: 0 auto; height: 100%; width: 100%; text-align: center">
- <div style="display: flex; width: 100%; height: 112px; align-items: center; justify-content: center;background-color: #0044CB; color:#ffffff">
- <div style="width: 60%; display: flex; height: 100%; align-items: center">
- <a href="/analysis/index.html">
- <div style="width:50%; float: left; text-align: left"><img src="/analysis/img/LOGO.png"></div>
- </a>
- <div style="width:50%;float: right; text-align: right">
- <!-- <a href="/index.html" style="text-decoration: none; color: #ffffff; font-size: 24px"><span>主页</span></a>-->
- <!-- <span> </span>-->
- <!-- <a href="/analysis.html" style="text-decoration: none; color: #ffffff; font-size: 24px"> <span>认知测试</span></a>-->
- </div>
- </div>
- </div>
- <div style="width: 100%; height: 730px; display: flex; justify-content: center; align-items: center">
- <div style="width: 371px; height: 441px; display: flex; flex-direction: column; padding: 20px; align-items: center;
- background-image: url('/analysis/img/singleBg.png');background-repeat: no-repeat;background-size: cover;background-position: center;background-size: 100% 100%;
- ">
- <div> </div>
- <div> </div>
- <div style="color: #0044CB; font-size: 20px; font-weight: bold">测试结果</div>
- <div> </div>
- <div> </div>
- <div id="circle" style="width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; flex-direction: column;
- background-image: url('/analysis/img/greenCircle.png');background-repeat: no-repeat;background-size: cover;background-position: center;background-size: 100% 100%;
- ">
- <div id="score" style="font-size: 66px; font-weight: bold"></div>
- <div class="title9">百分比准确率</div>
- </div>
- <div id="aveTime">平均反应时间:</div>
- <div> </div>
- <div> </div>
- <div style="width: 100%; height: 30px; display: flex; justify-content: center">
- <a href="/analysis/report/reportTable.html" style="width:100px;height:30px;color: white; line-height: 30px;
- background-image: url('/analysis/img/btnBg.png'); background-repeat: no-repeat;background-size: cover;background-position: center;background-size: 100% 100%;
- ">测试历史</a>
- <div> </div>
- <a href="/analysis/analysis.html" style="width:100px;height:30px;color: white; line-height: 30px;
- background-image: url('/analysis/img/btnBg.png'); background-repeat: no-repeat;background-size: cover;background-position: center;background-size: 100% 100%;
- ">再玩一次</a>
- </div>
- </div>
- <div style="width: 371px; height: 441px;display: flex; flex-direction: column; padding: 20px; align-items: center;
- background-image: url('/analysis/img/singleBg.png');background-repeat: no-repeat;background-size: cover;background-position: center;background-size: 100% 100%;
- ">
- <div> </div>
- <div> </div>
- <!-- <div style="color: #0044CB; font-size: 20px; font-weight: bold">结果分析</div>-->
- <div style="color: #0044CB; font-size: 20px; font-weight: bold"> </div>
- <div> </div>
- <div> </div>
- <div style="width: 100%; display: flex;flex-direction: column; align-items: center; justify-content: center">
- <div id="analysis" class="title9" style="font-size: 24px"></div>
- <div> </div>
- <div id="totalRight" class="title9" style="font-size: 18px"></div>
- <div id="totalWrong" class="title9" style="font-size: 18px"></div>
- <div id="totalTimeout" class="title9" style="font-size: 18px"></div>
- </div>
- </div>
- </div>
- <div style="font-size:14px; height: 98px; color: #999999; display: flex;
- align-items: center; justify-content: center; background: url(/analysis/img/d97f28a59f20114dad3adbeb0dab456f.png) 100% no-repeat;">
- 地址: 北京市朝阳区东四环中路41号嘉泰国际A座16层1619室 联系电话:400-086-1638<br/>
- 湘ICP备2024059687号-3
- </div>
- </div>
- <script>
- function checkLogin() {
- $.ajax({
- url: '/analysis/login/checkLogin',
- type: 'POST',
- dataType: 'json',
- success: function (res) {
- if (res.code == 0) {
- getReport(res.data.phone)
- } else {
- isLogin = false
- LAYER_ID = layer.open({
- // icon: 2,
- type: 2,
- title: ["请先登录", "font-size:18px"],
- // title: false,
- content: '/analysis/login.html',
- scrollbar: false,
- area: ['800px', '500px'],
- // offset:'100px',
- anim: 0,
- closeBtn: 0
- });
- }
- },
- error: function (xhr, status, error) {
- console.error('错误:', error);
- layer.alert("服务器繁忙,请稍后重试!", {icon: 2});
- }
- });
- }
- function afterLogin(data) {
- getReport(data.phone)
- }
- function getReport(phone) {
- const param = {
- "phone": phone,
- }
- $.ajax({
- url: '/analysis/detect/singleReport',
- type: 'POST',
- dataType: 'json',
- contentType: "application/json",
- data: JSON.stringify(param),
- success: function (res) {
- if (res.code == 0) {
- // alert(JSON.stringify(res.data))
- $("#score").html(res.data.score + "%")
- $("#aveTime").html("平均反应时间:" + res.data.aveTime + "秒")
- // if (res.data.score < 20) {
- // $("#circle").css('background-image', 'url(/analysis/img/redCircle.png)')
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("您回答的速度很快,但是准确率太低。请认真思考提高准确率!加油!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您回答的速度太慢了,您的准确率和速度都有待提高哦!加油!")
- // this.node.getChildByName("Label6").getComponent(Label).string = ""
- // } else {
- // $("#analysis").html("您的准确率和答题速度都有待提高哦!加油!")
- // }
- // } else if (res.data.score > 50) {
- // $("#circle").css('background-image', "url('/analysis/img/greenCircle.png')")
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("太棒了!您的准确率和答题速度都非常棒!请继续保持!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您的准确率很棒哦,但是您答题的速度太慢。请多加练习,提高速度。加油!")
- // } else {
- // $("#analysis").html("您的准确率很棒哦,答题速度也不错。请继续加油哦!")
- // }
- // } else {
- // $("#circle").css('background-image', 'url(/analysis/img/yellowCircle.png)')
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("您的答题准确率一般哦,但是您的回答速度很快。请您多加练习,提高准确率!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您的答题准确率一般哦,而且您的回答速度太慢。请您多加练习,加油哦!")
- // } else {
- // $("#analysis").html("您的准确率和反应速度都一般哦,请您多加练习,加油哦!")
- // }
- // }
- // if (res.data.score < 20) {
- // $("#circle").css('background-image', 'url(/analysis/img/redCircle.png)')
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("您回答的速度太快了,并且准确率太低。建议您找专业医护人员进行检查!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您回答的速度太慢了,您的准确率和速度都不太理想,建议您找专业医护人员进行检查!")
- // this.node.getChildByName("Label6").getComponent(Label).string = ""
- // } else {
- // $("#analysis").html("您的答题速度还不错,但准确率太低了,建议您找专业医护人员进行检查!")
- // }
- // } else if (res.data.score > 50) {
- // $("#circle").css('background-image', "url('/analysis/img/greenCircle.png')")
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("太棒了!您的准确率和答题速度都非常棒!请继续保持!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您的准确率很棒哦,但是您答题的速度太慢。请多加练习,提高速度。加油!")
- // } else {
- // $("#analysis").html("您的准确率很棒哦,答题速度也不错。请继续加油哦!")
- // }
- // } else {
- // $("#circle").css('background-image', 'url(/analysis/img/yellowCircle.png)')
- // if (res.data.aveTime < 2.5) {
- // $("#analysis").html("您的答题准确率一般哦,但是您的回答速度很快。请您多加练习,提高准确率!")
- // } else if (res.data.aveTime > 10) {
- // $("#analysis").html("您的答题准确率一般哦,而且您的回答速度太慢。请您多加练习,加油哦!")
- // } else {
- // $("#analysis").html("您的准确率和反应速度都一般哦,请您多加练习,加油哦!")
- // }
- // }
- if (res.data.score <= 30) {
- $("#circle").css('background-image', 'url(/analysis/img/redCircle.png)')
- $("#analysis").html("您属于高风险人群")
- $("#analysis").css("color", "red")
- } else if (res.data.score > 70) {
- $("#circle").css('background-image', "url('/analysis/img/greenCircle.png')")
- $("#analysis").html("您属于低风险人群")
- $("#analysis").css("color", "green")
- } else {
- $("#circle").css('background-image', 'url(/analysis/img/yellowCircle.png)')
- $("#analysis").html("您属于中风险人群")
- $("#analysis").css("color", "black")
- }
- $("#totalRight").html("您答对了" + res.data.totalRight + "道题")
- $("#totalWrong").html("您答错了" + res.data.totalWrong + "道题")
- $("#totalTimeout").html("您超时了" + res.data.totalTimeout + "道题")
- } else {
- layer.alert(res.message, {icon: 2})
- }
- },
- error: function (xhr, status, error) {
- console.error('错误:', error);
- layer.alert("服务器繁忙,请稍后重试!", {icon: 2});
- }
- });
- }
- $(function () {
- checkLogin()
- })
- </script>
- </body>
- </html>
|