练习优化

This commit is contained in:
binbin_pan 2024-12-31 13:57:16 +08:00
parent b100c2113f
commit 48df6fd6e7
2 changed files with 174 additions and 132 deletions

116
config.js
View File

@ -1,67 +1,18 @@
// 产线
// module.exports = {
// // http://192.168.0.14:19999
// loginBaseUrl: 'http://112.29.103.165:1616',
// baseUrl: 'http://112.29.103.165:1616/exam',
// // login: 'http://112.29.103.165:1616',
// login: 'http://112.29.103.165:1616/exam/exam-auth/',
// // 图片展示基础地址
// fileUrl: 'http://112.29.103.165:1616/exam-file/',
// // 上传文件地址
// uploadUrl: 'http://112.29.103.165:1616/exam-file/file/uploadBase64',
// bmwUrl: 'http://112.29.103.165:1616/exam-bmw',
// // 体检-基础路径
// tjBaseUrl: 'http://112.29.103.165:1616/AppPeaManager',
// tjFile: 'http://112.29.103.165:1616/medicalDocumentation/statics/',
// //实名制移动端-登录接口
// realLoginUrl: 'http://192.168.0.14:1616/auth/',
// realBaseUrl: 'http://192.168.0.14:1910/',
// //实名制移动端-移动
// realAppUrl: 'http://192.168.0.14:1913/app',
// //实名制移动端-安培
// realExamUrl: 'http://192.168.0.14:1616/system',
// //实名制移动端-文件
// realFileUrl: 'http://192.168.0.14:1909/file/',
// //实名制移动端
// realBmwUrl: 'http://192.168.0.14:1616/bmw',
// //实名制移动端 -- 新
// realNewBmwUrl: 'http://192.168.0.14:1616',
// loginUrl: 'http://192.168.0.14:27018',
// //实名制移动端 -- 新
// realNewYnUrl: 'http://192.168.0.14:1918',
// realIdCardUrl: 'http://192.168.0.14:26699',
// //作业计划 -- 新
// workPlanNewYnUrl: 'http://192.168.0.14:19191',
// // 应用信息
// appInfo: {
// // 应用名称
// name: '作业管控智慧平台',
// // 应用版本
// version: '1.1.0'
// }
// }
// 测试环境
module.exports = {
// baseUrl:'/prod-api',
// http://192.168.0.14:19999
loginBaseUrl: 'http://192.168.0.14:27018',
// loginBaseUrl:'http://192.168.0.14:19999',
// baseUrl:'http://192.168.0.14:2900',
baseUrl: 'http://192.168.0.14:19999',
// loginUrl: 'http://112.29.103.165:1616',
login: 'http://192.168.0.14:19200',
loginBaseUrl: 'http://112.29.103.165:1616',
baseUrl: 'http://112.29.103.165:1616/exam',
// login: 'http://112.29.103.165:1616',
login: 'http://112.29.103.165:1616/exam/exam-auth/',
// 图片展示基础地址
fileUrl: 'http://192.168.0.14:19999/exam-file/',
fileUrl: 'http://112.29.103.165:1616/exam-file/',
// 上传文件地址
uploadUrl: 'http://192.168.0.14:19999/exam-file/file/uploadBase64',
bmwUrl: 'http://192.168.0.14:19999/exam-bmw',
uploadUrl: 'http://112.29.103.165:1616/exam-file/file/uploadBase64',
bmwUrl: 'http://112.29.103.165:1616/exam-bmw',
// 体检-基础路径
tjBaseUrl: 'http://192.168.0.14:18077/AppPeaManager',
// tjBaseUrl: 'http://192.168.2.91:19100/AppPeaManager',
tjFile: 'http://192.168.0.14:18077/medicalDocumentation/statics/',
tjBaseUrl: 'http://112.29.103.165:1616/AppPeaManager',
tjFile: 'http://112.29.103.165:1616/medicalDocumentation/statics/',
//实名制移动端-登录接口
realLoginUrl: 'http://192.168.0.14:1616/auth/',
@ -92,3 +43,52 @@ module.exports = {
version: '1.1.0'
}
}
// 测试环境
// module.exports = {
// // baseUrl:'/prod-api',
// // http://192.168.0.14:19999
// loginBaseUrl: 'http://192.168.0.14:27018',
// // loginBaseUrl:'http://192.168.0.14:19999',
// // baseUrl:'http://192.168.0.14:2900',
// baseUrl: 'http://192.168.0.14:19999',
// // loginUrl: 'http://112.29.103.165:1616',
// login: 'http://192.168.0.14:19200',
// // 图片展示基础地址
// fileUrl: 'http://192.168.0.14:19999/exam-file/',
// // 上传文件地址
// uploadUrl: 'http://192.168.0.14:19999/exam-file/file/uploadBase64',
// bmwUrl: 'http://192.168.0.14:19999/exam-bmw',
// // 体检-基础路径
// tjBaseUrl: 'http://192.168.0.14:18077/AppPeaManager',
// // tjBaseUrl: 'http://192.168.2.91:19100/AppPeaManager',
// tjFile: 'http://192.168.0.14:18077/medicalDocumentation/statics/',
// //实名制移动端-登录接口
// realLoginUrl: 'http://192.168.0.14:1616/auth/',
// realBaseUrl: 'http://192.168.0.14:1910/',
// //实名制移动端-移动
// realAppUrl: 'http://192.168.0.14:1913/app',
// //实名制移动端-安培
// realExamUrl: 'http://192.168.0.14:1616/system',
// //实名制移动端-文件
// realFileUrl: 'http://192.168.0.14:1909/file/',
// //实名制移动端
// realBmwUrl: 'http://192.168.0.14:1616/bmw',
// //实名制移动端 -- 新
// realNewBmwUrl: 'http://192.168.0.14:1616',
// loginUrl: 'http://192.168.0.14:27018',
// //实名制移动端 -- 新
// realNewYnUrl: 'http://192.168.0.14:1918',
// realIdCardUrl: 'http://192.168.0.14:26699',
// //作业计划 -- 新
// workPlanNewYnUrl: 'http://192.168.0.14:19191',
// // 应用信息
// appInfo: {
// // 应用名称
// name: '作业管控智慧平台',
// // 应用版本
// version: '1.1.0'
// }
// }

View File

@ -33,6 +33,7 @@
<div class="num">{{ nowNum }}/{{ allNum }}</div>
</div>
</div>
<u-line></u-line>
<div
class="question-wrapper"
@ -82,12 +83,20 @@
</div>
<div v-if="item.isSelect">
<div class="answer">
<div>正确答案{{ item.correctGrade }}</div>
<div>你的答案{{ item.select }}</div>
</div>
<u-line dashed></u-line>
<div>
<div class="analysis">答案解析</div>
<div class="analysis-container">{{ item.answerAnaly }}</div>
<div class="analysis">
<div class="line" :style="{ height: fontSize - 5 + 'px' }"></div>
答案解析
</div>
<div class="analysis-container" :style="{ fontSize: fontSize - 2 + 'px' }">
{{ item.answerAnaly || '暂无' }}
</div>
</div>
</div>
</div>
@ -142,11 +151,19 @@
</div>
<div v-if="item.isSelect">
<div class="answer">
<div>正确答案{{ item.correctGrade.split('').join('、') }}</div>
<div>你的答案{{ item.select && item.select.join('、') }}</div>
</div>
<u-line dashed></u-line>
<div class="analysis">知识点</div>
<div class="analysis-container">{{ item.answerAnaly }}</div>
<div class="analysis">
<div class="line" :style="{ height: fontSize - 5 + 'px' }"></div>
知识点
</div>
<div class="analysis-container" :style="{ fontSize: fontSize - 2 + 'px' }">
{{ item.answerAnaly || '暂无' }}
</div>
</div>
</div>
</div>
@ -185,20 +202,12 @@
</div>
<!-- 提交弹框 -->
<u-modal
:show="showModal"
title="本次答题正确率"
showCancelButton
@cancel="handleConfirm"
@confirm="handleClose"
cancelText="继续答题"
confirmText="结束答题"
:buttonReverse="true"
confirmColor="#606266"
cancelColor="#2979ff"
>
<view class="slot-content">
<u-popup :show="showModal" :closeOnClickOverlay="false" mode="center" round="10" customStyle="width: 80% ">
<div class="pop-content">
<div class="top-title">
<div class="title">本次答题正确率</div>
<div class="correctRate">{{ correctRate }}%</div>
</div>
<div class="modal-container">
<div class="item">
<div class="num">{{ answerNum }}</div>
@ -213,8 +222,12 @@
<div>答题时长</div>
</div>
</div>
</view>
</u-modal>
<div class="pop-btn">
<u-button class="custom-style" plain shape="circle" text="结束答题" @click="handleClose" />
<u-button class="custom-style" type="primary" shape="circle" text="继续答题" @click="handleConfirm" />
</div>
</div>
</u-popup>
<!-- 题目选择弹框 -->
<u-popup
@ -238,6 +251,7 @@
<div class="num">{{ nowNum }}/{{ allNum }}</div>
</div>
</div>
<u-line></u-line>
<div class="topic-content">
<div class="wrap" v-for="(item, index) in questionListSelect" :key="index">
@ -270,8 +284,10 @@ import {
updStudyDurationExamPractice
} from '@/api/eduApp'
import config from '@/config'
import uLine from '../../../uni_modules/uview-ui/components/u-line/u-line.vue'
export default {
components: { uLine },
data() {
return {
isLoading: false,
@ -752,25 +768,6 @@ export default {
// = /
this.correctRate = rate == 'NaN' ? '0' : rate
this.showModal = true
// const params = {
// id: this.practiceId
// }
// uni.request({
// url: config.baseUrl + '/exam-student/studentPractice/getPracticeQuestionRate',
// method: 'post',
// data: params,
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded',
// Authorization: uni.getStorageSync('access_token')
// },
// success: res => {
// console.log('🚀 ~ handleSubmit ~ res:', res)
// res = res.data
// },
// fail: err => {
// console.log(err)
// }
// })
},
handleConfirm() {
console.log('确认')
@ -959,24 +956,39 @@ export default {
justify-content: flex-end;
align-items: center;
}
.wrapper {
height: 100vh;
/* background: url('/static/images/question-bg.png') no-repeat; */
background: #fff;
background-size: 100% 100%;
.slot-content {
width: 100%;
.answer {
margin: 15px 0;
padding: 10px;
background: #f6f9fc;
border-radius: 5px;
}
.pop-content {
.top-title {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 700;
background: #1f92df;
border-radius: 10px 10px 0 0;
line-height: 1;
.title {
margin: 20px 0;
font-size: 16px;
}
.correctRate {
text-align: center;
margin-bottom: 20px;
font-size: 28px;
}
}
.modal-container {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 20px;
background: #f5f8fb;
margin: 20px 10px;
background: #f6f9fc;
border-radius: 5px;
height: 73px;
@ -986,13 +998,33 @@ export default {
justify-content: center;
align-items: center;
color: #9d9b9b;
font-size: 14px;
.num {
font-size: 19px;
font-weight: 600;
color: #3185f0;
}
}
}
.pop-btn {
margin-bottom: 20px;
padding: 0 30px;
display: flex;
justify-content: space-between;
align-items: center;
.custom-style {
width: 100px;
}
}
}
.wrapper {
height: 100vh;
/* background: url('/static/images/question-bg.png') no-repeat; */
background: #fff;
background-size: 100% 100%;
.topic-content {
padding: 10px;
display: flex;
/* justify-content: space-between; */
align-items: flex-start;
@ -1098,13 +1130,22 @@ export default {
}
.analysis {
margin-top: 20px;
margin-top: 8px;
font-weight: 700;
display: flex;
align-items: center;
.line {
border: 2px solid #1f92df;
margin-right: 4px;
}
}
.analysis-container {
margin-top: 6px;
color: #475583;
text-indent: 1em;
background: #f6f9fc;
border-radius: 5px;
padding: 10px;
}
}
@ -1116,12 +1157,13 @@ export default {
.num-wrapper {
display: flex;
justify-content: space-around;
margin: 15px 6%;
margin: 15px 9%;
.correct,
.error,
.total {
display: flex;
justify-content: center;
align-items: center;
margin: 0 6px;
}