Commit 99738a60 authored by LiZongLin's avatar LiZongLin

每日答题样式更改

parent 2cb18979
...@@ -117,15 +117,15 @@ ...@@ -117,15 +117,15 @@
export default { export default {
data() { data() {
return { return {
titleTime: '',//当前试题应该是哪一天的卷子 titleTime: '', //当前试题应该是哪一天的卷子
marginHight: '',//页面内容到手机顶部的距离 marginHight: '', //页面内容到手机顶部的距离
flagCode: '', //完成情况 flagCode: '', //完成情况
dateList: [], //从活动开始到现在的日期 dateList: [], //从活动开始到现在的日期
finishStatus: [], //完成情况过滤中间数组 finishStatus: [], //完成情况过滤中间数组
finishSituationList: [],//完成情况数组 finishSituationList: [], //完成情况数组
activityInfo: '',//活动信息 activityInfo: '', //活动信息
signupId: null,//报名人id signupId: null, //报名人id
activityId: null,//活动id activityId: null, //活动id
examId: '', //试卷id examId: '', //试卷id
examTime: '', //试卷的日期 examTime: '', //试卷的日期
flagTime: '', //标志时间 flagTime: '', //标志时间
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
hour: 0, hour: 0,
minutes: 0, minutes: 0,
seconds: 0, seconds: 0,
questionScore:'' questionScore: ''
}; };
}, },
methods: { methods: {
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
this.getFinishSituation().then(() => { this.getFinishSituation().then(() => {
console.log("finishSituationList", this.finishSituationList); console.log("finishSituationList", this.finishSituationList);
let i = 0; let i = 0;
if (i === this.day-1) { if (i === this.day - 1) {
console.log("所有答题已完成"); console.log("所有答题已完成");
uni.showToast({ uni.showToast({
title: '所有答题已完成,请退出答题页面', title: '所有答题已完成,请退出答题页面',
...@@ -183,9 +183,9 @@ ...@@ -183,9 +183,9 @@
return return
} }
for (i = 0; i < this.day; i++) { for (i = 0; i < this.day; i++) {
console.log('i',i); console.log('i', i);
console.log('this.day',this.day); console.log('this.day', this.day);
if (i < this.day-1) { if (i < this.day - 1) {
if (this.finishSituationList[i].flag === false) { if (this.finishSituationList[i].flag === false) {
console.log(this.finishSituationList[i]); console.log(this.finishSituationList[i]);
this.getNotFinish(this.finishSituationList[i].date, i) this.getNotFinish(this.finishSituationList[i].date, i)
...@@ -254,11 +254,11 @@ ...@@ -254,11 +254,11 @@
// this.timer = null // this.timer = null
} }
let addScoreData = { let addScoreData = {
signupId:this.signupId, signupId: this.signupId,
examId:this.examId, examId: this.examId,
score:this.score, score: this.score,
activityId:this.activityId, activityId: this.activityId,
examTime:this.flagTime examTime: this.flagTime
} }
console.log(addScoreData); console.log(addScoreData);
// addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => { // addScore(this.signupId, this.examId, this.score, this.activityId, this.flagTime).then(res => {
...@@ -292,6 +292,7 @@ ...@@ -292,6 +292,7 @@
//获取未完成的试卷 //获取未完成的试卷
getNotFinish(date, index) { getNotFinish(date, index) {
this.$refs.masks.open('center') this.$refs.masks.open('center')
this.show = false
//显示加载框 //显示加载框
uni.showLoading({ uni.showLoading({
title: '试题抽取中' title: '试题抽取中'
...@@ -318,7 +319,7 @@ ...@@ -318,7 +319,7 @@
console.log("date", date); console.log("date", date);
// dailyQuestion(this.signupId, date).then(res => { // dailyQuestion(this.signupId, date).then(res => {
getExamPapers(this.signupId, this.activityId, date).then(res => { getExamPapers(this.signupId, this.activityId, date).then(res => {
// console.log(res); console.log("试卷",res);
if (res.code === 200) { if (res.code === 200) {
// this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //标志时间 // this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //标志时间
this.flagTime = res.data[0].examTime //标志时间 this.flagTime = res.data[0].examTime //标志时间
...@@ -338,7 +339,7 @@ ...@@ -338,7 +339,7 @@
} }
}) })
this.total = res.data[0].questionsNum this.total = res.data[0].questionsNum
this.questionScore = res.data[0].score/res.data[0].questionsNum this.questionScore = res.data[0].score / res.data[0].questionsNum
//将取到的题目id集合反转 //将取到的题目id集合反转
questionId = questionId.reverse() questionId = questionId.reverse()
for (let i = 0; i < res.data.length / 4; i++) { for (let i = 0; i < res.data.length / 4; i++) {
...@@ -421,7 +422,7 @@ ...@@ -421,7 +422,7 @@
this.flagTime = res.data[0].examTime this.flagTime = res.data[0].examTime
// this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') // this.flagTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd')
this.examTime = res.data[0].examTime //今天的日期 this.examTime = res.data[0].examTime //今天的日期
this.questionScore = res.data[0].score/res.data[0].questionsNum this.questionScore = res.data[0].score / res.data[0].questionsNum
// this.examTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //今天的日期 // this.examTime = formatDate(res.data[0].examTime, 'yyyy-MM-dd') //今天的日期
// this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0] // this.day = this.getDaysBetween(res.data[0].activityStart, res.data[0]
// .examTime) //今天是答题活动的第几天 // .examTime) //今天是答题活动的第几天
...@@ -572,11 +573,11 @@ ...@@ -572,11 +573,11 @@
this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo') this.marginHight = uni.getStorageSync('menuInfo').statusBarHeight + uni.getStorageSync('menuInfo')
.navBarHeight + 15 + 'px' .navBarHeight + 15 + 'px'
this.begin() this.begin()
this.getFinishSituation().then(()=>{ this.getFinishSituation().then(() => {
let titleTime = new Date().toISOString().substring(0, 10) let titleTime = new Date().toISOString().substring(0, 10)
if(titleTime != options.examTime){ if (titleTime != options.examTime) {
this.titleTime = options.examTime this.titleTime = options.examTime
console.log('titleTime',this.titleTime); console.log('titleTime', this.titleTime);
} }
}) //判断是否完成答题 }) //判断是否完成答题
this.getDailyQuestion() this.getDailyQuestion()
...@@ -730,7 +731,7 @@ ...@@ -730,7 +731,7 @@
} }
.content-select { .content-select {
margin: 4% 2%; margin: 6% 2%;
font-size: 16px; font-size: 16px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular; font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400; font-weight: 400;
...@@ -770,11 +771,12 @@ ...@@ -770,11 +771,12 @@
button { button {
position: relative; position: relative;
top: 10%; top: 20%;
width: 88%; width: 85%;
height: 80%; height: 88rpx;
background: #3b7cde; background: #3b7cde;
border-radius: 16px; border-radius: 16px;
line-height: 2;
text { text {
position: relative; position: relative;
...@@ -870,8 +872,6 @@ ...@@ -870,8 +872,6 @@
} }
} }
.masks-popup{ .masks-popup {}
}
} }
</style> </style>
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