7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
181 lines
5.8 KiB
HTML
181 lines
5.8 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>
|
|
.search{width:100%;text-align:left;background-color:#ffffff;height:59px;line-height:59px;}
|
|
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
|
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
|
.kh_list-container .img{height:300px;line-height:300px;width:400px;z-index:1;overflow:hidden;cursor:pointer;}
|
|
.kh_info{height:40px;line-height:40px;background-color:#f5f5f5;text-align:center;color:#595959;font-size:16px;font-weight:bold;}
|
|
.kh_info .zsh{}
|
|
.kh_info .dph{}
|
|
</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">
|
|
</head>
|
|
<body>
|
|
<!--图片列表-->
|
|
<div class="layui-row u-list" id="edt_kh_content"></div>
|
|
<script>
|
|
//是否手机端
|
|
var is_mobile="n";
|
|
var index_dk_single="";
|
|
//更新已订数据
|
|
function update_yd(){
|
|
layui.use('form', function(){
|
|
var $=layui.jquery;
|
|
var form = layui.form;
|
|
//获取预设数据
|
|
var url="./?_m=dk&_a=get_wcl&khid=";
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
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);
|
|
},
|
|
error: function () {
|
|
//
|
|
}
|
|
}
|
|
);
|
|
});
|
|
}
|
|
//橱窗详情
|
|
function cc_single(zsh){
|
|
layui.use('layer', function(){
|
|
var layer = parent.layer;
|
|
index_dk_single = layer.open({
|
|
type: 2,
|
|
title: '',
|
|
content: 'cc_single.htm?zsh='+zsh,
|
|
offset: 'b',
|
|
closeBtn:0,
|
|
anim: 2
|
|
});
|
|
layer.full(index_dk_single);
|
|
});
|
|
}
|
|
//取得瀑布流单款html
|
|
function get_list_html(data1,content_set){
|
|
var html1='';
|
|
html1+='<div class="u-list-item layui-col-lg4 layui-col-md6 layui-col-sm6 layui-col-xs12"><div class="kh_list-container" id="kh_'+data1.id+'">';
|
|
//---------------图片
|
|
html1+='<div class="img" onclick="cc_single('+data1.zsh+');" style="background-color:'+content_set+';"><img src="'+data1.pic+'" width="'+data1.pic_w+'" height="'+data1.pic_h+'" watermark></div>';
|
|
//kh_info
|
|
html1+='<div class="kh_info">';
|
|
//---------------展示号
|
|
html1+='<span class="zsh">'+data1.zsh+' . </span>';
|
|
//---------------搭配号
|
|
html1+='<span class="dph">'+data1.title+'</span>';
|
|
html1+='</div>';
|
|
//----kh_info
|
|
html1+='</div></div>';
|
|
return html1;
|
|
}
|
|
//
|
|
layui.config({
|
|
base: './layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index', 'user','flow'], function(){
|
|
var $ = layui.$
|
|
,setter = layui.setter
|
|
,admin = layui.admin
|
|
,form = layui.form;
|
|
var rate = layui.rate;
|
|
//取得url传递参数
|
|
var query_str=location.search.substring(1);
|
|
if(query_str)
|
|
query_str="&"+query_str;
|
|
var page=1;
|
|
//流加载
|
|
var flow = layui.flow;
|
|
//选项数组
|
|
flow.load({
|
|
elem: '#edt_kh_content'
|
|
,scrollElem:'#edt_kh_content'
|
|
,end:'<div style=\'width:100%;height:30px;line-height:30px;clear:both;\'>加载完成了</div>'
|
|
,done: function(page, next){
|
|
var lis = [];
|
|
var url1='./?_m=cc&page='+page+query_str;
|
|
//alert(url1);
|
|
$.get(url1,function(res){
|
|
json_data=$.parseJSON(res);
|
|
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;
|
|
window.parent.location.href=url1;
|
|
}else if(json_data.code==2){
|
|
//------------------重新登录
|
|
url1="login.htm?error_msg="+json_data.msg;
|
|
window.parent.location.href=url1;
|
|
}else{
|
|
//加载图片列表
|
|
var data=json_data.content_list;
|
|
var html1='';
|
|
for(var i=0;i<data.length;i++){
|
|
html1=get_list_html(data[i],json_data.content_set);
|
|
var elem = $(html1)
|
|
USetWatermark({
|
|
el: elem,
|
|
is_sy: json_data.is_sy,
|
|
text: json_data.username,
|
|
mode: "outer"
|
|
})
|
|
lis.push(elem[0].outerHTML)
|
|
}
|
|
next(lis.join(''), page<json_data.total_page);
|
|
// 限制图片宽度防止超出父元素尺寸
|
|
$(".kh_list-container .img").css("max-width", $(".kh_list-container").width())
|
|
$(".kh_list-container .img img").css("max-width", $(".kh_list-container").width())
|
|
//
|
|
total_page=json_data.total_page;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
//
|
|
form.on('select(select_single)', function(data){
|
|
$("#form1_submit").click();
|
|
});
|
|
//提交
|
|
form.on("submit(form1_submit)",function(data){
|
|
$("#form1_submit").focus();
|
|
return true;
|
|
});
|
|
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
|
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height()-60)
|
|
//监听屏幕旋转
|
|
// resize和orientationchange的不同:
|
|
// resize: 监听尺寸变化,orientationchange:监听移动端横竖屏切换
|
|
// orientationchange:宽高为切换前宽高,需延时才能获取切换后的宽高
|
|
$(window).on("orientationchange", function() {
|
|
if(index_dk_single)
|
|
parent.layer.full(index_dk_single)
|
|
setTimeout(function() {
|
|
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height() - 60)
|
|
}, 100)
|
|
})
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
</html> |