Merge remote-tracking branch 'origin/master'

master
wangh 1 year ago
commit f6d9255c4b

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

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

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

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

Loading…
Cancel
Save