|
|
|
@ -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()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|