Commit 99738a60 authored by LiZongLin's avatar LiZongLin

每日答题样式更改

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