Commit 4ea11dbf by doszhang

dos

parent c2860694
...@@ -135,39 +135,42 @@ function prevQuestion() { ...@@ -135,39 +135,42 @@ function prevQuestion() {
} }
function nextQuestion(e) { function nextQuestion(e) {
if (nowQuestionIndex != 5) { if (e == 'indexbar' && answerArr[nowQuestionIndex] === undefined) {
if (nowAnswer !== '') { if (nowQuestionIndex != 5) {
let nowIndex = nowQuestionIndex; if (nowAnswer !== '') {
answerArr[nowQuestionIndex - 1] = nowAnswer; let nowIndex = nowQuestionIndex;
if (answerArr[nowQuestionIndex] !== undefined) { answerArr[nowQuestionIndex - 1] = nowAnswer;
nowAnswer = answerArr[nowQuestionIndex] if (answerArr[nowQuestionIndex] !== undefined) {
nowAnswer = answerArr[nowQuestionIndex]
} else {
nowAnswer = '';
}
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft');
setTimeout(function () {
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide();
}, 1000);
nowQuestionIndex++;
$('.question-page .point').animate({
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500);
if (nowQuestionIndex == 5) {
$('.btn-submit').show();
$('.btn-nextquestion').hide();
}
setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show();
}, 900);
} else { } else {
nowAnswer = ''; if (e != 'indexbar') {
} $('#notification_area').remove();
my_notify('请选择答案');
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft'); return false;
setTimeout(function () { }
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide();
}, 1000);
nowQuestionIndex++;
$('.question-page .point').animate({
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500);
if (nowQuestionIndex == 5) {
$('.btn-submit').show();
$('.btn-nextquestion').hide();
}
setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show();
}, 900);
} else {
if (e != 'indexbar') {
$('#notification_area').remove();
my_notify('请选择答案');
return false;
} }
} }
} }
} }
function chooseAnswer(e) { function chooseAnswer(e) {
......
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 sign in to comment