7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
255 lines
10 KiB
HTML
255 lines
10 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>推送-e订通</title>
|
|
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
<style>
|
|
#content #info .info-row {display: inline-block; width: 50%; margin-top: 5px;}
|
|
#content #info .info-row span {display: inline-block; width: 50%;}
|
|
#content #info .text{font-weight: bold; text-align: left;}
|
|
.kh_list-container {position: relative;}
|
|
.kh_list-container .kh_hide{display:none;min-width:100%;position:absolute;right:0px;bottom:23px;background:#f5f5f5;filter:alpha(Opacity=90);-moz-opacity:0.9;opacity: 0.9;}
|
|
.kh_list-container .kh_hide table {margin: auto;}
|
|
.kh_list-container .div_button_del_pj {text-align: center;}
|
|
.no-data {display: none; padding: 20px; color: #d0d0d0;}
|
|
</style>
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
<!-- 引入 -->
|
|
<!-- universal -->
|
|
<script src="js/universal/universal.js"></script>
|
|
<link rel="stylesheet" href="js/universal/universal.css">
|
|
<!-- viewer js -->
|
|
<script src="js/viewer/viewer.min.js"></script>
|
|
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
|
<!-- <script src="js/viewer/jquery-viewer.min.js"></script> -->
|
|
</head>
|
|
<body>
|
|
<form class="layui-form ts-header">
|
|
<div class="layui-form-item" style="margin-top: 15px;">
|
|
<label for="zt" class="layui-form-label">展厅</label>
|
|
<div class="layui-input-block" style="width: 200px;">
|
|
<select id="zt" lay-filter="zt"></select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<hr class="ts-header layui-bg-gray">
|
|
<div class="no-data"></div>
|
|
<!-- 信息层 -->
|
|
<div id="content" class="layui-row">
|
|
<div id="show">
|
|
<div id="pic" class="refresh" style="width: 300px; height: 400px; line-height: 400px; box-shadow: 1px 1px 10px 3px #d0d0d0;"></div>
|
|
</div>
|
|
<div id="title" class="refresh"></div>
|
|
</div>
|
|
<hr class="layui-bg-gray">
|
|
<!-- 推送 -->
|
|
<div id="tss" class="layui-row refresh"></div>
|
|
<hr class="layui-bg-gray">
|
|
|
|
<script>
|
|
var is_mobile="n"
|
|
,ts_data
|
|
setInterval(function() {
|
|
refresh(ts_data.tid)
|
|
}, 5000) // 定时
|
|
|
|
layui.config({
|
|
base: './layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index', 'user','form'], function(){
|
|
var $ = layui.$
|
|
,setter = layui.setter
|
|
,admin = layui.admin
|
|
,form = layui.form
|
|
|
|
var url="./?_m=ts";
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
success: function (res) {
|
|
var json_data=$.parseJSON(res);
|
|
//alert(json_data.ver);
|
|
if(json_data.code==0){
|
|
//------------------本页返回的错误信息
|
|
layer.msg(json_data.msg);
|
|
}else if(json_data.code==1){
|
|
//------------------系统错误
|
|
var msg=json_data.msg;
|
|
var url1="error.htm?msg="+json_data.msg+"&btn_title="+json_data.btn_title+"&btn_url="+json_data.btn_url;
|
|
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
|
}else if(json_data.code==2){
|
|
//------------------重新登录
|
|
url1="login.htm?error_msg="+json_data.msg;
|
|
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
|
}else{
|
|
console.log(["初始", json_data])
|
|
if (json_data.zt.length) {
|
|
for (var i = 0; i < json_data.zt.length; i++) {
|
|
var zt = json_data.zt[i]
|
|
$("#zt").append("<option value='"+zt.id+"'"+(get_url_param("s_tid") == zt.id ? " selected" : "")+">"+zt.title+"</option>")
|
|
}
|
|
} else {
|
|
$(".ts-header").hide()
|
|
}
|
|
form.render() // 初始化form下的select控件
|
|
|
|
refresh(get_url_param("s_tid") ? get_url_param("s_tid") : json_data.s_tid)
|
|
}
|
|
}
|
|
// ,beforeSend: function() { u_start_loading() }
|
|
// ,complete: function() { u_stop_loading() }
|
|
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
|
}
|
|
);
|
|
|
|
// 展厅选择
|
|
form.on("select(zt)", function(data) {
|
|
if (data.value != ts_data.tid)
|
|
location.href = "ts.htm?s_tid="+data.value
|
|
})
|
|
|
|
if(admin.screen()<2)
|
|
is_mobile="y";
|
|
$(window).on('resize', function(){
|
|
//自动
|
|
if(admin.screen()<2)
|
|
is_mobile="y";
|
|
});
|
|
})
|
|
//显示,隐藏评价层
|
|
function show_hide_kh_hide(id){
|
|
layui.use('jquery', function(){
|
|
var $=layui.jquery;
|
|
$("#kh_hide_"+id).toggle(500);
|
|
})
|
|
}
|
|
|
|
function openDkSingle(khid) {
|
|
layui.use('layer', function(){
|
|
var layer = parent.layer;
|
|
var index = layer.open({
|
|
type: 2,
|
|
title: '',
|
|
content: "dk_single"+(ts_data.face == "2" ? "_qj" : "")+".htm?khid="+khid,
|
|
offset: 'b',
|
|
closeBtn: 0,
|
|
anim: 2
|
|
});
|
|
layer.full(index);
|
|
});
|
|
}
|
|
// 刷新数据
|
|
function refresh(s_tid) {
|
|
layui.use("jquery", function() {
|
|
var $ = layui.$
|
|
$.ajax({
|
|
url: "./?_m=ts&_a=ajax_tb&s_tid="+s_tid
|
|
,contentType: "application/json"
|
|
,method: 'POST'
|
|
,success: function(res) {
|
|
var json_data = $.parseJSON(res)
|
|
console.log(["初始2", json_data])
|
|
if (json_data.code == 0) {
|
|
$(".no-data").html(json_data.msg).show()
|
|
ts_data = json_data
|
|
} else {
|
|
$(".no-data").html(json_data.msg).hide()
|
|
if (!ts_data || ts_data.zsh != json_data.zsh) {
|
|
ts_data = json_data
|
|
$(".refresh").html("")
|
|
//--------------展示图片
|
|
$("#content #pic").append("<img src='"+json_data.pic+"' style='width: "+json_data.pic_w+"px; height: "+json_data.pic_h+"px; max-width: 300px; max-height: 400px;' watermark>")
|
|
new Viewer(document.getElementById("pic"), {
|
|
url: 'data-original'
|
|
,toolbar: false
|
|
,title: false
|
|
,rotatable: false
|
|
,backdrop: false // 点击非图片层关闭
|
|
,viewed: function() {
|
|
USetWatermark({
|
|
el: $(".viewer-container .viewer-canvas img"),
|
|
is_sy: json_data.is_sy,
|
|
text: json_data.username,
|
|
font_size: 64
|
|
})
|
|
}
|
|
})
|
|
//--------------信息
|
|
$("#content #title").html(json_data.btn_title)
|
|
//------------相关推送
|
|
for (var i = 0; i < json_data.tss.length; i++) {
|
|
var ts = json_data.tss[i]
|
|
,tss_html = ""
|
|
tss_html += "<div class='kh_list-container layui-col-lg2 layui-col-md3 layui-col-sm3 layui-col-xs6 layui-col-xxs12' style='padding:5px;'>" // box
|
|
tss_html += "<a href='javascript: openDkSingle("+ts.khid+")'><div style='width: 200px;height: 200px; line-height: 200px; position: relative;background-color:"+json_data.pic_background+";'><img src="+ts.pic+" style='width:"+ts.pic_w+"px; height:"+ts.pic_h+"px;' watermark>" // pic
|
|
tss_html += ts.num && ts.num != "0" ? "<div style='position: absolute; top: 0; left: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #d0d0d0;'>"+ts.num+"件</div>" : "" // ydj
|
|
// tss_html += ts.kh_dj ? "<div style='position: absolute; bottom: 0; right: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #d0d0d0;'>"+ts.kh_dj+"</div>" : ""
|
|
if (json_data.bs_kh_dj == "word" && ts.kh_dj) {
|
|
tss_html += "<span style='position: absolute; top: 0; right: 0; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9; line-height: 20px;'>"+ts.kh_dj+"</span>"
|
|
} else if (json_data.bs_kh_dj == "pic" && ts.kh_dj) {
|
|
tss_html += "<img src='../attachments/"+ts.kh_dj+".png' style='position: absolute; top: 0; right: 0;' watermark>"
|
|
}
|
|
tss_html += "</div></a>"
|
|
tss_html += "<div style='text-align: center;'>"
|
|
tss_html += "<div class='layui-inline' style=' text-align: center; width: 30px; height: 30px; line-height: 30px; border-radius: 15px; background-color: #d0d0d0; color: white; font-size: 12px; margin-left: 10px; margin-right: 10px;'>"+ts.xh+"</div>" // xh
|
|
tss_html += "<div class='layui-inline'>" // khid, price
|
|
tss_html += "<div class='layui-inline' style='text-align: left;'>"+ts.kh+"-"+ts.colort+"</div><div class='layui-inline' style='margin-left: 8px; min-width: 60px; text-align: right;'>¥"+ts.price+"</div>"
|
|
//---- > xj_big
|
|
tss_html += "<div id='kh_hide_"+ts.khid+"' class='kh_hide'>"
|
|
tss_html += "<div id='div_pj_"+ts.khid+"_icon_big'>"+get_pj_icon(ts.xj,ts.khid,"big","y")+"</div>"
|
|
tss_html += "<div class='div_button_del_pj' style='display:"+(ts.xj && ts.xj != "0" ? "" : "none")+"; padding: 1px;' id='div_button_del_pj_"+ts.khid+"'><button type='button' id='button_del_pj_"+ts.khid+"' class='layui-btn layui-btn-sm button_del_pj' onclick='del_pj("+ts.khid+")' style='background-color:#F04122;'>删除评价</button></div>"
|
|
tss_html += "</div>"
|
|
// end > xj_big
|
|
tss_html += "<div class='xj' id='div_pj_"+ts.khid+"_icon_mini' onclick='show_hide_kh_hide("+ts.khid+")'>"+get_pj_icon(ts.xj,ts.khid,"mini","n")+"</div>"
|
|
// > xj_mini
|
|
tss_html += "</div>"
|
|
tss_html += "</div>"
|
|
tss_html += "</div>"
|
|
$("#tss").append(tss_html)
|
|
}
|
|
}
|
|
}
|
|
// setTimeout("refresh("+json_data.tid+")",5000);
|
|
// 添加水印
|
|
USetWatermark({
|
|
is_sy: json_data.is_sy
|
|
,text: json_data.username
|
|
})
|
|
}
|
|
// ,beforeSend: function() { u_start_loading() }
|
|
// ,complete: function() { u_stop_loading() }
|
|
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
|
})
|
|
})
|
|
}
|
|
|
|
function update_yd() {
|
|
layui.use('jquery', function(){
|
|
var $ = layui.jquery
|
|
$.ajax({
|
|
url: "./?_m=dk&_a=get_wcl"
|
|
,success: function(res) {
|
|
var json_data=$.parseJSON(res);
|
|
//更新父窗口数据
|
|
window.parent.update_yd_param(json_data.zb_client_show,json_data.order_jsje,json_data.order_num,json_data.zb_je,json_data.wcl_je,json_data.zb_js,json_data.wcl_js);
|
|
location.reload()
|
|
}
|
|
,beforeSend: function() { u_start_loading() }
|
|
,complete: function() { u_stop_loading() }
|
|
,error: function() { layui.layer.msg("与服务器通信失败!") }
|
|
})
|
|
})
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html> |