Merge remote-tracking branch 'origin/master'

master
wangh 1 year ago
commit f6d9255c4b

@ -108,9 +108,11 @@ body {
background-size: 100% 100%;
background-repeat: no-repeat;
width: 43.76vh;
margin-right: 12px;
height: calc(24vh - 12px);
position: absolute;
left: 43.76vh;
position: relative;
display: inline-block;
/*left: 43.76vh;*/
background-position: 0 1vw;
}

@ -1,20 +1,25 @@
$(() => {
let VH =(window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight)/100;
let itemNum = 0
setInterval(function () {
let width = $('#bottom .item:eq(0)').outerWidth() + 12
if (width * (itemNum - 1) > $('#bottom').width()) {
$('#bottom').animate({
scrollLeft: width
}, 2000, () => {
$('#bottom').scrollLeft(0)
$('#bottom .item:eq(0)').slideToggle(0, function () {
$('#bottom').append($(this).clone().css({display: 'block'}));
$(this).remove();
});
let fun = () =>{
let width = $('#bottom .info .item:eq(0)').outerWidth() + 18
if ($('#bottom .info').width() > ($('#bottom ').width() + width)) {
$('#bottom ').animate({
scrollLeft: width
}, 3000, () => {
$('#bottom').scrollLeft(0)
$('#bottom .info .item:eq(0)').slideToggle(0, function () {
let html = $(this).clone().css({display: 'inline-block'})
$(this).remove();
$('#bottom .info').append(html);
});
});
}
}, 2000);
}
setInterval(function () {
fun()
}, 5000);
$.get(ctx + 'broad/home/queryCustomer', (e) => {
$("#customerPresentation").empty()
@ -38,7 +43,7 @@ $(() => {
$("#content").html(e.msg)
})
$.get(ctx + 'broad/home/queryDevice', (e) => {
$("#bottom").empty()
$("#bottom .info").empty()
let data = e?.data?.map(val => {
return {
name: val.deviceTypeName,
@ -48,14 +53,17 @@ $(() => {
}
});
itemNum = data.length;
$("#bottom .info").width(itemNum*(44*VH+12));
data.forEach((e, i) => {
let html = `
<div class="item" style="left:calc(${43.76 * i}vh + ${i * 12}px)" onclick="toLink('${e.url}')">
<div class="title">${e.name}</div>
<div class="item" style="" onclick="toLink('${e.url}')">
<div class="title">${e.name}${i}</div>
<img src="${e.img}" width="100%" class="img">
</div>
`
$("#bottom").append(html)
$("#bottom .info").append(html)
})
fun()
})
})

@ -20,7 +20,6 @@ const leftClick = (e,id,name)=>{
$(e).attr('class', 'itemClick');
$(e).siblings().attr('class', 'item');
$.post(ctx + 'manage/base_file/fileList', {name: name}, (e) => {
console.log(e)
let tableData = e.data.map((e, i) => {
return {
...e,
@ -32,7 +31,6 @@ const leftClick = (e,id,name)=>{
}
})
let html = ``
console.log(tableData)
tableData = tableData.filter(e=>e.filePath.includes('.mp4'))
tableData.forEach(e=>{
html += `

@ -35,7 +35,9 @@
<div class="title2">客户展示</div>
<div class="customerPresentation" id="customerPresentation"></div>
<div class="bottom" id="bottom"></div>
<div class="bottom" id="bottom">
<div class="info"></div>
</div>
</div>
<th:block th:include="include :: footer"/>

Loading…
Cancel
Save