...
|
...
|
@@ -60,7 +60,7 @@ $(document).ready(function() { |
|
|
`
|
|
|
let title1 = '';
|
|
|
$.each(res.data[i].recommendThrees, function(index, val) {
|
|
|
// console.log(val);
|
|
|
console.log(val);
|
|
|
//左边二级菜单
|
|
|
// let html = '';
|
|
|
// if (index == 0) {
|
...
|
...
|
@@ -83,14 +83,7 @@ $(document).ready(function() { |
|
|
// $("#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'>
|
|
|
|
|
|
<img src='./images/03-4.png'>
|
|
|
|
|
|
<span style='padding-left:10px'>下载实习作业</span>
|
|
|
</a>`
|
|
|
$("#downloadWork").html(work);
|
|
|
|
|
|
ii++;
|
|
|
})
|
|
|
singleItem = title + title1 + `</ul>`
|
...
|
...
|
@@ -136,8 +129,6 @@ $('#title-content').on('click', '.leftClick', function(e) { |
|
|
$(".learn-next-yuan").css('display', 'block')
|
|
|
$(".learn-next-Btn1").css('display', 'none')
|
|
|
}
|
|
|
|
|
|
|
|
|
} else {
|
|
|
if (screenWidth < 768) {
|
|
|
$(".learn-next-Btn").css('display', 'none')
|
...
|
...
|
@@ -189,7 +180,7 @@ $('#title-content').on('click', '.leftClick', function(e) { |
|
|
// let status = ''
|
|
|
for (let i in res.data) {
|
|
|
$.each(res.data[i].recommendThrees, function(index, val) {
|
|
|
//console.log(val);
|
|
|
console.log(val);
|
|
|
// status = val.status
|
|
|
if (val.id == first_id) {
|
|
|
if (val.status == '1') {
|
...
|
...
|
@@ -199,6 +190,13 @@ $('#title-content').on('click', '.leftClick', function(e) { |
|
|
$(".div_show4").hide()
|
|
|
$("#particulars").html(val.particulars)
|
|
|
$("#accomplish").html(val.accomplish)
|
|
|
console.log(val.downloadHomework);
|
|
|
let work = `
|
|
|
<a href="${val.downloadHomework}" target="_blank" class='show1-Btn1-a'>
|
|
|
<img src='./images/03-4.png'>
|
|
|
<span style='padding-left:10px'>下载实习作业</span>
|
|
|
</a>`
|
|
|
$("#downloadWork").html(work);
|
|
|
} else if (val.status == '2') {
|
|
|
$(".div_show1").hide()
|
|
|
$(".div_show2").show()
|
...
|
...
|
@@ -417,8 +415,9 @@ 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')
|
|
|
$('.check').parent('#content-list').parent().prev().prev().prev().trigger('click')
|
|
|
console.log($('.check').parent('#content-list').parent().prev().prev().find('li'));
|
|
|
$('.check').parent('#content-list').parent().prev().prev().find('li').eq(-1).trigger('click')
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -454,11 +453,9 @@ function next() { |
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
var workStatus = false
|
|
|
//完成作业
|
|
|
function postData() {
|
|
|
alert("恭喜你,完成了一个作业~")
|
|
|
}
|
|
|
|
|
|
//提交作业
|
|
|
$(".fileTxt").change(function(e) {
|
|
|
//一级标题id
|
...
|
...
|
@@ -511,26 +508,28 @@ $(".fileTxt").change(function(e) { |
|
|
ajax(url1, "POST", header, params, function(res1) {
|
|
|
console.log(res1);
|
|
|
alert('提交成功!')
|
|
|
workStatus = true
|
|
|
}, function(res1) {
|
|
|
console.log(res1);
|
|
|
})
|
|
|
}, function(res) {})
|
|
|
|
|
|
// alert(data.message)
|
|
|
|
|
|
|
|
|
}
|
|
|
},
|
|
|
error: function(response) {
|
|
|
console.log(response);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
//完成作业
|
|
|
function postData() {
|
|
|
console.log(workStatus);
|
|
|
if(workStatus == true){
|
|
|
alert("恭喜你,完成了一个作业~")
|
|
|
}else{
|
|
|
alert("请您先提交作业!")
|
|
|
}
|
|
|
}
|
|
|
//下载保存
|
|
|
function downloadFile() {
|
|
|
// html2canvas(document.querySelector('#footer_download'), {
|
...
|
...
|
@@ -568,8 +567,25 @@ function commitPro() { |
|
|
var params = { id: newId }
|
|
|
ajax(url, "PUT", header, params, function(res) {
|
|
|
console.log(res);
|
|
|
$('.check').addClass('checkStatus').removeClass('check');
|
|
|
alert("恭喜您完成了一个新项目!")
|
|
|
if(res.data == true){
|
|
|
var first_id = $('.check').attr('data-id');
|
|
|
console.log(first_id);
|
|
|
var url1 = '/userJl/userJlAdd/' + first_id
|
|
|
var header1 = {
|
|
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
|
"token": localStorage.getItem('token'),
|
|
|
}
|
|
|
//改变type的值
|
|
|
ajax(url1, "POST", header1, function(res) {
|
|
|
console.log(res);
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
$('.check').addClass('checkStatus').removeClass('check');
|
|
|
alert("恭喜您完成了一个新项目!")
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}, function(res) {
|
|
|
console.log(res);
|
|
|
})
|
...
|
...
|
|