browseMore.js
3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
$(document).ready(function() {
//浏览更多首页
$.ajax({
type: 'GET',
url: "http://192.168.1.241:9004/warrantyFour/warrantyFourList",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"token": localStorage.getItem('token'),
},
success: function(res) {
console.log('1', res);
// let a = htmlDecode(res.data.title)
// console.log(a);
$('#title').html(res.data.title)
$('#subtitle').html(res.data.subtitle)
//图片
// let str = `<img src="${res.data.oneimg1}" class="rounded img-fluid d-block mx-auto" alt="" style="border: 1px dashed #333;">`
// $('#img').html(str)
}
})
//企业实习项目
$.ajax({
type: 'POST',
url: 'http://192.168.1.241:9004/warrantyTwo/warrantyTwoList',
headers: {
"Content-Type": "application/json",
"token": localStorage.getItem('token'),
},
data: JSON.stringify({
current: 1,
size: 4
}),
success: function(res) {
console.log('企业', res);
$.each(res.data.records, function(key, value) {
console.log(value)
let title = `<div class="col-xs-6 col-lg-33 portfolio-post" style="margin-bottom: 2%;height:35%">
<article class="portfolio-post-item" style='height:100%'>
<div style="position: relative;height:100%">
<div style="position: relative;" style='height:100%'>
<img src="${value.img}" alt="" style='height:100%'>
</div>
<div style="position: absolute;bottom: 4%;right: 2%;line-height: 1;display: flex;width: 40%;place-items:center">
<div style="position: relative;margin-right: 2%;width: 25%;">
<img src="${value.img1}">
</div>
<div style="position: relative;">
<div style="font-size: 1.4em;color: #fff;padding-bottom:5%">${value.title}</div>
<div style="font-size: 1.4em;color: #fff; ">${value.futitle}</div>
</div>
</div>
</div>
<div class="portfolio-content-wrapper ">
<div class="portfolio-content ">
<h3 class="portfolio-title "><a>${value.content}</a></h3>
<div style="display: flex;text-align: left;place-items: center;padding-top: 6%; ">
<img src="${value.img1} " style="width: 10%;height: 1%; ">
<div style="display: flex;flex-direction: column;padding-left: 2%; ">
<div class="portfolio-cat" style='padding-bottom:5%'>${value.title}</div>
<div class="portfolio-cat">${value.futitle}</div>
</div>
</div>
</div>
</div>
</article>
</div>`
$('#enterpriseProject').append(title)
})
}
})
})