...
|
...
|
@@ -8,7 +8,6 @@ var header = { |
|
|
}
|
|
|
var header5 = {
|
|
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
|
|
|
|
}
|
|
|
var params = {
|
|
|
id: newId
|
...
|
...
|
@@ -25,17 +24,19 @@ $(document).ready(function() { |
|
|
// console.log(url);
|
|
|
if (url.indexOf('?') != -1) {
|
|
|
newId = url.substr(4)
|
|
|
// console.log(newId);
|
|
|
//底部二维码
|
|
|
|
|
|
// console.log(newId);
|
|
|
//底部二维码
|
|
|
var url9 = "/warranty/warrantyList"; // 接口
|
|
|
ajax(url9, "GET", header5, function(res) {
|
|
|
console.log('1', res);
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
let EWM = `<img src="${res.data.sevenimg4}" width="100%">`
|
|
|
$('#ewm-footer').html(EWM)
|
|
|
})
|
|
|
//获取左边实习内容list
|
|
|
console.log('1', res);
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
let EWM = `<img src="${res.data.sevenimg4}" width="100%">`
|
|
|
$('#ewm-footer').html(EWM)
|
|
|
})
|
|
|
|
|
|
//获取左边实习内容list
|
|
|
var url8 = "/recommend/recommendTwoList"; // 接口
|
|
|
var header = {
|
|
|
"Content-Type": "application/x-www-form-urlencoded",
|
...
|
...
|
@@ -58,21 +59,27 @@ $(document).ready(function() { |
|
|
$.each(res.data[i].recommendThrees, function(index, val) {
|
|
|
// console.log(val);
|
|
|
//左边二级菜单
|
|
|
let html = '';
|
|
|
// let html = '';
|
|
|
// if (index == 0) {
|
|
|
// html = `<div class="noCheck check"` + `data-id='` + val.id + `' style='margin-right:6px'></div>`
|
|
|
// } else {
|
|
|
// html = `<div class="noCheck" ` + `data-id='` + val.id + `' style='margin-right:6px'></div>`
|
|
|
// }
|
|
|
if (val.type) {
|
|
|
var selected = 'checkStatus'
|
|
|
} else {
|
|
|
var selected = ''
|
|
|
}
|
|
|
title1 += `
|
|
|
<li id="content-list" data-index="` + ii + `" class='leftClick' style='display:flex;margin-bottom:8px;cursor: pointer;margin-left: 10px;
|
|
|
place-items: center;'>
|
|
|
<div class="noCheck" ` + `data-id='` + val.id + `' style='margin-right:6px'></div>
|
|
|
<div class="noCheck ` + `${selected}` + `" ` + `data-id='` + val.id + `' style='margin-right:6px'></div>
|
|
|
<a class='learn-erji-title' style='flex:1'>${val.subhead}</a>
|
|
|
</li>`
|
|
|
// $("#content-l").append(title1)
|
|
|
//$('.divClass').eq(0).css('display', 'block').siblings().css('display', 'none')
|
|
|
//右边显示1
|
|
|
|
|
|
// $("#content-l").append(title1)
|
|
|
//$('.divClass').eq(0).css('display', 'block').siblings().css('display', 'none')
|
|
|
//右边显示1
|
|
|
let work = `
|
|
|
<a href="${val.downloadHomework}" target="_blank" class='show1-Btn1-a'>
|
|
|
|
...
|
...
|
@@ -378,8 +385,24 @@ function last() { |
|
|
}
|
|
|
//下一步
|
|
|
function next() {
|
|
|
var first_id = $('.check').attr('data-id');
|
|
|
console.log(first_id);
|
|
|
var url = '/userJl/userJlAdd/' + first_id
|
|
|
var header = {
|
|
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
|
"token": localStorage.getItem('token'),
|
|
|
}
|
|
|
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);
|
|
|
// 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)
|
...
|
...
|
@@ -387,10 +410,6 @@ function 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')
|
|
|
}
|
|
|
// $("#overchange").hide()
|
|
|
// $("#nextchange").show()
|
|
|
// window.location.href = 'question.html?id=' + newId
|
|
|
// console.log(newId);
|
|
|
}
|
|
|
|
|
|
//完成作业
|
...
|
...
|
@@ -401,9 +420,9 @@ function postData() { |
|
|
|
|
|
//提交作业
|
|
|
$(".fileTxt").change(function(e) {
|
|
|
//二级标题id
|
|
|
var first_id1 = $('.check').parents('#content-l').prev().attr('data-id');
|
|
|
//一级标题id
|
|
|
var first_id1 = $('.check').parents('#content-l').prev().attr('data-id');
|
|
|
//二级标题id
|
|
|
var first_id = $('.check').attr('data-id');
|
|
|
// console.log(newId);项目id
|
|
|
//上传作业
|
...
|
...
|
|