作者 杨乐
1 个管道 的构建 通过 耗费 1 秒

提交

... ... @@ -174,18 +174,21 @@ $('#title-content').on('click', '.leftClick', function(e) {
$(".div_show2").show()
$(".div_show3").hide()
$(".div_show4").hide()
//获取答题
var url1 = "/recommend/recommendFiveList";
var params1 = {
id: first_id
}
ajax(url1, "GET", header, params1, function(res) {
console.log(res);
answer1 = res.data
for (let i in res.data) {
let x = +i + 1;
console.log(x);
let title = `
var redf = localStorage.getItem(first_id + '_ti_sll');
if (redf == null) {
localStorage.setItem(first_id + '_ti_sll', "此题已经加载") //存起来
//获取答题
var url1 = "/recommend/recommendFiveList";
var params1 = {
id: first_id
}
ajax(url1, "GET", header, params1, function(res) {
console.log(res);
answer1 = res.data
for (let i in res.data) {
let x = +i + 1;
console.log(x);
let title = `
<div class='all-list'>
<!-- 左边 -->
<div class='list-left'>
... ... @@ -215,11 +218,13 @@ $('#title-content').on('click', '.leftClick', function(e) {
</div>
</div>
</div>`
$('#recommend-List').append(title);
}
}, function(res) {
console.log(res);
})
$('#recommend-List').append(title);
}
}, function(res) {
console.log(res);
})
}
} else if (val.status == '3') {
$(".div_show1").hide()
$(".div_show2").hide()
... ... @@ -381,6 +386,11 @@ function getValue() {
function last() {
$('.check').addClass('check');
$('.check').parent('#content-list').prev().trigger('click');
// $('.check').parent('#content-list').parent().prev()
$('.check').parent('#content-list').parent().prev().trigger('click')
$('.check').parent('#content-list').parent().prev().prev().find('#content-list').eq(-1).trigger('click')
}
//下一步
... ... @@ -392,32 +402,33 @@ function next() {
"Content-Type": "application/x-www-form-urlencoded",
"token": localStorage.getItem('token'),
}
//改变type的值
ajax(url, "POST", header, function(res) {
console.log(res);
}, function(res) {
console.log(res);
$('.check').addClass('checkStatus').removeClass('check');
// console.log($('.checkStatus').eq(-1).parent('#content-list').next().length);
$('.checkStatus').eq(-1).parent('#content-list').next().trigger('click');
if ($('.checkStatus').eq(-1).parent('#content-list').next().length == 0) {
console.log(121212)
console.log($('.checkStatus').eq(-1).parent('#content-list').parent().next());
$('.checkStatus').eq(-1).parent('#content-list').parent().next().trigger('click')
$('.checkStatus').eq(-1).parent('#content-list').parent().next().next().find('#content-list').eq(0).trigger('click')
}
})
$('.check').addClass('checkStatus').removeClass('check');
// console.log($('.checkStatus').eq(-1).parent('#content-list').next().length);
$('.checkStatus').eq(-1).parent('#content-list').next().trigger('click');
if ($('.checkStatus').eq(-1).parent('#content-list').next().length == 0) {
console.log(121212)
console.log($('.checkStatus').eq(-1).parent('#content-list').parent().next());
$('.checkStatus').eq(-1).parent('#content-list').parent().next().trigger('click')
$('.checkStatus').eq(-1).parent('#content-list').parent().next().next().find('#content-list').eq(0).trigger('click')
}
}
//完成作业
function postData() {
alert("恭喜你,完成了一个作业~")
}
//提交作业
$(".fileTxt").change(function(e) {
//一级标题id
... ...