660 lines
56 KiB
HTML
660 lines
56 KiB
HTML
|
|
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="renderer" content="webkit"><meta name="format-detection" content="telephone=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><meta name="format-detection" content="telephone=no"><meta name="applicable-device" content="pc,mobile"><link rel="shortcut icon" href="/favicon.ico"><title>熙讯-服务支持-下载专区</title><meta name="keywords" content="熙讯,LED控制系统,LED控制卡,播控系统,软件服务,熙讯下载,解决方案提供商-熙讯、熙讯云科技、熙讯电子科技有限公司、熙讯官网、熙讯下载"><meta name="description" content="上海熙讯电子科技有限公司是全球户外数字传媒与LED显示控制系统解决方案服务商,致力于以互联网技术和智能系统推动行业的产业升级,为打造数字智慧城市贡献力量。10年来我们精耕于这一领域,凭借卓越的创新能力、突出的定制能力、优秀的服务能力、赢得了全球客户的信任!"><link rel="stylesheet" href="/static/iconfont/iconfont.css"><link rel="stylesheet" href="/static/layui/css/layui.css"><link rel="stylesheet" href="/static/css/layout.css"><script type="text/javascript" src="/static/js/jquery.min.js"></script><script type="text/javascript" src="/static/js/BeerSlider.js"></script><meta name="Author" content="xixun"></head><script>var type = navigator.appName;
|
|||
|
|
if (type == "Netscape") var lang = navigator.language;
|
|||
|
|
else var lang = navigator.userLanguage;
|
|||
|
|
var lang = lang.substr(0, 2);
|
|||
|
|
|
|||
|
|
//英文路径
|
|||
|
|
var url = window.location;
|
|||
|
|
//获取网页的来路
|
|||
|
|
|
|||
|
|
function getQueryString(name) {
|
|||
|
|
const url_string = window.location.href; // window.location.href
|
|||
|
|
const url = new URL(url_string);
|
|||
|
|
if (url.searchParams.get(name) != null) {
|
|||
|
|
Cookie_Set("language", url.searchParams.get(name));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
getQueryString("language");
|
|||
|
|
console.log(!Cookie_Get("language"), lang);
|
|||
|
|
if (!Cookie_Get("language") && lang == "en") {
|
|||
|
|
window.location.href = "http://sysolution.net/";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function Cookie_Set(name, val) {
|
|||
|
|
// var strsec = getsec(time);
|
|||
|
|
var exp = new Date();
|
|||
|
|
// exp.setTime(exp.getTime() + strsec * 1);
|
|||
|
|
document.cookie = name + "=" + val + ";path=/";
|
|||
|
|
}
|
|||
|
|
function Cookie_Get(name) {
|
|||
|
|
var arr,
|
|||
|
|
reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
|||
|
|
if ((arr = document.cookie.match(reg))) {
|
|||
|
|
return arr[2];
|
|||
|
|
} else {
|
|||
|
|
return null;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
function getsec(str) {
|
|||
|
|
var str1 = str.substring(1, str.length) * 1;
|
|||
|
|
var str2 = str.substring(0, 1);
|
|||
|
|
if (str2 == "s") {
|
|||
|
|
return str1 * 1000;
|
|||
|
|
} else if (str2 == "h") {
|
|||
|
|
return str1 * 60 * 60 * 1000;
|
|||
|
|
} else if (str2 == "d") {
|
|||
|
|
return str1 * 24 * 60 * 60 * 1000;
|
|||
|
|
}
|
|||
|
|
}</script><style>.bgRed{background-color:#d35c5d}.bgBlue{background-color:#b0c4de}.form-group{display:flex;align-items:center;margin-bottom:.6333vw}.form-group>div{margin-right:.6333vw;font-size:.8333vw}.form-group .form-control,.form-group .form-file,.form-group select{padding-left:8px;padding:8px 30px 8px 14px;border:1px solid #ccc;border-radius:.2vw;font-size:.8333vw;box-sizing:border-box}.form-group .form-file{font-size:.8333vw}.form-group select{margin-right:.6333vw}.form-group button{background-color:#b0c4de;color:#fff;border:none;cursor:pointer;font-size:.8333vw;padding:8px 12px;border-radius:2px}.btns{padding:2px 10px;border-radius:3px;background-color:#b0c4de;color:#fff;border:none;cursor:pointer;font-size:.8333vw}.layui-table{width:100%;margin:0}.layui-table thead td,.layui-table thead th{text-align:center}.layui-table thead th{background-color:#9dc9ff;font-size:.9375vw;font-weight:700}.layui-table tbody td,.layui-table tbody th{font-size:.8333vw}.layui-table td,.layui-table th{position:relative;height:35px;line-height:35px}.layui-table td,.layui-table th{padding:0}</style><body><div class="header head3"><div class="container1260 headerBox"><div class="logo"><a href="/index.html"><img src="/static/image/logo.png" alt=""></a></div><div class="header_content"><div class="head_navlist"><ul class="clearfloat"><li class="ProductNavOff"><a href="javascript:;">产品中心</a> <span></span><div class="ProductNav"><i></i><div class="container1260"><div class="ProTabBar"><div class="tabTerm active">控制系统</div><div class="tabTerm">视频处理</div><div class="tabTerm">相关配件</div><div class="tabTerm">软件服务</div><div class="tabTerm">安卓控制卡及定制开发</div></div><div class="ProTabCont"><div class="tabItem active"><div class="box"><div class="img"><img src="/static/products/control_system/commerce_display/M50B-D/img/M50B-D-11-880.jpg" alt=""></div><div class="text"><a href="/products/control_system/commerce_display/commerce_display.html"><h5>智慧商显同异步播放盒系列</h5></a><div class="li"><a href="/products/control_system/commerce_display/M50B-D/M50B-D.html">M50B-D<strong>(单网口65万像素异步播放盒 不支持二次开发)</strong></a> <a href="/products/control_system/commerce_display/M60B-S/M60B-S.html">M60B-S<strong>(双网口异步播放盒)</strong></a> <a href="/products/control_system/commerce_display/M70B-S/M70B-S.html">M70B-S<strong>(双网口同异步播放盒)</strong></a> <a href="/products/control_system/commerce_display/M80B-S/M80B-S.html">M80B-S<strong>(四网口同异步播放盒 支持多台拼接)</strong></a></div></div></div><div class="box"><div class="img"><img src="/static/products/control_system/lamp_pole/Y12/img/Y12.png" alt=""></div><div class="text"><a href="/products/control_system/lamp_pole/lamp_pole.html"><h5>灯杆车载等异步全彩系列</h5></a><div class="li"><a href="/products/control_system/lamp_pole/Y08/Y08.html">Y08<strong>(自带8口HUB75一体卡)</strong></a> <a href="/products/control_system/lamp_pole/Y12/Y12.html">Y12<strong>(自带12口HUB75E一体卡)</strong></a> <a href="/products/control_system/lamp_pole/Y50/Y50.html">Y50<strong>(双网口,耐高温主控卡主推)</strong></a></div></div></div><div class="box"><div class="img"><img src="/static/products/control_system/car_load/KD02/img/KD02-880.png" alt=""></div><div class="text"><a href="/products/control_system/car_load/car_load.html"><h5>动画图文卡系列</h5></a><div class="li"><a href="/products/control_system/car_load/KD02/KD02.html">KD02<strong>(蓝牙/Wifi单片机卡)</strong></a> <a href="/products/control_system/car_load/KD04/KD04.html">KD04<strong>(红绿灯LED交通卡)</strong></a> <a href="/products/control_system/car_load/KD13/KD13.html">KD13<strong>(4G动画一体卡)</strong></a> <a href="/products/control_system/car_load/KD15/KD15.html">KD15<strong>(通透屏动画卡)</strong></a> <a href="/products/control_system/car_load/KD16/KD16.html">KD16<strong>(CAN车载屏卡)</strong></a></div></div
|
|||
|
|
var laypage = layui.laypage,
|
|||
|
|
layer = layui.layer;
|
|||
|
|
|
|||
|
|
//总页数低于页码总数
|
|||
|
|
laypage.render({
|
|||
|
|
elem: "demo0",
|
|||
|
|
count: "4",
|
|||
|
|
curr: "1",
|
|||
|
|
limit: "12",
|
|||
|
|
prev: " ",
|
|||
|
|
next: " ",
|
|||
|
|
jump: function (obj, first) {
|
|||
|
|
//首次不执行
|
|||
|
|
if (!first) {
|
|||
|
|
//do something
|
|||
|
|
location.href = "/service/resource/index_" + obj.curr + ".html" + "?cat=" + "6";
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
$(".service_Software .right .con1 .box .UpdateSmBox").on('click', function () {
|
|||
|
|
$(this).siblings(".Description_popUp").fadeIn()
|
|||
|
|
})
|
|||
|
|
$(".Description_popUp i").on('click', function () {
|
|||
|
|
$(".Description_popUp").fadeOut()
|
|||
|
|
})
|
|||
|
|
$(".Description_popUp .con .off").on('click', function () {
|
|||
|
|
$(".Description_popUp").fadeOut()
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
var url = "https://ledok.cn:798";
|
|||
|
|
// load a template file, then render it with data
|
|||
|
|
var footer = document.getElementById("__footer")
|
|||
|
|
footer.innerHTML = new EJS({
|
|||
|
|
url: 'footer.ejs'
|
|||
|
|
}).render()
|
|||
|
|
//nav
|
|||
|
|
var menu = document.getElementById("__menu")
|
|||
|
|
menu.innerHTML = new EJS({
|
|||
|
|
url: 'menu.ejs'
|
|||
|
|
}).render(fyx_navData)
|
|||
|
|
|
|||
|
|
function comfirmpassword(type) {
|
|||
|
|
var password = $("#password").val()
|
|||
|
|
if (type && type == "consumer") {
|
|||
|
|
password = $("#consumerPassword").val()
|
|||
|
|
}
|
|||
|
|
if (password != "") {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/check",
|
|||
|
|
method: "post",
|
|||
|
|
data: {
|
|||
|
|
value: password
|
|||
|
|
},
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
if (type && type == "consumer") {
|
|||
|
|
$("#consumerLogin").css("display", "none");
|
|||
|
|
$("#consumerTabs").css("display", "block");
|
|||
|
|
consumerList();
|
|||
|
|
consumerCompanyNameAndresolution();
|
|||
|
|
} else {
|
|||
|
|
$("#login").css("display", "none");
|
|||
|
|
$("#fileList").css("display", "block");
|
|||
|
|
searchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function searchFile() {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/" + $("#selectResolutionRatio option:selected").val() + "/fileList",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
console.log('打印res.data', res.data)
|
|||
|
|
var html = "<table class='layui-table my-table' lay-even ><thead ><tr style='background-color: lightsteelblue;'><td>文件名称</td><td>操作</td></tr></thead><tbody>"
|
|||
|
|
res.data.forEach(element => {
|
|||
|
|
if (element.is_new) {
|
|||
|
|
html += "<tr><td><a href=" + url + "/download/YunSign/" + $("#selectResolutionRatio option:selected").val() + "/" + element.file + ">" + element.file + "</a><label style='color:red;margin-left:6px;'>new!</label></td><td><button class='btns bgRed' style='background-color:#d35c5d' type='button' onclick=delfile(this)>删除</button><button style='margin-left:10px;' class='btns bgBlue' type='button' onclick=setNew(this)>设置为最新版本</button></td></tr>"
|
|||
|
|
} else {
|
|||
|
|
html += "<tr><td><a href=" + url + "/download/YunSign/" + $("#selectResolutionRatio option:selected").val() + "/" + element.file + ">" + element.file + "</a></td><td><button class='btns bgRed' style='background-color:#d35c5d' type='button' onclick=delfile(this)>删除</button><button style='margin-left:10px;' class='btns bgBlue' type='button' onclick=setNew(this)>设置为最新版本</button></td></tr>"
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
html += "</tbody></table>"
|
|||
|
|
$("#fileTable").html(html);
|
|||
|
|
} else {
|
|||
|
|
|
|||
|
|
var html = "<table border=1><thead><tr><td>文件名称</td><td>操作</td></tr></thead><tbody><tr><td colspan=2>暂无数据</td></tr></tbody><table>";
|
|||
|
|
$("#fileTable").html(html);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function consumerCompanyNameAndresolution(type) {
|
|||
|
|
if (type && type == "from") {
|
|||
|
|
$("#consumerUploadSelectResolutionRatio option").remove();
|
|||
|
|
$("#consumerUploadSelectResolutionRatio").append("<option value=''>请选择</option>")
|
|||
|
|
$("#consumerUploadCompanyNameRatio option").remove();
|
|||
|
|
$("#consumerUploadCompanyNameRatio").append("<option value=''>请选择</option>")
|
|||
|
|
} else {
|
|||
|
|
$("#consumerSelectResolutionRatio option").remove();
|
|||
|
|
$("#consumerSelectResolutionRatio").append("<option value=''>请选择</option>")
|
|||
|
|
$("#consumerCompanyNameRatio option").remove();
|
|||
|
|
$("#consumerCompanyNameRatio").append("<option value=''>请选择</option>")
|
|||
|
|
}
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/resolution/list",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
if (type && type == "from") {
|
|||
|
|
for (let i = 0; i < res.data.length; i++) {
|
|||
|
|
const element = res.data[i];
|
|||
|
|
$("#consumerUploadSelectResolutionRatio").append("<option value='" + element._id + "'>" + element.name + "</option>")
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
for (let i = 0; i < res.data.length; i++) {
|
|||
|
|
const element = res.data[i];
|
|||
|
|
$("#consumerSelectResolutionRatio").append("<option value='" + element._id + "'>" + element.name + "</option>")
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/company/list",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
if (type && type == "from") {
|
|||
|
|
for (let i = 0; i < res.data.length; i++) {
|
|||
|
|
const element = res.data[i];
|
|||
|
|
$("#consumerUploadCompanyNameRatio").append("<option value='" + element._id + "'>" + element.name + "</option>")
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
for (let i = 0; i < res.data.length; i++) {
|
|||
|
|
const element = res.data[i];
|
|||
|
|
$("#consumerCompanyNameRatio").append("<option value='" + element._id + "'>" + element.name + "</option>")
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerClose() {
|
|||
|
|
$(".consumerOverlay").css({ "display": "none" })
|
|||
|
|
$(".consumerContent").css({ "display": "none" })
|
|||
|
|
$("input[name='consumerFile']").val(null)
|
|||
|
|
}
|
|||
|
|
function consumerUploadShow() {
|
|||
|
|
consumerCompanyNameAndresolution("from")
|
|||
|
|
$(".consumerOverlay").css({ "display": "flex" })
|
|||
|
|
$(".consumerContent").css({ "display": "block" })
|
|||
|
|
}
|
|||
|
|
function consumerUpload() {
|
|||
|
|
var resolution = $("#consumerUploadSelectResolutionRatio option:selected").val()
|
|||
|
|
var company = $("#consumerUploadCompanyNameRatio option:selected").val()
|
|||
|
|
var files = $("#consumerFile")[0].files;
|
|||
|
|
if (files.length <= 0) {
|
|||
|
|
return alert("请选择图片或视频")
|
|||
|
|
}
|
|||
|
|
if (resolution == "") {
|
|||
|
|
return alert("请选择分辨率")
|
|||
|
|
}
|
|||
|
|
if (company == "") {
|
|||
|
|
return alert("请选择公司名")
|
|||
|
|
}
|
|||
|
|
var fd = new FormData();
|
|||
|
|
fd.append("file", files[0]);
|
|||
|
|
fd.append("resolutionId", resolution);
|
|||
|
|
fd.append("companyId", company);
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/media/upload",
|
|||
|
|
method: "post",
|
|||
|
|
data: fd,
|
|||
|
|
processData: false,
|
|||
|
|
contentType: false,
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerList();
|
|||
|
|
}
|
|||
|
|
consumerClose()
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerResolutionAdd() {
|
|||
|
|
var resolutionInput = $("#resolutionInput").val()
|
|||
|
|
if (resolutionInput == "") {
|
|||
|
|
return alert("请输入分辨率")
|
|||
|
|
}
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/resolution/save",
|
|||
|
|
method: "post",
|
|||
|
|
data: { "name": resolutionInput },
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerResolution();
|
|||
|
|
$("#resolutionInput").val(null)
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerResolution() {
|
|||
|
|
$("#consumerResolutionShow").css({ "display": "block" })
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/resolution/list",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
var html = "<table class='consumerTable' border=1 id='consumerResolutionTable'>"
|
|||
|
|
+ "<thead>"
|
|||
|
|
+ "<tr>"
|
|||
|
|
+ "<th>像素</th><th>操作</th>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
+ "</thead> "
|
|||
|
|
+ "<tbody>"
|
|||
|
|
res.data.forEach(element => {
|
|||
|
|
html += "<tr>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<span>" + element.name + "</span>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<button class='btn btn-default' type='button' onclick='consumerResolutionDel(" + JSON.stringify(element._id) + ")'>删除</button>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
html += "</tbody></table>"
|
|||
|
|
$("#consumerResolutionTable").html(html);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerResolutionDel(val) {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/resolution/delete/" + val,
|
|||
|
|
method: "delete",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerResolution();
|
|||
|
|
} else {
|
|||
|
|
alert(res.msg)
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (res) {
|
|||
|
|
alert(res.responseJSON.msg)
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerCompanyDel(val) {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/company/delete/" + val,
|
|||
|
|
method: "delete",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerCompany();
|
|||
|
|
} else {
|
|||
|
|
alert(res.msg)
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (res) {
|
|||
|
|
// alert(res.responseJSON.msg)
|
|||
|
|
alert("当前公司名正在使用")
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerCompanyAdd() {
|
|||
|
|
var companyInput = $("#companyInput").val()
|
|||
|
|
if (companyInput == "") {
|
|||
|
|
return alert("请输入公司名")
|
|||
|
|
}
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/company/save",
|
|||
|
|
method: "post",
|
|||
|
|
data: { "name": companyInput },
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerCompany();
|
|||
|
|
$("#companyInput").val(null)
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerCompany() {
|
|||
|
|
$("#consumerCompanyShow").css({ "display": "block" })
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/company/list",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
var html = "<table class='consumerTable' border=1 id='consumerCompanyTable'>"
|
|||
|
|
+ "<thead>"
|
|||
|
|
+ "<tr>"
|
|||
|
|
+ "<th>公司名</th><th>操作</th>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
+ "</thead> "
|
|||
|
|
+ "<tbody>"
|
|||
|
|
res.data.forEach(element => {
|
|||
|
|
html += "<tr>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<span>" + element.name + "</span>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<button class='btn btn-default' type='button' onclick='consumerCompanyDel(" + JSON.stringify(element._id) + ")'>删除</button>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
html += "</tbody></table>"
|
|||
|
|
$("#consumerCompanyTable").html(html);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerShow() {
|
|||
|
|
consumerList();
|
|||
|
|
consumerCompanyNameAndresolution();
|
|||
|
|
}
|
|||
|
|
function consumermMediaDel(val) {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/consumer/media/delete/" + val,
|
|||
|
|
method: "delete",
|
|||
|
|
success: function (res) {
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
consumerList();
|
|||
|
|
} else {
|
|||
|
|
alert(res.msg)
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
error: function (res) {
|
|||
|
|
alert(res.responseJSON.msg)
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function consumerList(type) {
|
|||
|
|
var resolution = $("#consumerSelectResolutionRatio option:selected").val()
|
|||
|
|
var company = $("#consumerCompanyNameRatio option:selected").val()
|
|||
|
|
var page = 1
|
|||
|
|
var pageSize = 10
|
|||
|
|
var currPageVal = parseInt($("#consumerCurrPage").text())
|
|||
|
|
var pageSizeVal = parseInt($("#consumerPageSize").text())
|
|||
|
|
var totalPageVal = parseInt($("#consumerTotalPage").text())
|
|||
|
|
if (currPageVal) {
|
|||
|
|
page = currPageVal
|
|||
|
|
}
|
|||
|
|
if (type) {
|
|||
|
|
if (type == "pre") {
|
|||
|
|
if (page > 1) {
|
|||
|
|
page--
|
|||
|
|
}
|
|||
|
|
} else if (type == "next") {
|
|||
|
|
if (page < totalPageVal) {
|
|||
|
|
page++
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
var uri = "/consumer/media/list?page=" + page + "&pageSize=" + pageSize
|
|||
|
|
if (resolution != "") {
|
|||
|
|
uri += "&resolutionId=" + resolution
|
|||
|
|
}
|
|||
|
|
if (company != "") {
|
|||
|
|
uri += "&companyId=" + company
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + uri,
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
// console.log(res.data)
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
$("#consumerTotalPage").text(res.totalPage)
|
|||
|
|
$("#consumerTotalSize").text(res.totalSize)
|
|||
|
|
$("#consumerCurrPage").text(res.currPage)
|
|||
|
|
$("#consumerPageSize").text(res.pageSize)
|
|||
|
|
var html = "<table class='consumerTable' border=1 id='consumerTable'>"
|
|||
|
|
+ "<thead>"
|
|||
|
|
+ "<tr>"
|
|||
|
|
+ "<th>文件名称</th><th>公司名</th><th>像素</th><th>操作</th>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
+ "</thead> "
|
|||
|
|
+ "<tbody>"
|
|||
|
|
res.data.forEach(element => {
|
|||
|
|
html += "<tr>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<a href=" + url + "/consumer/media/download/" + element._id + ">" + element.file_name + "</a>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<span>" + element.company_name + "</span>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<span>" + element.resolution_name + "</span>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "<td>"
|
|||
|
|
+ "<button class='btn btn-default' type='button' onclick='consumermMediaDel(" + JSON.stringify(element._id) + ")'>删除</button>"
|
|||
|
|
+ "</td>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
|
|||
|
|
});
|
|||
|
|
html += "</tbody></table>"
|
|||
|
|
$("#consumerTable").html(html);
|
|||
|
|
} else {
|
|||
|
|
var html = "<table border=1>"
|
|||
|
|
+ "<thead>"
|
|||
|
|
+ "<tr>"
|
|||
|
|
+ "<td>文件名称</td><td>公司名</td><td>像素</td><td>操作</td>"
|
|||
|
|
+ "</thead>"
|
|||
|
|
+ "<tbody>"
|
|||
|
|
+ "<tr>"
|
|||
|
|
+ "<td colspan=2>暂无数据</td>"
|
|||
|
|
+ "</tr>"
|
|||
|
|
+ "</tbody>"
|
|||
|
|
+ "<table>";
|
|||
|
|
$("#consumerTable").html(html);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
function uploadFile() {
|
|||
|
|
var files = $("#file")[0].files;
|
|||
|
|
var wj;
|
|||
|
|
if (files.length <= 0) {
|
|||
|
|
return alert("请选择文件后再上传");
|
|||
|
|
}
|
|||
|
|
wj = new FormData();
|
|||
|
|
wj.append("file", files[0]);
|
|||
|
|
// console.log(wj);
|
|||
|
|
// console.log(wj.get("file"))
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/upload/" + $("#selectResolutionRatio option:selected").val(),
|
|||
|
|
method: "post",
|
|||
|
|
data: wj,
|
|||
|
|
processData: false,
|
|||
|
|
contentType: false,
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
alert('上传成功');
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
searchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function searchFileName() {
|
|||
|
|
var text = $("#input").val();
|
|||
|
|
if ($.trim(text) != "") {
|
|||
|
|
$("#fileTable tr:not('#theader')").hide().filter(":contains('" + text + "')").show();
|
|||
|
|
} else {
|
|||
|
|
$('#fileTable tr').show();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function delfile(val) {
|
|||
|
|
// console.log("1245644465")
|
|||
|
|
var value = $(val).parent().parent().find('td a');
|
|||
|
|
console.log(value.eq(0).text());
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/delete/" + $("#selectResolutionRatio option:selected").val() + "/" + value.eq(0).text(),
|
|||
|
|
method: "delete",
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
searchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function setNew(val) {
|
|||
|
|
var value = $(val).parent().parent().find('td a');
|
|||
|
|
console.log(value.eq(0).text());
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/setNew",
|
|||
|
|
method: "post",
|
|||
|
|
data: {
|
|||
|
|
fbl: $("#selectResolutionRatio option:selected").val(),
|
|||
|
|
version: value.eq(0).text()
|
|||
|
|
},
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
searchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
// I_LED
|
|||
|
|
function I_Ledcomfirmpassword() {
|
|||
|
|
if ($("#I_Ledpassword").val() != "") {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/YunSign/check",
|
|||
|
|
method: "post",
|
|||
|
|
data: {
|
|||
|
|
value: $("#I_Ledpassword").val()
|
|||
|
|
},
|
|||
|
|
success: function (res) {
|
|||
|
|
// console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
$("#I_Ledlogin").css("display", "none");
|
|||
|
|
$("#I_LedfileList").css("display", "block");
|
|||
|
|
I_LedsearchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
// console.log($("#password").val());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function I_LedsearchFile() {
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/I_Led/" + $("#I_LedselectResolutionRatio option:selected").val() + "/fileList",
|
|||
|
|
method: "get",
|
|||
|
|
success: function (res) {
|
|||
|
|
// console.log(res.data)
|
|||
|
|
if (res.code == 200 && res.data != null) {
|
|||
|
|
var html = "<table border=1 id='I_LedfileTable'><thead><tr><td>文件名称</td><td>操作</td></tr></thead><tbody>"
|
|||
|
|
res.data.forEach(element => {
|
|||
|
|
if (element.is_new) {
|
|||
|
|
html += "<tr><td><a href=" + url + "/download/I_Led/" + $("#I_LedselectResolutionRatio option:selected").val() + "/" + element.file + ">" + element.file + "</a><label class='new'>new!</label></td><td><button class='btn btn-default' type='button' onclick=I_Leddelfile(this)>删除</button><button style='margin-left:10px;' class='btn btn-default' type='button' onclick=I_LedsetNew(this)>设置为最新版本</button></td></tr>"
|
|||
|
|
|
|||
|
|
} else {
|
|||
|
|
html += "<tr><td><a href=" + url + "/download/I_Led/" + $("#I_LedselectResolutionRatio option:selected").val() + "/" + element.file + ">" + element.file + "</a></td><td><button class='btn btn-default' type='button' onclick=I_Leddelfile(this)>删除</button><button style='margin-left:10px;' class='btn btn-default' type='button' onclick=I_LedsetNew(this)>设置为最新版本</button></td></tr>"
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
html += "</tbody></table>"
|
|||
|
|
$("#I_LedfileTable").html(html);
|
|||
|
|
} else {
|
|||
|
|
var html = "<table border=1><thead><tr><td>文件名称</td><td>操作</td></tr></thead><tbody><tr><td colspan=2>暂无数据</td></tr></tbody><table>";
|
|||
|
|
$("#I_LedfileTable").html(html);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function I_LeduploadFile() {
|
|||
|
|
var files = $("#I_Ledfile")[0].files;
|
|||
|
|
var wj;
|
|||
|
|
if (files.length <= 0) {
|
|||
|
|
return alert("请选择文件后再上传");
|
|||
|
|
}
|
|||
|
|
wj = new FormData();
|
|||
|
|
wj.append("file", files[0]);
|
|||
|
|
// console.log(wj);
|
|||
|
|
// console.log(wj.get("file"))
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/I_Led/upload/" + $("#I_LedselectResolutionRatio option:selected").val(),
|
|||
|
|
method: "post",
|
|||
|
|
data: wj,
|
|||
|
|
processData: false,
|
|||
|
|
contentType: false,
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
I_LedsearchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function I_LedsearchFileName() {
|
|||
|
|
var text = $("#I_Ledinput").val();
|
|||
|
|
if ($.trim(text) != "") {
|
|||
|
|
$("#I_LedfileTable tr:not('#theader')").hide().filter(":contains('" + text + "')").show();
|
|||
|
|
} else {
|
|||
|
|
$('#I_LedfileTable tr').show();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
function I_Leddelfile(val) {
|
|||
|
|
// console.log("1245644465")
|
|||
|
|
var value = $(val).parent().parent().find('td a');
|
|||
|
|
console.log(value.eq(0).text());
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/I_Led/delete/" + $("#I_LedselectResolutionRatio option:selected").val() + "/" + value.eq(0).text(),
|
|||
|
|
method: "delete",
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
I_LedsearchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
function I_LedsetNew(val) {
|
|||
|
|
var value = $(val).parent().parent().find('td a');
|
|||
|
|
console.log(value.eq(0).text());
|
|||
|
|
$.ajax({
|
|||
|
|
url: url + "/I_Led/setNew",
|
|||
|
|
method: "post",
|
|||
|
|
data: {
|
|||
|
|
fbl: $("#I_LedselectResolutionRatio option:selected").val(),
|
|||
|
|
version: value.eq(0).text()
|
|||
|
|
},
|
|||
|
|
success: function (res) {
|
|||
|
|
console.log(res);
|
|||
|
|
if (res.code == 200) {
|
|||
|
|
I_LedsearchFile();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
}</script>
|