Browse Source

还差时间框处的样式

milestone-20251107-股票知识测评
chenzhen 2 months ago
parent
commit
a20dff364b
  1. 27
      src/views/HomeView.vue
  2. 16
      src/views/ProblemView.vue
  3. 8
      src/views/ReportView.vue

27
src/views/HomeView.vue

@ -1,8 +1,6 @@
<template> <template>
<div>
<div class="center" @click="jumpPage">
<img src="../assets/enter.jpg" alt="进入测试" class="image">
</div>
<div class="home">
<img src="../assets/enter.jpg" alt="进入测试" class="image" @click="jumpPage">
</div> </div>
</template> </template>
@ -22,8 +20,8 @@ export default {
// jwcode:90098888,// // jwcode:90098888,//
// jwcode:90098889,// // jwcode:90098889,//
// jwcode:90098890,// // jwcode:90098890,//
jwcode:90098891,//
// jwcode:90098892,//
// jwcode:90098891,//
jwcode:90098892,//
// jwcode:90098893,// // jwcode:90098893,//
// jwcode:90098894,// // jwcode:90098894,//
}; };
@ -57,28 +55,27 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
div {
.home {
position: relative;
min-height: 100vh; min-height: 100vh;
display: flex; display: flex;
justify-content: center;
align-items: center;
background-image: url('@/assets/home.jpg'); background-image: url('@/assets/home.jpg');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat;
} }
.image { .image {
position: absolute; position: absolute;
bottom: 80px;
right: 54%;
width: 200px; width: 200px;
height: 160px;
min-height: 160px;
max-height: 160px;
object-fit: contain; object-fit: contain;
transition: all 0.3s ease;
bottom: 70px;
left: 682px;
/* left: 35.5%; */
} }
.center:hover .image {
.image:hover {
transform: scale(1.2); transform: scale(1.2);
filter: brightness(1.1); filter: brightness(1.1);
} }

16
src/views/ProblemView.vue

@ -48,11 +48,17 @@ export default {
if(this.currentPage > 1){ if(this.currentPage > 1){
this.currentPage--; this.currentPage--;
} }
if(this.currentPage < 13){
this.page=1;
}
}, },
next(){ next(){
if(this.currentPage < 25){ if(this.currentPage < 25){
this.currentPage++; this.currentPage++;
} }
if(this.currentPage > 13){
this.page=2;
}
}, },
setAnswer(id, val) { setAnswer(id, val) {
this.answers[id] = val; this.answers[id] = val;
@ -233,7 +239,7 @@ p{
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
height: 125%;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px); backdrop-filter: blur(5px);
} }
@ -247,8 +253,7 @@ p{
} }
.popup-buttons{ .popup-buttons{
margin-top: 20px; margin-top: 20px;
display: flex;
justify-content: flex-end;
justify-content: center;
} }
.cancel-btn,.confirm-btn{ .cancel-btn,.confirm-btn{
border-radius: 10px; border-radius: 10px;
@ -352,7 +357,7 @@ p{
align-items: center; align-items: center;
gap: 5px; gap: 5px;
} }
.buttons-left:disabled,.next-btn:disabled {
.before-btn:disabled,.next-btn:disabled {
background-color: #4b5563; background-color: #4b5563;
cursor: not-allowed; cursor: not-allowed;
} }
@ -399,10 +404,9 @@ p{
border: 1px solid #4b5563; border: 1px solid #4b5563;
color: #e5e7eb; color: #e5e7eb;
} }
.button-right{ .button-right{
display: flex; display: flex;
margin: 30px 200px 5px;
margin: 30px 180px 5px;
gap: 20px; gap: 20px;
} }
.right-before-btn,.right-next-btn{ .right-before-btn,.right-next-btn{

8
src/views/ReportView.vue

@ -44,11 +44,11 @@
<div v-show="score==100"> <div v-show="score==100">
<p>恭喜您全部回答正确</p> <p>恭喜您全部回答正确</p>
<p>接下还需巩固知识</p> <p>接下还需巩固知识</p>
<p>推荐课程是量能擒牛</p>
<p>推荐课程是价时空综合能擒牛价格破译</p>
</div> </div>
<div v-show="score!=100"> <div v-show="score!=100">
<p>接下还需巩固知识</p> <p>接下还需巩固知识</p>
<p>推荐课程是量能擒牛</p>
<p>推荐课程是{{this.give}}</p>
</div> </div>
</div> </div>
</div> </div>
@ -68,7 +68,7 @@ export default{
return { return {
showDialog:false, showDialog:false,
score:0, score:0,
give: null
give: [],
}; };
}, },
methods:{ methods:{
@ -77,6 +77,8 @@ export default{
console.log('第一个'+submissionData); console.log('第一个'+submissionData);
try{ try{
const res = await axios.post('http://192.168.40.41:8000/api/knowledge/scores',submissionData); const res = await axios.post('http://192.168.40.41:8000/api/knowledge/scores',submissionData);
const resclass = await axios.post('http://192.168.40.41:8000/api/knowledge/course',submissionData);
this.give = resclass.data.data[0].cr_name.join('、');
this.score = res.data.data[0].score; this.score = res.data.data[0].score;
console.log('第二个'+this.score); console.log('第二个'+this.score);
}catch(err){ }catch(err){

Loading…
Cancel
Save