新增商家页面、以及页面微改

1 个父辈 5914b427
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>项目列表</title> <title>活动介绍编辑</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<style> <style>
.layui-form-select dl{ .layui-form-select dl {
max-height:190px; max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 400px;
overflow: hidden;
margin: 0;
} }
#allmap {top:10px;width:100%;height: 400px;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style> </style>
<body class="wrap"> <body class="wrap">
<div class="layui-form Detailbtn" style="display:block;"> <div class="layui-form Detailbtn" style="display:block;">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>项目名称</label> <label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>项目名称</label>
<div class="layui-input-inline" style="width:390px;"> <div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="name" placeholder="项目名称" class="layui-input"> <input type="text" name="name" lay-verify="name" placeholder="项目名称" class="layui-input">
</div> </div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div> <div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>海报模板</label> <label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>海报模板</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select name="postertempletid" lay-search=""> <select name="postertempletid" lay-search="">
<option value="">全部</option> <option value="">全部</option>
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">位置</label> <label class="layui-form-label">位置</label>
<!-- <div class="layui-input-inline"> <!-- <div class="layui-input-inline">
<input type="text" name="lng" readonly lay-verify="required" placeholder="经度" class="layui-input" style="background-color:#f5f5f5;color:#666;"> <input type="text" name="lng" readonly lay-verify="required" placeholder="经度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div> </div>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lat" readonly lay-verify="required" placeholder="纬度" class="layui-input" style="background-color:#f5f5f5;color:#666;"> <input type="text" name="lat" readonly lay-verify="required" placeholder="纬度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div> --> </div> -->
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="number" name="lng" lay-verify="required" placeholder="经度" class="layui-input" > <input type="number" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div>
<div class="layui-input-inline">
<input type="number" name="lat" lay-verify="required" placeholder="纬度" class="layui-input" >
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div class="layui-form-mid layui-word-aux" style="padding-bottom:0;">提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)</div>
<div id="allmap"></div>
<div class="layui-form-item" style="margin-top: 30px;">
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
</div> </div>
</div> <div class="layui-input-inline">
<input type="number" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div class="layui-form-mid layui-word-aux" style="padding-bottom:0;">提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)</div>
<div id="allmap"></div>
<div class="layui-form-item" style="margin-top: 30px;">
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
</div>
</div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script> <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script> <script>
// 百度地图API功能 // 百度地图API功能
var map = new BMap.Map("allmap"); var map = new BMap.Map("allmap");
var map = new BMap.Map("allmap",{minZoom:4,maxZoom:18}); // 创建Map实例,设置地图允许的最小/大级别 var map = new BMap.Map("allmap", {
map.enableScrollWheelZoom(true); minZoom: 4,
maxZoom: 18
//单击获取点击的经纬度 }); // 创建Map实例,设置地图允许的最小/大级别
map.addEventListener("click",function(e){ map.enableScrollWheelZoom(true);
$("input[name=lng]").val(e.point.lng);
$("input[name=lat]").val(e.point.lat); //单击获取点击的经纬度
var allOverlay = map.getOverlays(); map.addEventListener("click", function(e) {
if(allOverlay.length>0){ $("input[name=lng]").val(e.point.lng);
function deletePoint(){ $("input[name=lat]").val(e.point.lat);
for (var i = 0; i < allOverlay.length ; i++){ var allOverlay = map.getOverlays();
map.removeOverlay(allOverlay[i]); if(allOverlay.length > 0) {
function deletePoint() {
for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
} }
deletePoint()
var point = new BMap.Point(e.point.lng, e.point.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
deletePoint() });
var point = new BMap.Point(e.point.lng,e.point.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
}
});
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() { layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(), var form = layui.form(),
element = layui.element(), element = layui.element(),
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
$("input[name=lng],input[name=lat]").blur(function(){ $("input[name=lng],input[name=lat]").blur(function() {
var plng=$("input[name=lng]").val(); var plng = $("input[name=lng]").val();
var plat=$("input[name=lat]").val(); var plat = $("input[name=lat]").val();
var allOverlay = map.getOverlays(); var allOverlay = map.getOverlays();
if(allOverlay.length>0){ if(allOverlay.length > 0) {
function deletePoint(){ function deletePoint() {
for (var i = 0; i < allOverlay.length ; i++){ for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]); map.removeOverlay(allOverlay[i]);
} }
} }
deletePoint() deletePoint()
var point = new BMap.Point(plng,plat); var point = new BMap.Point(plng, plat);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
}); });
//下拉海报 //下拉海报
$.post("/zzhnc/poster/getAllPostertemplet",function(data){ $.post("/zzhnc/poster/getAllPostertemplet", function(data) {
console.log(data); console.log(data);
var str=""; var str = "";
for(var i=0;i<data.data.length;i++){ for(var i = 0; i < data.data.length; i++) {
str+='<option value='+ data.data[i].id +'>'+ data.data[i].name +'</option>'; str += '<option value=' + data.data[i].id + '>' + data.data[i].name + '</option>';
} }
$("select[name=postertempletid]").append(str); $("select[name=postertempletid]").append(str);
form.render(); form.render();
}) })
$(".resetBtn").on("click",function(){ $(".resetBtn").on("click", function() {
$("input[name=name]").val(""); $("input[name=name]").val("");
$("select[name=postertempletid]").val("0"); $("select[name=postertempletid]").val("0");
var allOverlay = map.getOverlays(); var allOverlay = map.getOverlays();
if(allOverlay.length>0){ if(allOverlay.length > 0) {
function deletePoint(){ function deletePoint() {
for (var i = 0; i < allOverlay.length ; i++){ for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]); map.removeOverlay(allOverlay[i]);
} }
} }
...@@ -139,103 +147,100 @@ ...@@ -139,103 +147,100 @@
} }
$("input[name=lng]").val(113.754653); $("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333); $("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653,23.025333),13); map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653,23.025333); var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render(); form.render();
}) })
var id=getUrl_G("id"); var id = getUrl_G("id");
if(id>0){ if(id > 0) {
$.post("/zzhnc/project/getProject",{ $.post("/zzhnc/project/getProject", {
id:id id: id
},function(data){ }, function(data) {
console.log(data); console.log(data);
if(data.code==0){ if(data.code == 0) {
$("input[name=name]").val(data.data.name); $("input[name=name]").val(data.data.name);
$("select[name=postertempletid]").val(data.data.postertempletid); $("select[name=postertempletid]").val(data.data.postertempletid);
$("input[name=lng]").val(data.data.lng); $("input[name=lng]").val(data.data.lng);
$("input[name=lat]").val(data.data.lat); $("input[name=lat]").val(data.data.lat);
map.centerAndZoom(new BMap.Point(data.data.lng,data.data.lat),13); map.centerAndZoom(new BMap.Point(data.data.lng, data.data.lat), 13);
var point = new BMap.Point(data.data.lng,data.data.lat); var point = new BMap.Point(data.data.lng, data.data.lat);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render(); form.render();
} }
}) })
}else{ } else {
$("input[name=lng]").val(113.754653); $("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333); $("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653,23.025333),13); map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653,23.025333); var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
form.on('submit(submit)', function(data) {
form.on('submit(submit)', function(data){ var name = $("input[name=name]").val();
var name=$("input[name=name]").val(); var templetid = $("select[name=postertempletid]").val();
var templetid=$("select[name=postertempletid]").val(); var lng = $("input[name=lng]").val();
var lng=$("input[name=lng]").val(); var lat = $("input[name=lat]").val();
var lat=$("input[name=lat]").val(); if(name == "") {
if(name==""){ top.layer.msg("请填写项目名称");
top.layer.msg("请填写项目名称"); return false;
return false; } else {
}else{ if(strlen(name) > 40) {
if(strlen(name) > 40) { top.layer.msg("项目名称不超过20个汉字");
top.layer.msg("项目名称不超过20个汉字");
return false;
}
}
if(templetid==""||templetid=="0"){
top.layer.msg("请选择海报");
return false; return false;
} }
}
if(id>0){ if(templetid == "" || templetid == "0") {
//修改项目 top.layer.msg("请选择海报");
$.post("/zzhnc/project/updateProject",{
id:id,
name:name,
templetid:templetid,
lng:lng,
lat:lat
},function(data){
console.log(data);
if(data.code==0){
top.layer.msg("修改成功");
} else{
top.layer.msg(data.msg);
}
})
}else{
//添加项目
$.post("/zzhnc/project/addProject",{
name:name,
templetid:templetid,
lng:lng,
lat:lat
},function(data){
console.log(data);
if(data.code==0){
top.layer.msg("添加成功");
form.render();
}else{
top.layer.msg(data.msg);
}
})
}
return false; return false;
}
});
if(id > 0) {
//修改项目
$.post("/zzhnc/project/updateProject", {
id: id,
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("修改成功");
} else {
top.layer.msg(data.msg);
}
})
} else {
//添加项目
$.post("/zzhnc/project/addProject", {
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("添加成功");
form.render();
} else {
top.layer.msg(data.msg);
}
})
}
return false;
});
}) })
</script> </script>
......
...@@ -6,33 +6,27 @@ ...@@ -6,33 +6,27 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>项目列表</title> <title>活动介绍列表</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<style> <style>
.layui-form-select dl{ .layui-form-select dl {
max-height:190px; max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 200px;
overflow: hidden;
margin: 0;
} }
#allmap {top:10px;width:100%;height: 200px;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style> </style>
<body class="wrap"> <body class="wrap">
<div class="layui-form"> <div class="layui-form">
<div class="layui-form-item searchbox" style="margin-bottom: 0px;"> <div class="layui-form-item searchbox" style="margin-bottom: 0px;">
<!-- <div class="layui-input-inline producttype" style="width: 140px;">
<select name="producttype" >
<option value="">项目名称</option>
</select>
</div>
<div class="layui-input-inline productid" style="width: 140px;">
<select name="productid">
<option value="">海报模板id</option>
</select>
</div>
<div class="layui-input-inline" style="width: 150px;">
<input name="date1" class="layui-input" placeholder="更新时间" onclick="layui.laydate({elem: this,format: 'YYYY-MM-DD hh:mm:ss',istime: true})" />
</div> -->
<div class="layui-input-inline" style="width: 140px;"> <div class="layui-input-inline" style="width: 140px;">
<input type="text" class="layui-input" name="keyword" placeholder="关键字" /> <input type="text" class="layui-input" name="keyword" placeholder="关键字" />
</div> </div>
...@@ -41,7 +35,7 @@ ...@@ -41,7 +35,7 @@
<a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加项目</a> <a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加项目</a>
</div> </div>
</div> </div>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
<tr> <tr>
...@@ -54,92 +48,84 @@ ...@@ -54,92 +48,84 @@
<th style="min-width: 80px;">操作</th> <th style="min-width: 80px;">操作</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablelist"> <tbody id="tablelist">
<!-- <tr>
<td>1</td>
<td>项目名称</td>
<td>经度</td>
<td>纬度</td>
<td>海报模板id</td>
<td>更新时间</td>
<td>
<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>
<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>
</td>
</tr> -->
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<form class="layui-form Detailbtn" > <form class="layui-form Detailbtn">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">项目名称</label> <label class="layui-form-label">项目名称</label>
<div class="layui-input-inline" style="width:390px;"> <div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="required" placeholder="项目名称" class="layui-input"> <input type="text" name="name" lay-verify="required" placeholder="项目名称" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">海报模板id</label> <label class="layui-form-label">海报模板id</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select name="postertempletid" lay-verify="required"> <select name="postertempletid" lay-verify="required">
<option value=""></option> <option value=""></option>
<option value="0">1</option> <option value="0">1</option>
<option value="1">2</option> <option value="1">2</option>
<option value="2">3</option> <option value="2">3</option>
<option value="3">4</option> <option value="3">4</option>
<option value="4">5</option> <option value="4">5</option>
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">位置</label> <label class="layui-form-label">位置</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lng" lay-verify="required" placeholder="经度" class="layui-input"> <input type="text" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div> </div>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lat" lay-verify="required" placeholder="纬度" class="layui-input"> <input type="text" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div> </div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div id="allmap"></div> <div id="allmap"></div>
</div> </div>
</form> </form>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script> <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script> <script>
// 百度地图API功能 // 百度地图API功能
var map = new BMap.Map("allmap"); var map = new BMap.Map("allmap");
map.centerAndZoom("重庆",12); map.centerAndZoom("重庆", 12);
//单击获取点击的经纬度 //单击获取点击的经纬度
map.addEventListener("click",function(e){ map.addEventListener("click", function(e) {
alert(e.point.lng + "," + e.point.lat); alert(e.point.lng + "," + e.point.lat);
}); });
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() { layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(), var form = layui.form(),
element = layui.element(), element = layui.element(),
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var page=1; var page = 1;
var keyword=""; var keyword = "";
//查询 //查询
form.on('submit(querybtn)', function(data){ form.on('submit(querybtn)', function(data) {
var keyword=$("input[name=keyword]").val(); var keyword = $("input[name=keyword]").val();
Initdata(page,keyword) Initdata(page, keyword)
}); });
$(".resetBtn").on("click",function(){ $(".resetBtn").on("click", function() {
$("input[name=keyword]").val(""); $("input[name=keyword]").val("");
Initdata(page,keyword) Initdata(page, keyword)
}) })
//初始化数据 //初始化数据
Initdata(page,keyword); Initdata(page, keyword);
function Initdata(page,keyword){
function Initdata(page, keyword) {
$.post("/zzhnc/project/getProjectList",{page:page,keyword:keyword},function(data){
data=data.data; $.post("/zzhnc/project/getProjectList", {
page: page,
keyword: keyword
}, function(data) {
data = data.data;
console.log(data) console.log(data)
laypage({ laypage({
cont: 'page', cont: 'page',
...@@ -149,85 +135,85 @@ ...@@ -149,85 +135,85 @@
jump: function(obj, first) { jump: function(obj, first) {
if(!first) { if(!first) {
page = obj.curr page = obj.curr
Initdata(page,keyword); Initdata(page, keyword);
} }
} }
}); });
var str=""; var str = "";
if(data.rows.length<1){ if(data.rows.length < 1) {
$(".nulldata").show(); $(".nulldata").show();
}else{ } else {
$(".nulldata").hide(); $(".nulldata").hide();
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ data.rows[i].name+'</td>' '<td style="text-align:left;">' + data.rows[i].name + '</td>' +
+'<td>'+ data.rows[i].lng+'</td>' '<td>' + data.rows[i].lng + '</td>' +
+'<td>'+ data.rows[i].lat+'</td>' '<td>' + data.rows[i].lat + '</td>' +
+'<td>'+ data.rows[i].postertempletid+'</td>' '<td>' + data.rows[i].postertempletid + '</td>' +
+'<td>'+ toTime_G(data.rows[i].updatedtime) +'</td>' '<td>' + toTime_G(data.rows[i].updatedtime) + '</td>' +
+'<td>' '<td>' +
+'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' '<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' +
+'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' '<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' +
+'</td>' '</td>' +
+'</tr>'; '</tr>';
} }
} }
$("#tablelist").html(str); $("#tablelist").html(str);
toNull_G(); toNull_G();
}) })
} }
//添加项目 //添加项目
$(document).on("click",".createBtn",function(){ $(document).on("click", ".createBtn", function() {
if(parent.tab.exists("添加项目")>0){ if(parent.tab.exists("添加项目") > 0) {
var tabid=parent.tab.getTabId("添加项目"); var tabid = parent.tab.getTabId("添加项目");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id=0", href: "/zzhnc/project/projectEdit?id=0",
icon: "fa-cubes", icon: "fa-cubes",
title: "添加项目" title: "添加项目"
}); });
}) })
//修改项目 //修改项目
$(document).on("click",".updataBtn",function(){ $(document).on("click", ".updataBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
if(parent.tab.exists("修改项目")>0){ if(parent.tab.exists("修改项目") > 0) {
var tabid=parent.tab.getTabId("修改项目"); var tabid = parent.tab.getTabId("修改项目");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id="+ id , href: "/zzhnc/project/projectEdit?id=" + id,
icon: "fa-cubes", icon: "fa-cubes",
title: "修改项目" title: "修改项目"
}); });
}) })
//删除项目 //删除项目
$(document).on("click", ".deleteBtn", function() { $(document).on("click", ".deleteBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
layer.confirm('您确定要删除该项目吗?', { layer.confirm('您确定要删除该项目吗?', {
btn: ['确定', '取消'] //按钮 btn: ['确定', '取消'] //按钮
}, function(index, layero) { }, function(index, layero) {
$.post( "/zzhnc/project/deleteProject",{id:id}, function(data) { $.post("/zzhnc/project/deleteProject", {
id: id
}, function(data) {
console.log(data) console.log(data)
if(data.code == 0) { if(data.code == 0) {
top.layer.msg("删除成功"); top.layer.msg("删除成功");
Initdata(1,keyword) Initdata(1, keyword)
layer.close(index); layer.close(index);
}else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
}, function(index, layero) { }, function(index, layero) {
layer.close(index); layer.close(index);
}); });
}); });
}) })
</script> </script>
......
...@@ -6,33 +6,22 @@ ...@@ -6,33 +6,22 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>销售人员</title> <title>自动回复</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/Layuiglobal.css"> <link rel="stylesheet" href="/zzhnc/res/css/Layuiglobal.css">
<link rel="stylesheet" href="/zzhnc/res/plugins/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_191348_aee57zbh6jyk3xr.css"> <link rel="stylesheet" href="http://at.alicdn.com/t/font_191348_aee57zbh6jyk3xr.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<body class="wrap"> <body class="wrap">
<div class="layui-form"> <div class="layui-form">
<div class="layui-form-item searchbox" style="margin-bottom: 0px;"> <div class="layui-form-item searchbox" style="margin-bottom: 0px;">
<div class="layui-input-inline" style="width: 140px;"> <div class="layui-input-inline" style="width: 200px;">
<select name="projectId" class="productid1" lay-search="">
<option value="">项目名称</option>
</select>
</div>
<div class="layui-input-inline" style="width: 140px;">
<select name="isRedirectStaff">
<option value="">是否转人工客服</option>
<option value="0"></option>
<option value="1"></option>
</select>
</div>
<div class="layui-input-inline" style="width: 140px;">
<input type="text" class="layui-input" name="keyword" placeholder="关键字" /> <input type="text" class="layui-input" name="keyword" placeholder="关键字" />
</div> </div>
<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button> <button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
<button class="layui-btn layui-btn-primary resetBtn" >重置</button> <button class="layui-btn layui-btn-primary resetBtn">重置</button>
<a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加关键字</a> <a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加关键字</a>
<a class="layui-btn publicBtn" href="#"><i class="layui-icon">&#xe609;</i> 发布</a> <a class="layui-btn publicBtn" href="#"><i class="layui-icon">&#xe609;</i> 发布</a>
</div> </div>
...@@ -42,144 +31,127 @@ ...@@ -42,144 +31,127 @@
<tr> <tr>
<th style="width: 30px;">No</th> <th style="width: 30px;">No</th>
<th style="min-width:120px;">关键字</th> <th style="min-width:120px;">关键字</th>
<th style="min-width:120px;">项目名称</th>
<th style="min-width:100px;">是否转人工客服</th>
<th style="min-width:140px;">回复内容</th> <th style="min-width:140px;">回复内容</th>
<th style="min-width:120px;">优先级</th>
<th style="min-width:80px;">操作</th> <th style="min-width:80px;">操作</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablelist"> <tbody id="tablelist">
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<div class="popupbox" style="display:none;"> <div class="popupbox" style="display:none;">
<div class="popupbos"> <div class="popupbos">
<div class="layui-form"> <div class="layui-form">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>关键词:</label> <label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>关键词:</label>
<div class="layui-input-inline" style="width:250px;"> <div class="layui-input-inline" style="width:250px;">
<input type="text" name="keywords" lay-verify="required" placeholder="关键词" autocomplete="off" id="text1" class="layui-input" value=""> <input type="text" name="keywords" lay-verify="required" placeholder="关键词" autocomplete="off" id="text1" class="layui-input" value="">
</div>
<div class="layui-form-mid layui-word-aux">多个关键词请用英文“ | ”分隔</div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-mid layui-word-aux">多个关键词请用英文“ | ”分隔</div>
<label class="layui-form-label">项目名称</label> </div>
<div class="layui-input-inline" style="width:250px;"> <div class="layui-form-item layui-form-text Redirectbox">
<select name="projectId1" lay-verify="required" class="projectid2" lay-search=""> <label for="" class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>回复内容:</label>
<option value="">项目名称</option> <div class="layui-input-inline" style="width:65%;">
</select> <textarea class="layui-textarea" name="content" lay-verify="required" id="saytext" placeholder="请输入内容" style="height:100px;"></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>是否转人工客服:</label>
<div class="layui-input-inline">
<input type="radio" name="isRedirectStaff" lay-filter="isRedirectStaff" value="0" title="否" checked="ture">
<input type="radio" name="isRedirectStaff" lay-filter="isRedirectStaff" value="1" title="是" >
</div>
</div>
<div class="layui-form-item layui-form-text Redirectbox">
<label for="" class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>回复内容:</label>
<div class="layui-input-inline" style="width:65%;">
<textarea class="layui-textarea" name="content" lay-verify="required" id="saytext" placeholder="请输入内容" style="height:100px;" ></textarea>
<!-- <i class="iconfont icon-xiaolian emotion"></i><div class="layui-form-mid layui-word-aux" style="padding-top:10px;line-height:28px;">多条回复内容用“ | ”分隔</div> -->
</div>
<div class="layui-form-mid layui-word-aux " style="margin-left:150px;">注: 活动结束或过期后会自动停止推送</div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-mid layui-word-aux " style="margin-left:150px;">注: 活动结束或过期后会自动停止推送</div>
<label class="layui-form-label">优先级</label>
<div class="layui-input-inline" style="width:250px;">
<input class="layui-input" type="number" name="sort" value="1" min="1" max="5" />
</div>
<div class="layui-form-mid layui-word-aux " style="margin-left:150px;">注: 优先级从1到5,依次递减,即1优先级最高。</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script type="text/javascript" src="/zzhnc/res/js/jquery.qqFace.js"></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script src="/zzhnc/res/js/me.js"></script> <script src="/zzhnc/res/js/me.js"></script>
<script> <script>
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() { layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(), var form = layui.form(),
element = layui.element(), element = layui.element(),
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
//下拉项目 //查询条件
$.post("/zzhnc/project/getAllProjects",function(data){
console.log(data);
var str='<option value="0">全部</option>';
for(var i=0;i<data.data.length;i++){
str+='<option value='+ data.data[i].id +'>'+ data.data[i].name +'</option>';
}
$("select[name=projectId]").append(str);
form.render();
})
$.post("/zzhnc/project/getAllProjects",function(data){
console.log(data);
var str='<option value="0">全部</option>';
for(var i=0;i<data.data.length;i++){
str+='<option value='+ data.data[i].id +'>'+ data.data[i].name +'</option>';
}
$("select[name=projectId1]").append(str);
form.render();
})
var queryObj = { var queryObj = {
page: 1, page: 1,
projectId: "", projectId: "",
keyword: null, keyword: null,
isRedirectStaff: null isRedirectStaff: null
} //查询条件 }
//查询
form.on('submit(querybtn)', function(data){ //查询操作
queryObj=data.field; form.on('submit(querybtn)', function(data) {
queryObj.page=1; queryObj = data.field;
initdata(queryObj); queryObj.page = 1;
form.render(); initdata(queryObj);
}); form.render();
$(".resetBtn").on("click",function(){ });
//重置操作
$(".resetBtn").on("click", function() {
$("input[name=keyword]").val(""); $("input[name=keyword]").val("");
$("select[name=isRedirectStaff]").val("");
$("select[name=projectId]").val("");
form.render(); form.render();
queryObj.keyword = null; queryObj.keyword = null;
queryObj.isRedirectStaff = null; queryObj.isRedirectStaff = null;
queryObj.projectId = null, queryObj.projectId = null,
initdata(queryObj); initdata(queryObj);
}) })
//发布动作
$(".publicBtn").on("click", function(){ //发布操作
$.get("/zzhnc/autoreply/publish", function(data){ $(".publicBtn").on("click", function() {
$.get("/zzhnc/autoreply/publish", function(data) {
var data = JSON.parse(data) var data = JSON.parse(data)
if(data.code == 0){ if(data.code == 0) {
top.layer.msg("发布成功!"); top.layer.msg("发布成功!");
}else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
}) })
$(".publicBtn").on("mouseenter", function(){
//发布按钮提示信息
$(".publicBtn").on("mouseenter", function() {
layer.tips('添加或修改完关键字后,需要进行发布,以使新添加或修改的关键字生效。', ".publicBtn", { layer.tips('添加或修改完关键字后,需要进行发布,以使新添加或修改的关键字生效。', ".publicBtn", {
tips: [1, '#3595CC'], tips: [1, '#3595CC'],
time: 4000 time: 4000
}); });
}) })
//初始化数据 //初始化数据
initdata(queryObj); initdata(queryObj);
function initdata(queryObj){
$.post("/zzhnc/autoreply/getAutoreplyList",queryObj,function(data){ //页面初始化
data=data.data; function initdata(queryObj) {
$.post("/zzhnc/autoreply/getAutoreplyList", queryObj, function(data) {
data = data.data;
console.log(data) console.log(data)
laypage({
var str = "";
if(data.rows.length < 1) {
$(".nulldata").show();
} else {
$(".nulldata").hide();
for(var i = 0; i < data.rows.length; i++) {
str += '<tr data-id=' + data.rows[i].id + '>' +
'<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
'<td style="text-align:left;">' + data.rows[i].keywords + '</td>' +
'<td style="text-align:left;">' + data.rows[i].contents + '</td>' +
'<td>' +
'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' +
'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' +
'</td>' +
'</tr>';
}
}
$("#tablelist").html(str);
laypage({
cont: 'page', cont: 'page',
pages: data.totalPages, //总页数 pages: data.totalPages,
curr: queryObj.page, curr: queryObj.page,
skip: true, skip: true,
jump: function(obj, first) { jump: function(obj, first) {
...@@ -189,253 +161,135 @@ ...@@ -189,253 +161,135 @@
} }
} }
}); });
var str="";
if(data.rows.length<1){
$(".nulldata").show();
}else{
$(".nulldata").hide();
for(var i=0;i<data.rows.length;i++){
str+='<tr data-id='+ data.rows[i].id +'>'
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>'
+'<td style="text-align:left;">'+ data.rows[i].keywords+'</td>'
+'<td style="text-align:left;">'+ data.rows[i].projectName+'</td>'
+'<td>'+ autoreply(data.rows[i].isredirectstaff) +'</td>'
+'<td style="text-align:left;">'+ data.rows[i].contents +'</td>'
+'<td>'+ data.rows[i].sort +'</td>'
+'<td>'
+'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>'
+'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>'
+'</td>'
+'</tr>';
}
}
$("#tablelist").html(str);
}) })
} }
//添加关键字 //添加关键字
$(document).on("click",".createBtn",function(){ $(document).on("click", ".createBtn", function() {
layer.open({ layer.open({
type:1, type: 1,
title:'添加关键字', title: '添加关键字',
area:["650px","450px"], area: ["650px", "450px"],
content:$(".popupbox"), content: $(".popupbox"),
btnAlign:"c", btnAlign: "c",
btn:["提交","取消"], btn: ["提交", "取消"],
scrollbar: false, scrollbar: false,
yes:function(index,layero){ yes: function(index, layero) {
var keywords=$("input[name=keywords]").val(); var keywords = $("input[name=keywords]").val();
var projectId=$("select[name=projectId1]").val(); if(keywords == "") {
var projectName=$("select[name=projectId1] option[value='"+ projectId +"']").text();
var isRedirectStaff=$("input[name=isRedirectStaff]:checked").val();
var sort=$("input[name=sort]").val();
if(keywords==""){
top.layer.msg("请填写关键词"); top.layer.msg("请填写关键词");
return false; return false;
} }
if(isRedirectStaff=="0"){ var content = $("textarea[name=content]").val();
isRedirectStaff=false; if(content == "") {
}else if(isRedirectStaff=="1"){
isRedirectStaff=true;
}
var content=$("textarea[name=content]").val();
if(content==""){
top.layer.msg("请填写回复内容"); top.layer.msg("请填写回复内容");
return false; return false;
} }
$.post("/zzhnc/autoreply/addAutoreply",{ $.post("/zzhnc/autoreply/addAutoreply", {
keywords:keywords, keywords: keywords,
projectId: projectId, content: content
projectName: projectName, }, function(data) {
isRedirectStaff:isRedirectStaff, if(data.code == 0) {
content:content,
sort:sort
},function(data){
if(data.code==0){
top.layer.msg("添加成功"); top.layer.msg("添加成功");
layer.close(index); layer.close(index);
queryObj.page=1; queryObj.page = 1;
initdata(queryObj); initdata(queryObj);
} }
}); });
form.render(); form.render();
}, },
btn2:function(index,layero){ btn2: function(index, layero) {
layer.close(index); layer.close(index);
}, },
cancel: function(index,layero){ cancel: function(index, layero) {
layer.close(index); layer.close(index);
} }
}) })
}) })
//修改关键字 //修改关键字
$(document).on("click",".updataBtn",function(){ $(document).on("click", ".updataBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
$.post("/zzhnc/autoreply/getAutoReply",{id:id},function(data){
console.log(data)
$("input[name=keywords]").val(data.data.keywords);
$("select[name=projectId1]").val(data.data.projectId);
if(data.data.isredirectstaff==true){
$("input[name=isRedirectStaff]").eq(1).attr("checked",true);
}else{
$("input[name=isRedirectStaff]").eq(0).attr("checked",true);
}
$("textarea[name=content]").val(data.data.contents);
$("input[name=sort]").val(data.data.sort);
form.render();
})
layer.open({ layer.open({
type:1, type: 1,
title:'修改关键字', title: '修改关键字',
area:["650px","450px"], area: ["650px", "450px"],
content:$(".popupbox"), content: $(".popupbox"),
btnAlign:"c", btnAlign: "c",
btn:["提交","取消"], btn: ["提交", "取消"],
scrollbar: false, scrollbar: false,
yes:function(index,layero){ yes: function(index, layero) {
var keywords=$("input[name=keywords]").val(); var keywords = $("input[name=keywords]").val();
var projectId=$("select[name=projectId1]").val(); if(keywords == "") {
var projectName=$("select[name=projectId1] option[value='"+ projectId +"']").text();
var isRedirectStaff=$("input[name=isRedirectStaff]:checked").val();
var sort=$("input[name=sort]").val();
if(keywords==""){
top.layer.msg("请填写关键词"); top.layer.msg("请填写关键词");
return false; return false;
} }
if(isRedirectStaff=="0"){ var content = $("textarea[name=content]").val();
isRedirectStaff=false; if(content == "") {
}else if(isRedirectStaff=="1"){
isRedirectStaff=true;
}
var content=$("textarea[name=content]").val();
if(content==""){
top.layer.msg("请填写回复内容"); top.layer.msg("请填写回复内容");
return false; return false;
} }
$.post("/zzhnc/autoreply/updateAutoreply",{ $.post("/zzhnc/autoreply/updateAutoreply", {
id:id, id: id,
keywords:keywords, keywords: keywords,
projectId: projectId, content: content
projectName: projectName, }, function(data) {
isRedirectStaff:isRedirectStaff, if(data.code == 0) {
content:content,
sort: sort
},function(data){
if(data.code==0){
top.layer.msg("修改成功"); top.layer.msg("修改成功");
layer.close(index); layer.close(index);
queryObj.page=1; queryObj.page = 1;
initdata(queryObj); initdata(queryObj);
} }
}); });
form.render(); form.render();
}, },
btn2:function(index,layero){ btn2: function(index, layero) {
layer.close(index); layer.close(index);
}, },
cancel: function(index,layero){ cancel: function(index, layero) {
layer.close(index);
}
})
})
//删除项目
$(document).on("click", ".deleteBtn", function() {
var id=$(this).parents("tr").attr("data-id");
layer.confirm('您确定要删除该关键字吗?', {
btn: ['确定', '取消'] //按钮
}, function(index, layero) {
$.post( "/zzhnc/autoreply/deleteAutoreply",{id:id}, function(data) {
console.log(data)
if(data.code == 0) {
top.layer.msg("删除成功");
queryObj.page=1;
initdata(queryObj)
layer.close(index); layer.close(index);
}else{ },
top.layer.msg(data.msg); success: function(){
//获取当前需修改的关键字信息
$.post("/zzhnc/autoreply/getAutoReply", {
id: id
}, function(data) {
console.log(data)
$("input[name=keywords]").val(data.data.keywords);
$("textarea[name=content]").val(data.data.contents);
form.render();
})
} }
}) })
}, function(index, layero) {
layer.close(index);
});
});
form.render() ;
//显示自动回复信息
function getReplyInfo() {
$.post( "http", {
data:data
}, function(data) {
if(data.data!== null) {
console.log(data)
$('textarea[name=attention]').html(replace_em(data.data.content));
}
}) })
}
//获取自动回复类型 //删除项目
function getMenuType() { $(document).on("click", ".deleteBtn", function() {
var value = ""; var id = $(this).parents("tr").attr("data-id");
var radio = $("input[name=isRedirectStaff]"); layer.confirm('您确定要删除该关键字吗?', {
for(var i = 0; i < radio.length; i++) { btn: ['确定', '取消']
if(radio[i].checked == true) { }, function(index, layero) {
value = radio[i].value; $.post("/zzhnc/autoreply/deleteAutoreply", {
break; id: id
} }, function(data) {
} console.log(data)
return value; if(data.code == 0) {
} top.layer.msg("删除成功");
queryObj.page = 1;
initdata(queryObj)
/*是否转人工客服切换*/ layer.close(index);
/*form.on('radio(isRedirectStaff)', function(data) { } else {
if(this.value == 1) { top.layer.msg(data.msg);
$('.Redirectbox').hide(); }
} else { })
$('.Redirectbox').show(); }, function(index, layero) {
} layer.close(index);
});*/ });
});
//切换自动回复类型 })
/*form.on('radio(keytype)', function(data) {
if(this.value == 1) {
$('.Redirectbox').hide();
$('radio(isRedirectStaff)').attr("checked",true);
form.render();
} else {
$('.Redirectbox').show();
$('radio(isRedirectStaff)').attr("checked",false);
form.render();
}
});*/
})
function autoreply(v){
if(v!==null&&v!==""){
if(v==true){
return "是";
}else{
return "否";
}
}else{
return "";
}
}
$(function(){
$('.emotion').qqFace({
id : 'facebox',
assign:'saytext',
path:'/zzhnc/res/arclist/' //表情存放的路径
});
});
</script> </script>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -2,300 +2,305 @@ ...@@ -2,300 +2,305 @@
pageEncoding="UTF-8"%> pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>项目列表</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css">
<head>
<style type="text/css"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
.activity-rule-box { <meta http-equiv="X-UA-Compatible" content="ie=edge">
padding-left:20px; <title>商品编辑</title>
} <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
#myEditor img{ <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
width:80%; <style type="text/css">
} .activity-rule-box {
#myEditor{ padding-left: 20px;
margin:0 !important; }
}
#myEditor img {
.layui-form-select dl { width: 80%;
max-height: 190px; }
}
#myEditor {
#allmap { margin: 0 !important;
top: 10px; }
width: 100%;
height: 400px; .layui-form-select dl {
overflow: hidden; max-height: 190px;
margin: 0; }
font-family: "微软雅黑";
} #allmap {
.layui-upload-list{ top: 10px;
width:200px; width: 100%;
max-height:200px; height: 400px;
overflow:hidden; overflow: hidden;
clear:both; margin: 0;
border-radius:4px; }
}
.layui-upload-list img{ .layui-upload-list {
width:100%; width: 200px;
margin-top:15px; max-height: 200px;
} overflow: hidden;
clear: both;
#connect-container { border-radius: 4px;
float: left; }
width: 400px
} .layui-upload-list img {
width: 100%;
#connect-container div { margin-top: 15px;
padding: 5px; }
}
#connect-container {
#console-container { float: left;
float: left; width: 400px
margin-left: 15px; }
width: 400px;
} #connect-container div {
padding: 5px;
}
#console-container {
float: left;
margin-left: 15px;
width: 400px;
}
#console {
border: 1px solid #CCCCCC;
border-right-color: #999999;
border-bottom-color: #999999;
height: 170px;
overflow-y: scroll;
padding: 5px;
width: 100%;
}
#console p {
padding: 0;
margin: 0;
}
#container * {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
#container *:before,
.edui-container *:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
#container img {
max-width: 80%;
}
</style>
<script src="http://cdn.sockjs.org/sockjs-0.3.min.js"></script>
<body class="wrap">
<div class="layui-form Detailbtn" style="display: block;">
<form action="server.php" method="post">
<div class="layui-form-item">
<label class="layui-form-label"><i
style="color: red; margin-right: 5px;">*</i>商品主标题</label>
<div class="layui-input-inline" style="width: 390px;">
<input type="text" name="title" lay-verify="title" placeholder="商品主标题" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i
style="color: red; margin-right: 5px;">*</i>商品副标题</label>
<div class="layui-input-inline" style="width: 390px;">
<input type="text" name="subtitle" lay-verify="title" placeholder="商品副标题" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i
style="color: red; margin-right: 5px;">*</i>商品主图</label>
#console { <div class="layui-input-inline" style="width: 390px;">
border: 1px solid #CCCCCC; <div class="layui-upload">
border-right-color: #999999; <button type="button" class="layui-btn" id="upload" style="margin:0 20px 0 0;float:left;">上传商品主图</button>
border-bottom-color: #999999; <span class="layui-form-mid layui-word-aux">建议尺寸:200*200</span>
height: 170px; <div class="layui-upload-list">
overflow-y: scroll; <img class="layui-upload-img mainpictrue" src="">
padding: 5px; <input type="text" style="display:none;" name="imgurl">
width: 100%; <p id="demoText"></p>
} </div>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
#console p { <div class="layui-form-item">
padding: 0; <label class="layui-form-label"><i
margin: 0; style="color: red; margin-right: 5px;">*</i>详细信息</label>
} <div class="layui-input-block">
<!-- 加载编辑器的容器 -->
<script id="container" name="content" type="text/plain">
这里写你的初始化内容
</script>
#container *{-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;} </div>
#container *:before,.edui-container *:after {-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;} </div>
#container img{
max-width:80%;
}
</style>
<script src="http://cdn.sockjs.org/sockjs-0.3.min.js"></script>
<body class="wrap">
<div class="layui-form Detailbtn" style="display: block;"> <div class="layui-form-item" style="margin-top: 30px;">
<form action="server.php" method="post"> <button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<div class="layui-form-item"> <button class="layui-btn layui-btn-primary resetBtn">重置</button>
<label class="layui-form-label"><i </div>
style="color: red; margin-right: 5px;">*</i>文章标题</label> </form>
<div class="layui-input-inline" style="width: 390px;">
<input type="text" name="title" lay-verify="title" placeholder="文章标题"
class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i
style="color: red; margin-right: 5px;">*</i>上传主图</label>
<div class="layui-input-inline" style="width: 390px;">
<div class="layui-upload">
<button type="button" class="layui-btn" id="upload" style="margin:0 20px 0 0;float:left;">上传主图</button>
<span class="layui-form-mid layui-word-aux">建议尺寸:200*200</span>
<div class="layui-upload-list">
<img class="layui-upload-img mainpictrue" src="" >
<input type="text" style="display:none;" name="imgurl" >
<p id="demoText"></p>
</div>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i
style="color: red; margin-right: 5px;">*</i>内容</label>
<div class="layui-input-block">
<!-- 加载编辑器的容器 -->
<script id="container" name="content" type="text/plain">
这里写你的初始化内容
</script>
</div> </div>
</div>
</body>
<div class="layui-form-item" style="margin-top: 30px;"> <script src='/zzhnc/res/js/jquery.min.js'></script>
<button class="layui-btn" lay-submit lay-filter="submit">提交</button> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<button class="layui-btn layui-btn-primary resetBtn">重置</button> <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
</div> <script>
</form> window.onload = function() {
</div> UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action) {
if(action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
return '/zzhnc/upload/NewUploadImg';
} else {
return this._bkGetActionUrl.call(this, action);
}
}
window.UEDITOR_CONFIG.initialFrameWidth = 900;
window.UEDITOR_CONFIG.initialFrameHeight = 600;
//UE.getEditor("container");
var ue = UE.getEditor('container', {
autoHeight: false
});
}
layui.use(['form', 'element', 'laydate', 'layer', 'laypage', 'layedit', 'upload'], function() {
var form = layui.form(),
element = layui.element(),
laydate = layui.laydate,
layer = layui.layer,
laypage = layui.laypage;
var $ = layui.jquery,
upload = layui.upload;
//普通图片上传
//普通图片上传
var uploadInst = upload.render({
elem: '#upload',
url: '/zzhnc/upload/UploadImg',
done: function(data) {
console.log(data)
if(data.code == 0) {
imgurl = data.data;
$("input[name=imgurl]").val(imgurl);
$(".mainpictrue").attr("src", imgurl);
</body> }
<script src='/zzhnc/res/js/jquery.min.js'></script> //如果上传失败
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> if(data.code > 0) {
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script> return layer.msg('上传失败');
<script> }
//上传成功
}
window.onload = function(){ });
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action) {
if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
return '/zzhnc/upload/NewUploadImg';
} else {
return this._bkGetActionUrl.call(this, action);
}
}
window.UEDITOR_CONFIG.initialFrameWidth = 900;
window.UEDITOR_CONFIG.initialFrameHeight = 600;
//UE.getEditor("container");
var ue = UE.getEditor('container', {
autoHeight: false
});
}
layui.use(['form', 'element', 'laydate', 'layer', 'laypage','layedit','upload'], function() { $(".resetBtn").on("click", function() {
var form = layui.form(), $("input[name=title]").val("");
element = layui.element(), $("textarea[name=content]").val("");
laydate = layui.laydate, $("input[name=imgurl]").val("");
layer = layui.layer, $(".mainpictrue").attr("src", "");
laypage = layui.laypage; form.render();
var $ = layui.jquery
,upload = layui.upload;
//普通图片上传
//普通图片上传
var uploadInst = upload.render({
elem: '#upload'
,url: '/zzhnc/upload/UploadImg'
,done: function(data){
console.log(data)
if(data.code==0){
imgurl=data.data;
$("input[name=imgurl]").val(imgurl);
$(".mainpictrue").attr("src",imgurl);
}
//如果上传失败
if(data.code > 0){
return layer.msg('上传失败');
}
//上传成功
}
});
$(".resetBtn").on("click",function(){
$("input[name=title]").val("");
$("textarea[name=content]").val("");
$("input[name=imgurl]").val("");
$(".mainpictrue").attr("src","");
form.render();
})
var id=getUrl_G("id");
if(id>0){
$.post("/zzhnc/article/getArticle",{
id:id
},function(data){
console.log(data);
if(data.code==0){
$("input[name=title]").val(data.data.title);
//$("textarea[name=content]").val(data.data.content);
//重新渲染
UE.getEditor("container").ready(function () {
UE.getEditor("container").setContent(unescape(data.data.content));
})
$("input[name=imgurl]").attr("src",data.data.imgurl);
$(".mainpictrue").attr("src",data.data.imgurl);
form.render();
}
}) })
var id = getUrl_G("id");
} if(id > 0) {
$.post("/zzhnc/article/getArticle", {
id: id
form.on('submit(submit)', function(data){ }, function(data) {
var title=$("input[name=title]").val(); console.log(data);
var content = UE.getEditor('container').getContent(); if(data.code == 0) {
var imgurl=$("input[name=imgurl]").val(); $("input[name=title]").val(data.data.title);
if(title==""){ //$("textarea[name=content]").val(data.data.content);
//重新渲染
UE.getEditor("container").ready(function() {
UE.getEditor("container").setContent(unescape(data.data.content));
})
$("input[name=imgurl]").attr("src", data.data.imgurl);
$(".mainpictrue").attr("src", data.data.imgurl);
form.render();
}
})
}
form.on('submit(submit)', function(data) {
var title = $("input[name=title]").val();
var content = UE.getEditor('container').getContent();
var imgurl = $("input[name=imgurl]").val();
if(title == "") {
top.layer.msg("请填写文章标题"); top.layer.msg("请填写文章标题");
return false; return false;
}else{ } else {
if(strlen(title) > 40) { if(strlen(title) > 40) {
top.layer.msg("文章标题不超过20个汉字"); top.layer.msg("文章标题不超过20个汉字");
return false; return false;
} }
} }
if(imgurl==""){ if(imgurl == "") {
top.layer.msg("请上传主图"); top.layer.msg("请上传主图");
return false; return false;
} }
if(content==""){ if(content == "") {
top.layer.msg("请输入内容"); top.layer.msg("请输入内容");
return false; return false;
} }
console.log() console.log()
if(id>0){ if(id > 0) {
//修改项目 //修改项目
$.post("/zzhnc/article/updateArticle",{ $.post("/zzhnc/article/updateArticle", {
id:id, id: id,
title:title, title: title,
content:content, content: content,
imgurl:imgurl imgurl: imgurl
},function(data){ }, function(data) {
console.log(data); console.log(data);
if(data.code==0){ if(data.code == 0) {
top.layer.msg("修改成功"); top.layer.msg("修改成功");
} else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
}else{ } else {
//添加项目 //添加项目
$.post("/zzhnc/article/addArticle",{ $.post("/zzhnc/article/addArticle", {
title:title, title: title,
content:content, content: content,
imgurl:imgurl imgurl: imgurl
},function(data){ }, function(data) {
console.log(data); console.log(data);
if(data.code==0){ if(data.code == 0) {
top.layer.msg("添加成功"); top.layer.msg("添加成功");
form.render(); form.render();
}else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
} }
return false; return false;
});
}) });
</script>
<!-- 配置文件 --> })
<script type="text/javascript" src="/zzhnc/res/UE/ueditor.config.js"></script> </script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/zzhnc/res/UE/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<!-- 配置文件 -->
<script type="text/javascript" src="/zzhnc/res/UE/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/zzhnc/res/UE/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -6,16 +6,24 @@ ...@@ -6,16 +6,24 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>文章列表</title> <title>商品列表</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<style> <style>
.layui-form-select dl{ .layui-form-select dl {
max-height:190px; max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 200px;
overflow: hidden;
margin: 0;
} }
#allmap {top:10px;width:100%;height: 200px;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style> </style>
<body class="wrap"> <body class="wrap">
<div class="layui-form"> <div class="layui-form">
<div class="layui-form-item searchbox" style="margin-bottom: 0px;"> <div class="layui-form-item searchbox" style="margin-bottom: 0px;">
...@@ -27,7 +35,7 @@ ...@@ -27,7 +35,7 @@
<a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加文章</a> <a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加文章</a>
</div> </div>
</div> </div>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
<tr> <tr>
...@@ -38,13 +46,13 @@ ...@@ -38,13 +46,13 @@
<th style="min-width: 80px;">操作</th> <th style="min-width: 80px;">操作</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablelist"> <tbody id="tablelist">
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
...@@ -57,39 +65,38 @@ ...@@ -57,39 +65,38 @@
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var queryObj={ var queryObj = {
page : 1, page: 1,
pagesize:10, pagesize: 10,
keyword:'' keyword: ''
};
initdata(queryObj);
//查询
form.on('submit(querybtn)', function(data) {
queryObj.keyword = $("[name=keyword]").val();
queryObj.page = 1;
initdata(queryObj)
});
$(".resetBtn").on("click", function() {
$("[name=keyword]").val("")
queryObj = {
page: 1,
pagesize: 10,
keyword: ""
}; };
initdata(queryObj)
initdata(queryObj); return false
})
//查询
form.on('submit(querybtn)', function(data){
queryObj.keyword=$("[name=keyword]").val();
queryObj.page=1;
initdata(queryObj)
});
$(".resetBtn").on("click",function(){
$("[name=keyword]").val("")
queryObj={
page : 1,
pagesize:10,
keyword : ""
};
initdata(queryObj)
return false
})
//初始化数据 //初始化数据
initdata(queryObj); initdata(queryObj);
function initdata(queryObj){
function initdata(queryObj) {
$.post("/zzhnc/article/getArticlesList",queryObj,function(data){
data=data.data; $.post("/zzhnc/article/getArticlesList", queryObj, function(data) {
data = data.data;
console.log(data) console.log(data)
laypage({ laypage({
cont: 'page', cont: 'page',
...@@ -104,78 +111,78 @@ ...@@ -104,78 +111,78 @@
} }
}); });
var str=""; var str = "";
if(data.rows.length<1){ if(data.rows.length < 1) {
$(".nulldata").show(); $(".nulldata").show();
}else{ } else {
$(".nulldata").hide(); $(".nulldata").hide();
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ data.rows[i].title+'</td>' '<td style="text-align:left;">' + data.rows[i].title + '</td>' +
+'<td>'+ data.rows[i].imgurl+'</td>' '<td>' + data.rows[i].imgurl + '</td>' +
+'<td>'+ toTime_G(data.rows[i].createdtime) +'</td>' '<td>' + toTime_G(data.rows[i].createdtime) + '</td>' +
+'<td>' '<td>' +
+'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' '<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' +
+'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' '<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' +
+'</td>' '</td>' +
+'</tr>'; '</tr>';
} }
} }
$("#tablelist").html(str); $("#tablelist").html(str);
toNull_G(); toNull_G();
}) })
} }
//添加文章 //添加文章
$(document).on("click",".createBtn",function(){ $(document).on("click", ".createBtn", function() {
if(parent.tab.exists("添加文章")>0){ if(parent.tab.exists("添加文章") > 0) {
var tabid=parent.tab.getTabId("添加文章"); var tabid = parent.tab.getTabId("添加文章");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/article/articleEdit", href: "/zzhnc/article/articleEdit",
icon: "fa-cubes", icon: "fa-cubes",
title: "添加文章" title: "添加文章"
}); });
}) })
//修改文章 //修改文章
$(document).on("click",".updataBtn",function(){ $(document).on("click", ".updataBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
if(parent.tab.exists("修改文章")>0){ if(parent.tab.exists("修改文章") > 0) {
var tabid=parent.tab.getTabId("修改文章"); var tabid = parent.tab.getTabId("修改文章");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/article/articleEdit?id="+ id , href: "/zzhnc/article/articleEdit?id=" + id,
icon: "fa-cubes", icon: "fa-cubes",
title: "修改文章" title: "修改文章"
}); });
}) })
//删除文章 //删除文章
$(document).on("click", ".deleteBtn", function() { $(document).on("click", ".deleteBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
layer.confirm('您确定要删除该文章吗?', { layer.confirm('您确定要删除该文章吗?', {
btn: ['确定', '取消'] //按钮 btn: ['确定', '取消'] //按钮
}, function(index, layero) { }, function(index, layero) {
$.post( "/zzhnc/article/deleteArticle",{id:id}, function(data) { $.post("/zzhnc/article/deleteArticle", {
id: id
}, function(data) {
console.log(data) console.log(data)
if(data.code == 0) { if(data.code == 0) {
top.layer.msg("删除成功"); top.layer.msg("删除成功");
initdata(queryObj); initdata(queryObj);
layer.close(index); layer.close(index);
}else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
}, function(index, layero) { }, function(index, layero) {
layer.close(index); layer.close(index);
}); });
}); });
}) })
</script> </script>
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/Layuiglobal.css"> <link rel="stylesheet" href="/zzhnc/res/css/Layuiglobal.css">
<link rel="stylesheet" href="/zzhnc/res/plugins/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_191348_9fd7twf7my3hxgvi.css"> <link rel="stylesheet" href="http://at.alicdn.com/t/font_450595_tgwp56b3fjuzyqfr.css">
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_450595_edbottoi4nu0izfr.css">
<script src='http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script> <script src='http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js'></script>
<style> <style>
.container { .container {
...@@ -81,13 +80,13 @@ ...@@ -81,13 +80,13 @@
</style> </style>
<script> <script>
/* $(function(){ /* $(function(){
var tipObj = document.getElementById('chromeTip'); var tipObj = document.getElementById('chromeTip');
if(tipObj){ if(tipObj){
if( navigator.userAgent.indexOf('Chrome') == -1 || navigator.userAgent.indexOf('Edge') != -1){ if( navigator.userAgent.indexOf('Chrome') == -1 || navigator.userAgent.indexOf('Edge') != -1){
tipObj.style.display = 'block'; tipObj.style.display = 'block';
} }
} }
}) */ }) */
</script> </script>
</head> </head>
...@@ -135,12 +134,7 @@ ...@@ -135,12 +134,7 @@
<div class="layui-body layui-tab-content site-demo site-demo-body" style="bottom: 0;" id="admin-body"> <div class="layui-body layui-tab-content site-demo site-demo-body" style="bottom: 0;" id="admin-body">
<div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab"> <div class="layui-tab admin-nav-card layui-tab-brief" lay-filter="admin-tab">
<ul class="layui-tab-title"> <ul class="layui-tab-title">
<li lay-id="0" class="layui-this"><i class="iconfont icon-xiangmu"></i><cite>项目管理</cite><i class="layui-icon layui-unselect layui-tab-close" data-id="0"></i></li> <li lay-id="0" class="layui-this"><i class="iconfont icon-xiangmu"></i><cite>商品管理</cite><i class="layui-icon layui-unselect layui-tab-close" data-id="0"></i></li>
<!-- </li>
<li class="layui-this">
<i class="fa fa-dashboard" aria-hidden="true"></i>
<cite>项目管理</cite>
</li>-->
</ul> </ul>
<div class="layui-tab-content" style="min-height: 150px; padding: 0; height: auto;"> <div class="layui-tab-content" style="min-height: 150px; padding: 0; height: auto;">
<div class="layui-tab-item layui-show"> <div class="layui-tab-item layui-show">
......
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>项目列表</title> <title>奖品编辑</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<style> <style>
.layui-form-select dl{ .layui-form-select dl {
max-height:190px; max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 400px;
overflow: hidden;
margin: 0;
} }
#allmap {top:10px;width:100%;height: 400px;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style> </style>
<body class="wrap"> <body class="wrap">
<div class="layui-form Detailbtn" style="display:block;"> <div class="layui-form Detailbtn" style="display:block;">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>项目名称</label> <label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>项目名称</label>
<div class="layui-input-inline" style="width:390px;"> <div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="name" placeholder="项目名称" class="layui-input"> <input type="text" name="name" lay-verify="name" placeholder="项目名称" class="layui-input">
</div> </div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div> <div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>海报模板</label> <label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>海报模板</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select name="postertempletid" lay-search=""> <select name="postertempletid" lay-search="">
<option value="">全部</option> <option value="">全部</option>
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">位置</label> <label class="layui-form-label">位置</label>
<!-- <div class="layui-input-inline"> <!-- <div class="layui-input-inline">
<input type="text" name="lng" readonly lay-verify="required" placeholder="经度" class="layui-input" style="background-color:#f5f5f5;color:#666;"> <input type="text" name="lng" readonly lay-verify="required" placeholder="经度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div> </div>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lat" readonly lay-verify="required" placeholder="纬度" class="layui-input" style="background-color:#f5f5f5;color:#666;"> <input type="text" name="lat" readonly lay-verify="required" placeholder="纬度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div> --> </div> -->
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="number" name="lng" lay-verify="required" placeholder="经度" class="layui-input" > <input type="number" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div>
<div class="layui-input-inline">
<input type="number" name="lat" lay-verify="required" placeholder="纬度" class="layui-input" >
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div class="layui-form-mid layui-word-aux" style="padding-bottom:0;">提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)</div>
<div id="allmap"></div>
<div class="layui-form-item" style="margin-top: 30px;">
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
</div> </div>
</div> <div class="layui-input-inline">
<input type="number" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div class="layui-form-mid layui-word-aux" style="padding-bottom:0;">提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)</div>
<div id="allmap"></div>
<div class="layui-form-item" style="margin-top: 30px;">
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
</div>
</div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script> <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script> <script>
// 百度地图API功能 // 百度地图API功能
var map = new BMap.Map("allmap"); var map = new BMap.Map("allmap");
var map = new BMap.Map("allmap",{minZoom:4,maxZoom:18}); // 创建Map实例,设置地图允许的最小/大级别 var map = new BMap.Map("allmap", {
map.enableScrollWheelZoom(true); minZoom: 4,
maxZoom: 18
//单击获取点击的经纬度 }); // 创建Map实例,设置地图允许的最小/大级别
map.addEventListener("click",function(e){ map.enableScrollWheelZoom(true);
$("input[name=lng]").val(e.point.lng);
$("input[name=lat]").val(e.point.lat); //单击获取点击的经纬度
var allOverlay = map.getOverlays(); map.addEventListener("click", function(e) {
if(allOverlay.length>0){ $("input[name=lng]").val(e.point.lng);
function deletePoint(){ $("input[name=lat]").val(e.point.lat);
for (var i = 0; i < allOverlay.length ; i++){ var allOverlay = map.getOverlays();
map.removeOverlay(allOverlay[i]); if(allOverlay.length > 0) {
function deletePoint() {
for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
} }
deletePoint()
var point = new BMap.Point(e.point.lng, e.point.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
deletePoint() });
var point = new BMap.Point(e.point.lng,e.point.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
}
});
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() { layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(), var form = layui.form(),
element = layui.element(), element = layui.element(),
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
$("input[name=lng],input[name=lat]").blur(function(){ $("input[name=lng],input[name=lat]").blur(function() {
var plng=$("input[name=lng]").val(); var plng = $("input[name=lng]").val();
var plat=$("input[name=lat]").val(); var plat = $("input[name=lat]").val();
var allOverlay = map.getOverlays(); var allOverlay = map.getOverlays();
if(allOverlay.length>0){ if(allOverlay.length > 0) {
function deletePoint(){ function deletePoint() {
for (var i = 0; i < allOverlay.length ; i++){ for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]); map.removeOverlay(allOverlay[i]);
} }
} }
deletePoint() deletePoint()
var point = new BMap.Point(plng,plat); var point = new BMap.Point(plng, plat);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
}); });
//下拉海报 //下拉海报
$.post("/zzhnc/poster/getAllPostertemplet",function(data){ $.post("/zzhnc/poster/getAllPostertemplet", function(data) {
console.log(data); console.log(data);
var str=""; var str = "";
for(var i=0;i<data.data.length;i++){ for(var i = 0; i < data.data.length; i++) {
str+='<option value='+ data.data[i].id +'>'+ data.data[i].name +'</option>'; str += '<option value=' + data.data[i].id + '>' + data.data[i].name + '</option>';
} }
$("select[name=postertempletid]").append(str); $("select[name=postertempletid]").append(str);
form.render(); form.render();
}) })
$(".resetBtn").on("click",function(){ $(".resetBtn").on("click", function() {
$("input[name=name]").val(""); $("input[name=name]").val("");
$("select[name=postertempletid]").val("0"); $("select[name=postertempletid]").val("0");
var allOverlay = map.getOverlays(); var allOverlay = map.getOverlays();
if(allOverlay.length>0){ if(allOverlay.length > 0) {
function deletePoint(){ function deletePoint() {
for (var i = 0; i < allOverlay.length ; i++){ for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]); map.removeOverlay(allOverlay[i]);
} }
} }
...@@ -139,103 +147,100 @@ ...@@ -139,103 +147,100 @@
} }
$("input[name=lng]").val(113.754653); $("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333); $("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653,23.025333),13); map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653,23.025333); var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render(); form.render();
}) })
var id=getUrl_G("id"); var id = getUrl_G("id");
if(id>0){ if(id > 0) {
$.post("/zzhnc/project/getProject",{ $.post("/zzhnc/project/getProject", {
id:id id: id
},function(data){ }, function(data) {
console.log(data); console.log(data);
if(data.code==0){ if(data.code == 0) {
$("input[name=name]").val(data.data.name); $("input[name=name]").val(data.data.name);
$("select[name=postertempletid]").val(data.data.postertempletid); $("select[name=postertempletid]").val(data.data.postertempletid);
$("input[name=lng]").val(data.data.lng); $("input[name=lng]").val(data.data.lng);
$("input[name=lat]").val(data.data.lat); $("input[name=lat]").val(data.data.lat);
map.centerAndZoom(new BMap.Point(data.data.lng,data.data.lat),13); map.centerAndZoom(new BMap.Point(data.data.lng, data.data.lat), 13);
var point = new BMap.Point(data.data.lng,data.data.lat); var point = new BMap.Point(data.data.lng, data.data.lat);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render(); form.render();
} }
}) })
}else{ } else {
$("input[name=lng]").val(113.754653); $("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333); $("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653,23.025333),13); map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653,23.025333); var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注 var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中 map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
} }
form.on('submit(submit)', function(data) {
form.on('submit(submit)', function(data){ var name = $("input[name=name]").val();
var name=$("input[name=name]").val(); var templetid = $("select[name=postertempletid]").val();
var templetid=$("select[name=postertempletid]").val(); var lng = $("input[name=lng]").val();
var lng=$("input[name=lng]").val(); var lat = $("input[name=lat]").val();
var lat=$("input[name=lat]").val(); if(name == "") {
if(name==""){ top.layer.msg("请填写项目名称");
top.layer.msg("请填写项目名称"); return false;
return false; } else {
}else{ if(strlen(name) > 40) {
if(strlen(name) > 40) { top.layer.msg("项目名称不超过20个汉字");
top.layer.msg("项目名称不超过20个汉字");
return false;
}
}
if(templetid==""||templetid=="0"){
top.layer.msg("请选择海报");
return false; return false;
} }
}
if(id>0){ if(templetid == "" || templetid == "0") {
//修改项目 top.layer.msg("请选择海报");
$.post("/zzhnc/project/updateProject",{
id:id,
name:name,
templetid:templetid,
lng:lng,
lat:lat
},function(data){
console.log(data);
if(data.code==0){
top.layer.msg("修改成功");
} else{
top.layer.msg(data.msg);
}
})
}else{
//添加项目
$.post("/zzhnc/project/addProject",{
name:name,
templetid:templetid,
lng:lng,
lat:lat
},function(data){
console.log(data);
if(data.code==0){
top.layer.msg("添加成功");
form.render();
}else{
top.layer.msg(data.msg);
}
})
}
return false; return false;
}
});
if(id > 0) {
//修改项目
$.post("/zzhnc/project/updateProject", {
id: id,
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("修改成功");
} else {
top.layer.msg(data.msg);
}
})
} else {
//添加项目
$.post("/zzhnc/project/addProject", {
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("添加成功");
form.render();
} else {
top.layer.msg(data.msg);
}
})
}
return false;
});
}) })
</script> </script>
......
...@@ -6,20 +6,28 @@ ...@@ -6,20 +6,28 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>项目列表</title> <title>奖品管理</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
<style> <style>
.layui-form-select dl{ .layui-form-select dl {
max-height:190px; max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 200px;
overflow: hidden;
margin: 0;
} }
#allmap {top:10px;width:100%;height: 200px;overflow: hidden;margin:0;font-family:"微软雅黑";}
</style> </style>
<body class="wrap"> <body class="wrap">
<div class="layui-form"> <div class="layui-form">
<div class="layui-form-item searchbox" style="margin-bottom: 0px;"> <div class="layui-form-item searchbox" style="margin-bottom: 0px;">
<!-- <div class="layui-input-inline producttype" style="width: 140px;"> <!-- <div class="layui-input-inline producttype" style="width: 140px;">
<select name="producttype" > <select name="producttype" >
<option value="">项目名称</option> <option value="">项目名称</option>
...@@ -41,7 +49,7 @@ ...@@ -41,7 +49,7 @@
<a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加项目</a> <a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加项目</a>
</div> </div>
</div> </div>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
<tr> <tr>
...@@ -54,9 +62,9 @@ ...@@ -54,9 +62,9 @@
<th style="min-width: 80px;">操作</th> <th style="min-width: 80px;">操作</th>
</tr> </tr>
</thead> </thead>
<tbody id="tablelist"> <tbody id="tablelist">
<!-- <tr> <!-- <tr>
<td>1</td> <td>1</td>
<td>项目名称</td> <td>项目名称</td>
<td>经度</td> <td>经度</td>
...@@ -72,74 +80,78 @@ ...@@ -72,74 +80,78 @@
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<form class="layui-form Detailbtn" > <form class="layui-form Detailbtn">
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">项目名称</label> <label class="layui-form-label">项目名称</label>
<div class="layui-input-inline" style="width:390px;"> <div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="required" placeholder="项目名称" class="layui-input"> <input type="text" name="name" lay-verify="required" placeholder="项目名称" class="layui-input">
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">海报模板id</label> <label class="layui-form-label">海报模板id</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<select name="postertempletid" lay-verify="required"> <select name="postertempletid" lay-verify="required">
<option value=""></option> <option value=""></option>
<option value="0">1</option> <option value="0">1</option>
<option value="1">2</option> <option value="1">2</option>
<option value="2">3</option> <option value="2">3</option>
<option value="3">4</option> <option value="3">4</option>
<option value="4">5</option> <option value="4">5</option>
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">位置</label> <label class="layui-form-label">位置</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lng" lay-verify="required" placeholder="经度" class="layui-input"> <input type="text" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div> </div>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="lat" lay-verify="required" placeholder="纬度" class="layui-input"> <input type="text" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div> </div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div id="allmap"></div> <div id="allmap"></div>
</div> </div>
</form> </form>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script> <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script> <script>
// 百度地图API功能 // 百度地图API功能
var map = new BMap.Map("allmap"); var map = new BMap.Map("allmap");
map.centerAndZoom("重庆",12); map.centerAndZoom("重庆", 12);
//单击获取点击的经纬度 //单击获取点击的经纬度
map.addEventListener("click",function(e){ map.addEventListener("click", function(e) {
alert(e.point.lng + "," + e.point.lat); alert(e.point.lng + "," + e.point.lat);
}); });
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() { layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(), var form = layui.form(),
element = layui.element(), element = layui.element(),
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var page=1; var page = 1;
var keyword=""; var keyword = "";
//查询 //查询
form.on('submit(querybtn)', function(data){ form.on('submit(querybtn)', function(data) {
var keyword=$("input[name=keyword]").val(); var keyword = $("input[name=keyword]").val();
Initdata(page,keyword) Initdata(page, keyword)
}); });
$(".resetBtn").on("click",function(){ $(".resetBtn").on("click", function() {
$("input[name=keyword]").val(""); $("input[name=keyword]").val("");
Initdata(page,keyword) Initdata(page, keyword)
}) })
//初始化数据 //初始化数据
Initdata(page,keyword); Initdata(page, keyword);
function Initdata(page,keyword){
function Initdata(page, keyword) {
$.post("/zzhnc/project/getProjectList",{page:page,keyword:keyword},function(data){
data=data.data; $.post("/zzhnc/project/getProjectList", {
page: page,
keyword: keyword
}, function(data) {
data = data.data;
console.log(data) console.log(data)
laypage({ laypage({
cont: 'page', cont: 'page',
...@@ -149,85 +161,85 @@ ...@@ -149,85 +161,85 @@
jump: function(obj, first) { jump: function(obj, first) {
if(!first) { if(!first) {
page = obj.curr page = obj.curr
Initdata(page,keyword); Initdata(page, keyword);
} }
} }
}); });
var str=""; var str = "";
if(data.rows.length<1){ if(data.rows.length < 1) {
$(".nulldata").show(); $(".nulldata").show();
}else{ } else {
$(".nulldata").hide(); $(".nulldata").hide();
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ data.rows[i].name+'</td>' '<td style="text-align:left;">' + data.rows[i].name + '</td>' +
+'<td>'+ data.rows[i].lng+'</td>' '<td>' + data.rows[i].lng + '</td>' +
+'<td>'+ data.rows[i].lat+'</td>' '<td>' + data.rows[i].lat + '</td>' +
+'<td>'+ data.rows[i].postertempletid+'</td>' '<td>' + data.rows[i].postertempletid + '</td>' +
+'<td>'+ toTime_G(data.rows[i].updatedtime) +'</td>' '<td>' + toTime_G(data.rows[i].updatedtime) + '</td>' +
+'<td>' '<td>' +
+'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' '<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' +
+'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' '<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' +
+'</td>' '</td>' +
+'</tr>'; '</tr>';
} }
} }
$("#tablelist").html(str); $("#tablelist").html(str);
toNull_G(); toNull_G();
}) })
} }
//添加项目 //添加项目
$(document).on("click",".createBtn",function(){ $(document).on("click", ".createBtn", function() {
if(parent.tab.exists("添加项目")>0){ if(parent.tab.exists("添加项目") > 0) {
var tabid=parent.tab.getTabId("添加项目"); var tabid = parent.tab.getTabId("添加项目");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id=0", href: "/zzhnc/project/projectEdit?id=0",
icon: "fa-cubes", icon: "fa-cubes",
title: "添加项目" title: "添加项目"
}); });
}) })
//修改项目 //修改项目
$(document).on("click",".updataBtn",function(){ $(document).on("click", ".updataBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
if(parent.tab.exists("修改项目")>0){ if(parent.tab.exists("修改项目") > 0) {
var tabid=parent.tab.getTabId("修改项目"); var tabid = parent.tab.getTabId("修改项目");
parent.tab.deleteTab(tabid); parent.tab.deleteTab(tabid);
} }
parent.tab.tabAdd({ parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id="+ id , href: "/zzhnc/project/projectEdit?id=" + id,
icon: "fa-cubes", icon: "fa-cubes",
title: "修改项目" title: "修改项目"
}); });
}) })
//删除项目 //删除项目
$(document).on("click", ".deleteBtn", function() { $(document).on("click", ".deleteBtn", function() {
var id=$(this).parents("tr").attr("data-id"); var id = $(this).parents("tr").attr("data-id");
layer.confirm('您确定要删除该项目吗?', { layer.confirm('您确定要删除该项目吗?', {
btn: ['确定', '取消'] //按钮 btn: ['确定', '取消'] //按钮
}, function(index, layero) { }, function(index, layero) {
$.post( "/zzhnc/project/deleteProject",{id:id}, function(data) { $.post("/zzhnc/project/deleteProject", {
id: id
}, function(data) {
console.log(data) console.log(data)
if(data.code == 0) { if(data.code == 0) {
top.layer.msg("删除成功"); top.layer.msg("删除成功");
Initdata(1,keyword) Initdata(1, keyword)
layer.close(index); layer.close(index);
}else{ } else {
top.layer.msg(data.msg); top.layer.msg(data.msg);
} }
}) })
}, function(index, layero) { }, function(index, layero) {
layer.close(index); layer.close(index);
}); });
}); });
}) })
</script> </script>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button> <button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button> <button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button>
</div> </div>
</form> </form>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</tr> </tr>
</thead> </thead>
<tbody id="fanslist"> <tbody id="fanslist">
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
...@@ -52,20 +52,24 @@ ...@@ -52,20 +52,24 @@
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var page = 1,keyword = "" var page = 1,
keyword = ""
//初始化数据 //初始化数据
initData(page, keyword) initData(page, keyword)
function initData(page, keyword){ function initData(page, keyword) {
$.post("/zzhnc/report/getFansList",{page:page,keyword:keyword},function(data){ $.post("/zzhnc/report/getFansList", {
page: page,
keyword: keyword
}, function(data) {
console.log(data) console.log(data)
data=data.data; data = data.data;
laypage({ laypage({
cont: 'page', cont: 'page',
pages: data.totalPages, pages: data.totalPages,
curr: page, curr: page,
skip: true, skip: true,
jump: function(obj, first) { jump: function(obj, first) {
...@@ -75,75 +79,73 @@ ...@@ -75,75 +79,73 @@
} }
} }
}); });
$("#fanslist").html("") $("#fanslist").html("")
if(data.rows.length>0){ if(data.rows.length > 0) {
$(".nulldata").hide(); $(".nulldata").hide();
var str=""; var str = "";
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
var nick=""; var nick = "";
if((data.rows[i].nickname==null||data.rows[i].nickname=="")&&(data.rows[i].logo==null||data.rows[i].logo=="")){ if((data.rows[i].nickname == null || data.rows[i].nickname == "") && (data.rows[i].logo == null || data.rows[i].logo == "")) {
nick='<div style="text-align:left;">未授权(id:'+ data.rows[i].id +')</div>'; nick = '<div style="text-align:left;">未授权(id:' + data.rows[i].id + ')</div>';
}else{ } else {
if(data.rows[i].logo==null||data.rows[i].logo==""){ if(data.rows[i].logo == null || data.rows[i].logo == "") {
nick='<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
}else{ } else {
nick='<div class="nickbox"><div id="wlogo" style="background:url('+data.rows[i].logo+') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(' + data.rows[i].logo + ') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
} }
} }
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ nick +'</td>' '<td style="text-align:left;">' + nick + '</td>' +
+'<td>'+ ToAddress(data.rows[i]) +'</td>' '<td>' + ToAddress(data.rows[i]) + '</td>' +
+'<td>'+ data.rows[i].parentfans+'</td>' '<td>' + data.rows[i].parentfans + '</td>' +
+'<td>'+ data.rows[i].salesname+'</td>' '<td>' + data.rows[i].salesname + '</td>' +
+'<td>'+ data.rows[i].miniopenid+'</td>' '<td>' + data.rows[i].miniopenid + '</td>' +
+'<td>'+ toTime_G(data.rows[i].createdtime) +'</td>' '<td>' + toTime_G(data.rows[i].createdtime) + '</td>' +
+'<td>'+ toTime_G(data.rows[i].lastlogintime) +'</td>' '<td>' + toTime_G(data.rows[i].lastlogintime) + '</td>' +
+'</tr>' '</tr>'
} }
$("#fanslist").html(str) $("#fanslist").html(str)
toNull_G(); toNull_G();
}else{ } else {
$(".nulldata").show() $(".nulldata").show()
return false; return false;
} }
}) })
} }
form.on("submit(querybtn)", function(e){ form.on("submit(querybtn)", function(e) {
initData(1, e.field.keyword) initData(1, e.field.keyword)
return false return false
}) })
form.on("submit(resetbtn)", function(e){ form.on("submit(resetbtn)", function(e) {
$("[name=keyword]").val("") $("[name=keyword]").val("")
initData(1, ""); initData(1, "");
return false return false
}) })
function fanstype(t) {
function fanstype(t){ if(t == 1) {
if(t == 1){
return "销售助手粉丝" return "销售助手粉丝"
}else if(t == 2){ } else if(t == 2) {
return "万小二粉丝" return "万小二粉丝"
}else{ } else {
return "" return ""
} }
} }
function ToAddress(data){ function ToAddress(data) {
var p = data.province || "" var p = data.province || ""
var c = data.city || "" var c = data.city || ""
var d = data.district || "" var d = data.district || ""
return !!(p + c + d) ? (p+c+d) : "未知城市" return !!(p + c + d) ? (p + c + d) : "未知城市"
} }
}) })
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>粉丝列</title> <title>商品报</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button> <button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button> <button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button>
</div> </div>
</form> </form>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</tr> </tr>
</thead> </thead>
<tbody id="fanslist"> <tbody id="fanslist">
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
...@@ -52,20 +52,24 @@ ...@@ -52,20 +52,24 @@
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var page = 1,keyword = "" var page = 1,
keyword = ""
//初始化数据 //初始化数据
initData(page, keyword) initData(page, keyword)
function initData(page, keyword){ function initData(page, keyword) {
$.post("/zzhnc/report/getFansList",{page:page,keyword:keyword},function(data){ $.post("/zzhnc/report/getFansList", {
page: page,
keyword: keyword
}, function(data) {
console.log(data) console.log(data)
data=data.data; data = data.data;
laypage({ laypage({
cont: 'page', cont: 'page',
pages: data.totalPages, pages: data.totalPages,
curr: page, curr: page,
skip: true, skip: true,
jump: function(obj, first) { jump: function(obj, first) {
...@@ -75,75 +79,73 @@ ...@@ -75,75 +79,73 @@
} }
} }
}); });
$("#fanslist").html("") $("#fanslist").html("")
if(data.rows.length>0){ if(data.rows.length > 0) {
$(".nulldata").hide(); $(".nulldata").hide();
var str=""; var str = "";
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
var nick=""; var nick = "";
if((data.rows[i].nickname==null||data.rows[i].nickname=="")&&(data.rows[i].logo==null||data.rows[i].logo=="")){ if((data.rows[i].nickname == null || data.rows[i].nickname == "") && (data.rows[i].logo == null || data.rows[i].logo == "")) {
nick='<div style="text-align:left;">未授权(id:'+ data.rows[i].id +')</div>'; nick = '<div style="text-align:left;">未授权(id:' + data.rows[i].id + ')</div>';
}else{ } else {
if(data.rows[i].logo==null||data.rows[i].logo==""){ if(data.rows[i].logo == null || data.rows[i].logo == "") {
nick='<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
}else{ } else {
nick='<div class="nickbox"><div id="wlogo" style="background:url('+data.rows[i].logo+') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(' + data.rows[i].logo + ') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
} }
} }
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ nick +'</td>' '<td style="text-align:left;">' + nick + '</td>' +
+'<td>'+ ToAddress(data.rows[i]) +'</td>' '<td>' + ToAddress(data.rows[i]) + '</td>' +
+'<td>'+ data.rows[i].parentfans+'</td>' '<td>' + data.rows[i].parentfans + '</td>' +
+'<td>'+ data.rows[i].salesname+'</td>' '<td>' + data.rows[i].salesname + '</td>' +
+'<td>'+ data.rows[i].miniopenid+'</td>' '<td>' + data.rows[i].miniopenid + '</td>' +
+'<td>'+ toTime_G(data.rows[i].createdtime) +'</td>' '<td>' + toTime_G(data.rows[i].createdtime) + '</td>' +
+'<td>'+ toTime_G(data.rows[i].lastlogintime) +'</td>' '<td>' + toTime_G(data.rows[i].lastlogintime) + '</td>' +
+'</tr>' '</tr>'
} }
$("#fanslist").html(str) $("#fanslist").html(str)
toNull_G(); toNull_G();
}else{ } else {
$(".nulldata").show() $(".nulldata").show()
return false; return false;
} }
}) })
} }
form.on("submit(querybtn)", function(e){ form.on("submit(querybtn)", function(e) {
initData(1, e.field.keyword) initData(1, e.field.keyword)
return false return false
}) })
form.on("submit(resetbtn)", function(e){ form.on("submit(resetbtn)", function(e) {
$("[name=keyword]").val("") $("[name=keyword]").val("")
initData(1, ""); initData(1, "");
return false return false
}) })
function fanstype(t) {
function fanstype(t){ if(t == 1) {
if(t == 1){
return "销售助手粉丝" return "销售助手粉丝"
}else if(t == 2){ } else if(t == 2) {
return "万小二粉丝" return "万小二粉丝"
}else{ } else {
return "" return ""
} }
} }
function ToAddress(data){ function ToAddress(data) {
var p = data.province || "" var p = data.province || ""
var c = data.city || "" var c = data.city || ""
var d = data.district || "" var d = data.district || ""
return !!(p + c + d) ? (p+c+d) : "未知城市" return !!(p + c + d) ? (p + c + d) : "未知城市"
} }
}) })
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>粉丝列表</title> <title>抽奖记录</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css"> <link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css"> <link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head> </head>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</div> </div>
<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button> <button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
<button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button> <button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn">重置</button>
</div> </div>
</form> </form>
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</tr> </tr>
</thead> </thead>
<tbody id="fanslist"> <tbody id="fanslist">
</tbody> </tbody>
</table> </table>
<div class="nulldata">暂无数据</div> <div class="nulldata">暂无数据</div>
<div id="page"></div> <div id="page"></div>
</body> </body>
<script src='/zzhnc/res/js/jquery.min.js'></script> <script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script> <script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
...@@ -52,20 +52,24 @@ ...@@ -52,20 +52,24 @@
laydate = layui.laydate, laydate = layui.laydate,
layer = layui.layer, layer = layui.layer,
laypage = layui.laypage; laypage = layui.laypage;
var page = 1,keyword = "" var page = 1,
keyword = ""
//初始化数据 //初始化数据
initData(page, keyword) initData(page, keyword)
function initData(page, keyword){ function initData(page, keyword) {
$.post("/zzhnc/report/getFansList",{page:page,keyword:keyword},function(data){ $.post("/zzhnc/report/getFansList", {
page: page,
keyword: keyword
}, function(data) {
console.log(data) console.log(data)
data=data.data; data = data.data;
laypage({ laypage({
cont: 'page', cont: 'page',
pages: data.totalPages, pages: data.totalPages,
curr: page, curr: page,
skip: true, skip: true,
jump: function(obj, first) { jump: function(obj, first) {
...@@ -75,75 +79,73 @@ ...@@ -75,75 +79,73 @@
} }
} }
}); });
$("#fanslist").html("") $("#fanslist").html("")
if(data.rows.length>0){ if(data.rows.length > 0) {
$(".nulldata").hide(); $(".nulldata").hide();
var str=""; var str = "";
for(var i=0;i<data.rows.length;i++){ for(var i = 0; i < data.rows.length; i++) {
var nick=""; var nick = "";
if((data.rows[i].nickname==null||data.rows[i].nickname=="")&&(data.rows[i].logo==null||data.rows[i].logo=="")){ if((data.rows[i].nickname == null || data.rows[i].nickname == "") && (data.rows[i].logo == null || data.rows[i].logo == "")) {
nick='<div style="text-align:left;">未授权(id:'+ data.rows[i].id +')</div>'; nick = '<div style="text-align:left;">未授权(id:' + data.rows[i].id + ')</div>';
}else{ } else {
if(data.rows[i].logo==null||data.rows[i].logo==""){ if(data.rows[i].logo == null || data.rows[i].logo == "") {
nick='<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(/zzhnc/res/images/default_user.png) no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
}else{ } else {
nick='<div class="nickbox"><div id="wlogo" style="background:url('+data.rows[i].logo+') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> '+ data.rows[i].nickname +'</span></div>'; nick = '<div class="nickbox"><div id="wlogo" style="background:url(' + data.rows[i].logo + ') no-repeat center;-webkit-background-size:contain;background-size:contain;"></div><span class="nick"> ' + data.rows[i].nickname + '</span></div>';
} }
} }
str+='<tr data-id='+ data.rows[i].id +'>' str += '<tr data-id=' + data.rows[i].id + '>' +
+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>' '<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
+'<td style="text-align:left;">'+ nick +'</td>' '<td style="text-align:left;">' + nick + '</td>' +
+'<td>'+ ToAddress(data.rows[i]) +'</td>' '<td>' + ToAddress(data.rows[i]) + '</td>' +
+'<td>'+ data.rows[i].parentfans+'</td>' '<td>' + data.rows[i].parentfans + '</td>' +
+'<td>'+ data.rows[i].salesname+'</td>' '<td>' + data.rows[i].salesname + '</td>' +
+'<td>'+ data.rows[i].miniopenid+'</td>' '<td>' + data.rows[i].miniopenid + '</td>' +
+'<td>'+ toTime_G(data.rows[i].createdtime) +'</td>' '<td>' + toTime_G(data.rows[i].createdtime) + '</td>' +
+'<td>'+ toTime_G(data.rows[i].lastlogintime) +'</td>' '<td>' + toTime_G(data.rows[i].lastlogintime) + '</td>' +
+'</tr>' '</tr>'
} }
$("#fanslist").html(str) $("#fanslist").html(str)
toNull_G(); toNull_G();
}else{ } else {
$(".nulldata").show() $(".nulldata").show()
return false; return false;
} }
}) })
} }
form.on("submit(querybtn)", function(e){ form.on("submit(querybtn)", function(e) {
initData(1, e.field.keyword) initData(1, e.field.keyword)
return false return false
}) })
form.on("submit(resetbtn)", function(e){ form.on("submit(resetbtn)", function(e) {
$("[name=keyword]").val("") $("[name=keyword]").val("")
initData(1, ""); initData(1, "");
return false return false
}) })
function fanstype(t) {
function fanstype(t){ if(t == 1) {
if(t == 1){
return "销售助手粉丝" return "销售助手粉丝"
}else if(t == 2){ } else if(t == 2) {
return "万小二粉丝" return "万小二粉丝"
}else{ } else {
return "" return ""
} }
} }
function ToAddress(data){ function ToAddress(data) {
var p = data.province || "" var p = data.province || ""
var c = data.city || "" var c = data.city || ""
var d = data.district || "" var d = data.district || ""
return !!(p + c + d) ? (p+c+d) : "未知城市" return !!(p + c + d) ? (p + c + d) : "未知城市"
} }
}) })
</script> </script>
......
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>奖品编辑</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head>
<style>
.layui-form-select dl {
max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 400px;
overflow: hidden;
margin: 0;
}
</style>
<body class="wrap">
<div class="layui-form Detailbtn" style="display:block;">
<div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>项目名称</label>
<div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="name" placeholder="项目名称" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux">不超过20个汉字</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label"><i style="color:red;margin-right:5px;">*</i>海报模板</label>
<div class="layui-input-inline">
<select name="postertempletid" lay-search="">
<option value="">全部</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">位置</label>
<!-- <div class="layui-input-inline">
<input type="text" name="lng" readonly lay-verify="required" placeholder="经度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div>
<div class="layui-input-inline">
<input type="text" name="lat" readonly lay-verify="required" placeholder="纬度" class="layui-input" style="background-color:#f5f5f5;color:#666;">
</div> -->
<div class="layui-input-inline">
<input type="number" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div>
<div class="layui-input-inline">
<input type="number" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div>
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div class="layui-form-mid layui-word-aux" style="padding-bottom:0;">提示:可以在地图上点击位置获取坐标(鼠标滚动放大缩小地图)</div>
<div id="allmap"></div>
<div class="layui-form-item" style="margin-top: 30px;">
<button class="layui-btn" lay-submit lay-filter="submit">提交</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
</div>
</div>
</body>
<script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script>
// 百度地图API功能
var map = new BMap.Map("allmap");
var map = new BMap.Map("allmap", {
minZoom: 4,
maxZoom: 18
}); // 创建Map实例,设置地图允许的最小/大级别
map.enableScrollWheelZoom(true);
//单击获取点击的经纬度
map.addEventListener("click", function(e) {
$("input[name=lng]").val(e.point.lng);
$("input[name=lat]").val(e.point.lat);
var allOverlay = map.getOverlays();
if(allOverlay.length > 0) {
function deletePoint() {
for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
}
deletePoint()
var point = new BMap.Point(e.point.lng, e.point.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
}
});
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(),
element = layui.element(),
laydate = layui.laydate,
layer = layui.layer,
laypage = layui.laypage;
$("input[name=lng],input[name=lat]").blur(function() {
var plng = $("input[name=lng]").val();
var plat = $("input[name=lat]").val();
var allOverlay = map.getOverlays();
if(allOverlay.length > 0) {
function deletePoint() {
for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
}
deletePoint()
var point = new BMap.Point(plng, plat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
}
});
//下拉海报
$.post("/zzhnc/poster/getAllPostertemplet", function(data) {
console.log(data);
var str = "";
for(var i = 0; i < data.data.length; i++) {
str += '<option value=' + data.data[i].id + '>' + data.data[i].name + '</option>';
}
$("select[name=postertempletid]").append(str);
form.render();
})
$(".resetBtn").on("click", function() {
$("input[name=name]").val("");
$("select[name=postertempletid]").val("0");
var allOverlay = map.getOverlays();
if(allOverlay.length > 0) {
function deletePoint() {
for(var i = 0; i < allOverlay.length; i++) {
map.removeOverlay(allOverlay[i]);
}
}
deletePoint()
}
$("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render();
})
var id = getUrl_G("id");
if(id > 0) {
$.post("/zzhnc/project/getProject", {
id: id
}, function(data) {
console.log(data);
if(data.code == 0) {
$("input[name=name]").val(data.data.name);
$("select[name=postertempletid]").val(data.data.postertempletid);
$("input[name=lng]").val(data.data.lng);
$("input[name=lat]").val(data.data.lat);
map.centerAndZoom(new BMap.Point(data.data.lng, data.data.lat), 13);
var point = new BMap.Point(data.data.lng, data.data.lat);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
form.render();
}
})
} else {
$("input[name=lng]").val(113.754653);
$("input[name=lat]").val(23.025333);
map.centerAndZoom(new BMap.Point(113.754653, 23.025333), 13);
var point = new BMap.Point(113.754653, 23.025333);
var marker = new BMap.Marker(point); // 创建标注
map.addOverlay(marker); // 将标注添加到地图中
marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
}
form.on('submit(submit)', function(data) {
var name = $("input[name=name]").val();
var templetid = $("select[name=postertempletid]").val();
var lng = $("input[name=lng]").val();
var lat = $("input[name=lat]").val();
if(name == "") {
top.layer.msg("请填写项目名称");
return false;
} else {
if(strlen(name) > 40) {
top.layer.msg("项目名称不超过20个汉字");
return false;
}
}
if(templetid == "" || templetid == "0") {
top.layer.msg("请选择海报");
return false;
}
if(id > 0) {
//修改项目
$.post("/zzhnc/project/updateProject", {
id: id,
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("修改成功");
} else {
top.layer.msg(data.msg);
}
})
} else {
//添加项目
$.post("/zzhnc/project/addProject", {
name: name,
templetid: templetid,
lng: lng,
lat: lat
}, function(data) {
console.log(data);
if(data.code == 0) {
top.layer.msg("添加成功");
form.render();
} else {
top.layer.msg(data.msg);
}
})
}
return false;
});
})
</script>
</html>
\ No newline at end of file \ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>奖品管理</title>
<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/zzhnc/res/css/basic.css">
</head>
<style>
.layui-form-select dl {
max-height: 190px;
}
#allmap {
top: 10px;
width: 100%;
height: 200px;
overflow: hidden;
margin: 0;
}
</style>
<body class="wrap">
<div class="layui-form">
<div class="layui-form-item searchbox" style="margin-bottom: 0px;">
<!-- <div class="layui-input-inline producttype" style="width: 140px;">
<select name="producttype" >
<option value="">项目名称</option>
</select>
</div>
<div class="layui-input-inline productid" style="width: 140px;">
<select name="productid">
<option value="">海报模板id</option>
</select>
</div>
<div class="layui-input-inline" style="width: 150px;">
<input name="date1" class="layui-input" placeholder="更新时间" onclick="layui.laydate({elem: this,format: 'YYYY-MM-DD hh:mm:ss',istime: true})" />
</div> -->
<div class="layui-input-inline" style="width: 140px;">
<input type="text" class="layui-input" name="keyword" placeholder="关键字" />
</div>
<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
<button class="layui-btn layui-btn-primary resetBtn">重置</button>
<a class="layui-btn layui-btn-warm createBtn" href="#"><i class="layui-icon">&#xe61f;</i> 添加项目</a>
</div>
</div>
<table class="layui-table">
<thead>
<tr>
<th style="width: 30px;">No</th>
<th style="min-width:120px;">项目名称</th>
<th style="min-width: 80px;">经度</th>
<th style="min-width: 80px;">纬度</th>
<th style="min-width: 80px;">海报模板id</th>
<th style="min-width: 80px;">更新时间</th>
<th style="min-width: 80px;">操作</th>
</tr>
</thead>
<tbody id="tablelist">
<!-- <tr>
<td>1</td>
<td>项目名称</td>
<td>经度</td>
<td>纬度</td>
<td>海报模板id</td>
<td>更新时间</td>
<td>
<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>
<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>
</td>
</tr> -->
</tbody>
</table>
<div class="nulldata">暂无数据</div>
<div id="page"></div>
</body>
<form class="layui-form Detailbtn">
<div class="layui-form-item">
<label class="layui-form-label">项目名称</label>
<div class="layui-input-inline" style="width:390px;">
<input type="text" name="name" lay-verify="required" placeholder="项目名称" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">海报模板id</label>
<div class="layui-input-inline">
<select name="postertempletid" lay-verify="required">
<option value=""></option>
<option value="0">1</option>
<option value="1">2</option>
<option value="2">3</option>
<option value="3">4</option>
<option value="4">5</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">位置</label>
<div class="layui-input-inline">
<input type="text" name="lng" lay-verify="required" placeholder="经度" class="layui-input">
</div>
<div class="layui-input-inline">
<input type="text" name="lat" lay-verify="required" placeholder="纬度" class="layui-input">
</div>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=V45f8fZO8HiU1gLflQdrpv81D4gXKGRH"></script>
<div id="allmap"></div>
</div>
</form>
<script src='/zzhnc/res/js/jquery.min.js'></script>
<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
<script>
// 百度地图API功能
var map = new BMap.Map("allmap");
map.centerAndZoom("重庆", 12);
//单击获取点击的经纬度
map.addEventListener("click", function(e) {
alert(e.point.lng + "," + e.point.lat);
});
layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
var form = layui.form(),
element = layui.element(),
laydate = layui.laydate,
layer = layui.layer,
laypage = layui.laypage;
var page = 1;
var keyword = "";
//查询
form.on('submit(querybtn)', function(data) {
var keyword = $("input[name=keyword]").val();
Initdata(page, keyword)
});
$(".resetBtn").on("click", function() {
$("input[name=keyword]").val("");
Initdata(page, keyword)
})
//初始化数据
Initdata(page, keyword);
function Initdata(page, keyword) {
$.post("/zzhnc/project/getProjectList", {
page: page,
keyword: keyword
}, function(data) {
data = data.data;
console.log(data)
laypage({
cont: 'page',
pages: data.totalPages, //总页数
curr: page,
skip: true,
jump: function(obj, first) {
if(!first) {
page = obj.curr
Initdata(page, keyword);
}
}
});
var str = "";
if(data.rows.length < 1) {
$(".nulldata").show();
} else {
$(".nulldata").hide();
for(var i = 0; i < data.rows.length; i++) {
str += '<tr data-id=' + data.rows[i].id + '>' +
'<td>' + ((data.page - 1) * data.pageSize + i + 1) + '</td>' +
'<td style="text-align:left;">' + data.rows[i].name + '</td>' +
'<td>' + data.rows[i].lng + '</td>' +
'<td>' + data.rows[i].lat + '</td>' +
'<td>' + data.rows[i].postertempletid + '</td>' +
'<td>' + toTime_G(data.rows[i].updatedtime) + '</td>' +
'<td>' +
'<a href="#" class="layui-btn layui-btn-mini updataBtn">修改</a>' +
'<a href="#" class="layui-btn layui-btn-mini deleteBtn">删除</a>' +
'</td>' +
'</tr>';
}
}
$("#tablelist").html(str);
toNull_G();
})
}
//添加项目
$(document).on("click", ".createBtn", function() {
if(parent.tab.exists("添加项目") > 0) {
var tabid = parent.tab.getTabId("添加项目");
parent.tab.deleteTab(tabid);
}
parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id=0",
icon: "fa-cubes",
title: "添加项目"
});
})
//修改项目
$(document).on("click", ".updataBtn", function() {
var id = $(this).parents("tr").attr("data-id");
if(parent.tab.exists("修改项目") > 0) {
var tabid = parent.tab.getTabId("修改项目");
parent.tab.deleteTab(tabid);
}
parent.tab.tabAdd({
href: "/zzhnc/project/projectEdit?id=" + id,
icon: "fa-cubes",
title: "修改项目"
});
})
//删除项目
$(document).on("click", ".deleteBtn", function() {
var id = $(this).parents("tr").attr("data-id");
layer.confirm('您确定要删除该项目吗?', {
btn: ['确定', '取消'] //按钮
}, function(index, layero) {
$.post("/zzhnc/project/deleteProject", {
id: id
}, function(data) {
console.log(data)
if(data.code == 0) {
top.layer.msg("删除成功");
Initdata(1, keyword)
layer.close(index);
} else {
top.layer.msg(data.msg);
}
})
}, function(index, layero) {
layer.close(index);
});
});
})
</script>
</html>
\ No newline at end of file \ No newline at end of file
/* 甯冨眬 */ /* 甯冨眬 */
.site-inline{font-size: 0;} .site-inline{font-size: 0;}
.site-tree, .site-content{display: inline-block; *display:inline; *zoom:1; vertical-align: top; font-size: 14px;} .site-tree, .site-content{display: inline-block; *display:inline; *zoom:1; vertical-align: top; font-size: 14px;}
...@@ -8,8 +6,8 @@ ...@@ -8,8 +6,8 @@
/* 澶撮儴admin-side-toggle */ /* 澶撮儴admin-side-toggle */
.header{height: 65px; border-bottom: 1px solid #404553; background-color: #393D49; color: #fff;} .header{height: 65px; border-bottom: 1px solid #404553; background-color: #393D49; color: #fff;}
.logo{position: absolute; left: 0; top: 26px;} .logo{position: absolute; left: 0; top: 20px;}
.logo img{ width: 106px;} .logo img{ width: 160px;}
.header .layui-nav{position: absolute; right: 0; top: 0; padding: 0; background: none;} .header .layui-nav{position: absolute; right: 0; top: 0; padding: 0; background: none;}
.header .layui-nav .layui-nav-item{margin: 0 20px; line-height: 66px;} .header .layui-nav .layui-nav-item{margin: 0 20px; line-height: 66px;}
......
/*----------------鐧诲綍-----------------*/ /*----------------鐧诲綍-----------------*/
.loginblock {
background: url(../images/loginimg.jpg) no-repeat center; .loginblock {
-webkit-background-size: cover; background: url(../images/loginimg.jpg) no-repeat center;
background-size: cover; -webkit-background-size: cover;
width:100%; background-size: cover;
height:100%; width: 100%;
} height: 100%;
}
.main .loginBox {
position: absolute; .main .loginBox {
top: 50%; position: absolute;
left: 50%; top: 50%;
width: 410px; left: 50%;
height: 330px; width: 410px;
margin-top: -165px; height: 330px;
margin-left: -205px; margin-top: -165px;
} margin-left: -205px;
}
.formBox {
border: 1px solid rgba(255, 255, 255, 0.5); .formBox {
border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.5);
text-align: center; border-radius: 6px;
background-color: rgba(255, 255, 255, 0.2); text-align: center;
box-shadow: 0 0 14px 1px rgba(0, 0, 0, 0.4); background-color: rgba(255, 255, 255, 0.2);
} box-shadow: 0 0 14px 1px rgba(0, 0, 0, 0.4);
}
.loginbos {
padding: 20px 40px 50px 50px; .loginbos {
} padding: 20px 40px 50px 50px;
}
.loginicon {
display: block; .loginicon {
float: left; display: block;
margin-right: 10px; float: left;
margin-top: 13px; margin-right: 10px;
width:20px; margin-top: 13px;
} width: 20px;
}
.loginlogo {
width: 140px; .loginlogo {
margin: 40px 30px 0; width: 140px;
} margin: 40px 30px 0;
}
.box h3 {
color: #333; .box h3 {
font-size: 20px; color: #333;
margin: 50px auto 0; font-size: 20px;
} margin: 50px auto 0;
}
.loginlogo img {
width: 100%; .loginlogo img {
} width: 100%;
}
.box input {
display: block; .box input {
width: 240px; display: block;
height: 30px; width: 240px;
padding: 3px 6px; height: 30px;
border-radius: 3px; padding: 3px 6px;
margin-top: 6px; border-radius: 3px;
background: none; margin-top: 6px;
border: none; background: none;
color: #333; border: none;
border: 1px solid #eee; color: #333;
background-color: rgba(255, 255, 255, 0.5); border: 1px solid #eee;
} background-color: rgba(255, 255, 255, 0.5);
}
.main .box .submitBox button {
width: 254px; .main .box .submitBox button {
background: none; width: 254px;
border: none; background: none;
background-color: #1AA094; border: none;
border-radius: 3px; background-color: #1AA094;
color: #fff; border-radius: 3px;
padding: 8px 0; color: #fff;
margin: 10px; padding: 8px 0;
cursor: pointer; margin: 10px;
} cursor: pointer;
}
.main .box .submitBox button:hover {
opacity: 0.9; .main .box .submitBox button:hover {
} opacity: 0.9;
/*-----------鐧诲綍 end-----------*/ }
/*-----------鍏叡鏍峰紡-----------*/
img[src=""]{opacity: 0;}
.hint{ /*-----------鐧诲綍 end-----------*/
line-height:30px;
padding:10px 10px;
color: #E06D20; /*-----------鍏叡鏍峰紡-----------*/
}
.layui-table td{ img[src=""] {
color:#666; opacity: 0;
font-weight:normal; }
}
.layui-table th{ .hint {
color:#333; line-height: 30px;
font-weight:normal; padding: 10px 10px;
} color: #E06D20;
.wrap{ }
margin-left:10px;
} .layui-table td {
.createBtn{ color: #666;
font-weight: normal;
} }
.Detailbtn{
padding:20px 40px 20px 20px; .layui-table th {
color: #333;
font-weight: normal;
}
.wrap {
margin-left: 10px;
}
.createBtn {}
.Detailbtn {
padding: 20px 40px 20px 20px;
display: none; display: none;
} }
.searchbox .layui-input-inline,.searchbox .layui-btn{
margin-top:20px; .searchbox .layui-input-inline,
.searchbox .layui-btn {
margin-top: 20px;
display: inline-block; display: inline-block;
float:none; float: none;
} }
.searchbox .layui-btn{ .searchbox .layui-btn {
margin-right:10px; margin-right: 10px;
} }
.searchbox .layui-btn+.layui-btn{
margin-left:0; .searchbox .layui-btn+.layui-btn {
margin-left: 0;
} }
.nulldata{
.nulldata {
padding: 40px 0; padding: 40px 0;
text-align: center; text-align: center;
color: #666; color: #666;
display: none; display: none;
border: 1px solid #eee; border: 1px solid #eee;
margin-top:-10px; margin-top: -10px;
} }
input[name=file]{
width:5px; input[name=file] {
display:none; width: 5px;
} display: none;
.nickbox{ }
max-width:200px;
.nickbox {
max-width: 200px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
text-align:left; text-align: left;
} }
.nick{
display:inline; .nick {
line-height:40px; display: inline;
margin-left:10px; line-height: 40px;
margin-left: 10px;
} }
#page{
display:block; #page {
clear:both; display: block;
clear: both;
} }
/*-----------鍏叡鏍峰紡end-----------*/ /*-----------鍏叡鏍峰紡end-----------*/
/*-------------鑷姩鍥炲顦�-------------*/ /*-------------鑷姩鍥炲顦�-------------*/
.popupbox { .popupbox {
width: 100%; width: 100%;
} }
.popupbos { .popupbos {
background-color: #fff; background-color: #fff;
border-bottom-left-radius: 6px; border-bottom-left-radius: 6px;
...@@ -169,132 +194,190 @@ input[name=file]{ ...@@ -169,132 +194,190 @@ input[name=file]{
margin-bottom: 40px; margin-bottom: 40px;
color: #666; color: #666;
} }
.popupbox .layui-form-label { .popupbox .layui-form-label {
width: 126px; width: 126px;
} }
.emotion{
width: 42px; .emotion {
cursor: pointer; width: 42px;
font-size: 25px; cursor: pointer;
margin-top: 10px; font-size: 25px;
display: inline-block; margin-top: 10px;
color:#ff6c00; display: inline-block;
float:left; color: #ff6c00;
} float: left;
.qqFace { margin-top: 4px; background: #fff; padding: 10px; border: 1px #dfe6f6 solid; } }
.qqFace table td { padding: 0px; }
.qqFace table td img { cursor: pointer; border: 1px #fff solid; } .qqFace {
.qqFace table td img:hover { border: 1px #0066cc solid; } margin-top: 4px;
#show { width: 770px; margin: 20px auto; background: #fff; padding: 5px; border: 1px solid #DDD; vertical-align: top; } background: #fff;
#wlogo{ width: 40px; height:40px; border-radius: 50%;float:left; } padding: 10px;
.logoimg{ border: 1px #dfe6f6 solid;
width: 40px; height:40px;margin:0 auto; }
}
.layui-table td, .layui-table th{ text-align: center;} .qqFace table td {
padding: 0px;
}
.qqFace table td img {
cursor: pointer;
border: 1px #fff solid;
}
.qqFace table td img:hover {
border: 1px #0066cc solid;
}
#show {
width: 770px;
margin: 20px auto;
background: #fff;
padding: 5px;
border: 1px solid #DDD;
vertical-align: top;
}
#wlogo {
width: 40px;
height: 40px;
border-radius: 50%;
float: left;
}
.logoimg {
width: 40px;
height: 40px;
margin: 0 auto;
}
.layui-table td,
.layui-table th {
text-align: center;
}
/*----------鑷姩鍥炲 end----------*/ /*----------鑷姩鍥炲 end----------*/
/*---------------娴锋姤---------------*/ /*---------------娴锋姤---------------*/
.haibao-box { .haibao-box {
width: 100%;
border: 1px solid #eee;
}
.haibao-viewbox{
min-height:909px;
border:1px solid #ddd;
}
.ph_top{
width:100%;
border-bottom:1px solid #eee;
}
.haibaofl{
float:left;
width:640px;
margin-left:10px;
}
.haibaofr{
float:left;
width:416px;
}
.haibao-view {
width: 100%;
/*height: 470px;*/
border-bottom:none;
border-top:none;
margin: 0 auto;
position: relative;
overflow: hidden;
border-bottom:1px solid #ddd;
}
.haibao-view img{
width:100%;
}
.box {
cursor: move;
background-color: #FFF;
border: 1px solid #eeeCCC;
}
#box {
width: 160px;
height: 160px;
position: absolute;
top: 0px;
left: 100px;
background: url(../../res/images/code.png);
background-size: 100% 100%;
}
.coor {
overflow: hidden;
cursor: se-resize;
position: absolute;
right: 0;
bottom: 0;
}
.ph_ft{
width:100%;
border-top:1px solid #eee;
}
/*---------------娴锋姤 end---------------*/
/*公众号*/
.publicbox{
margin-top:20px;
margin-left:20px;
margin-right:20px;
border:1px solid #eee;
overflow:hidden;
margin-bottom:20px;
padding:10px;
height:184px;
}
.publicbos{
float:left;
marin-right:20px;
margin-bottom:20px;
overflow:hidden;
text-align:center;
width:160px;
}
.publicbos img{
width:140px;
height:140px;
display:block;
margin:0 auto;
border-radius:2px;
}
.publicbos span{
width:140px;
height:140px;
display:block;
margin:0 auto;
border-radius:4px;
border: 1px solid #eee;
}
.publicbox p{
font-size:14px;
color:#666;
line-height:30px;
margin-top:10px;
}
\ No newline at end of file \ No newline at end of file
width: 100%;
border: 1px solid #eee;
}
.haibao-viewbox {
min-height: 909px;
border: 1px solid #ddd;
}
.ph_top {
width: 100%;
border-bottom: 1px solid #eee;
}
.haibaofl {
float: left;
width: 640px;
margin-left: 10px;
}
.haibaofr {
float: left;
width: 416px;
}
.haibao-view {
width: 100%;
/*height: 470px;*/
border-bottom: none;
border-top: none;
margin: 0 auto;
position: relative;
overflow: hidden;
border-bottom: 1px solid #ddd;
}
.haibao-view img {
width: 100%;
}
.box {
cursor: move;
background-color: #FFF;
border: 1px solid #eeeCCC;
}
#box {
width: 160px;
height: 160px;
position: absolute;
top: 0px;
left: 100px;
background: url(../../res/images/code.png);
background-size: 100% 100%;
}
.coor {
overflow: hidden;
cursor: se-resize;
position: absolute;
right: 0;
bottom: 0;
}
.ph_ft {
width: 100%;
border-top: 1px solid #eee;
}
/*---------------娴锋姤 end---------------*/
/*公众号*/
.publicbox {
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
border: 1px solid #eee;
overflow: hidden;
margin-bottom: 20px;
padding: 10px;
height: 184px;
}
.publicbos {
float: left;
marin-right: 20px;
margin-bottom: 20px;
overflow: hidden;
text-align: center;
width: 160px;
}
.publicbos img {
width: 140px;
height: 140px;
display: block;
margin: 0 auto;
border-radius: 2px;
}
.publicbos span {
width: 140px;
height: 140px;
display: block;
margin: 0 auto;
border-radius: 4px;
border: 1px solid #eee;
}
.publicbox p {
font-size: 14px;
color: #666;
line-height: 30px;
margin-top: 10px;
}
\ No newline at end of file \ No newline at end of file
#fansInfoBox { #fansInfoBox {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #efefef; background: #efefef;
z-index: 100000000; z-index: 100000000;
display: none; display: none;
align-items: center; align-items: center;
color: #333; color: #333;
} }
#fansInfoBox .section { #fansInfoBox .section {
padding: 10px 20px; padding: 10px 20px;
/* border: 1px solid #999; */ /* border: 1px solid #999; */
background-color: #fff; background-color: #fff;
margin: 10px 0; margin: 10px 0;
} }
#fansInfoBox .flexBox { #fansInfoBox .flexBox {
display: flex; display: flex;
} }
#fansInfoBox .userLogo { #fansInfoBox .userLogo {
width: 70px; width: 70px;
height: 70px; height: 70px;
border-radius: 4px; border-radius: 4px;
} }
#fansInfoBox .userLogo img { #fansInfoBox .userLogo img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
#fansInfoBox .userInfo { #fansInfoBox .userInfo {
flex: 1;
flex: 1;
} }
#fansInfoBox .userInfo>p:first-child { #fansInfoBox .userInfo>p:first-child {
margin-bottom: 12px; margin-bottom: 12px;
padding-left: 10px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
#fansInfoBox .labels span { #fansInfoBox .labels span {
background-color: #b50005; background-color: #b50005;
color: #fff; color: #fff;
font-size: 0.8em; font-size: 0.8em;
padding: 1px 8px; padding: 1px 8px;
margin: 2px; margin: 2px;
display: inline-block; display: inline-block;
} }
#fansInfoBox .noteStyle { #fansInfoBox .noteStyle {
margin-top: 4px; margin-top: 4px;
font-size: 0.9em; font-size: 0.9em;
color: #666; color: #666;
} }
#fansInfoBox .noteStyle>div:first-child { #fansInfoBox .noteStyle>div:first-child {
width: 80px; width: 80px;
padding-left: 10px; padding-left: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
#fansInfoBox .labels { #fansInfoBox .labels {
flex: 1; flex: 1;
} }
#fansInfoBox .labelTitle { #fansInfoBox .labelTitle {
width: 80px; width: 80px;
} }
#fansInfoBox .subSection { #fansInfoBox .subSection {
padding: 10px 0; padding: 10px 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
#fansInfoBox .editStyle { #fansInfoBox .editStyle {
justify-content: space-between; justify-content: space-between;
} }
#fansInfoBox .editStyle .iconfont { #fansInfoBox .editStyle .iconfont {
color: #333; color: #333;
font-size: 1.2em; font-size: 1.2em;
} }
#fansInfoBox textarea { #fansInfoBox textarea {
width: 100%; width: 100%;
height: 80px; height: 80px;
margin-top: 20px; margin-top: 20px;
border-radius: 6px; border-radius: 6px;
resize: none; resize: none;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
background: none; background: none;
border: 1px solid #eee; border: 1px solid #eee;
outline: none; outline: none;
-webkit-appearance: none; -webkit-appearance: none;
} }
#fansInfoBox .btnBox { #fansInfoBox .btnBox {
width: 100%; width: 100%;
padding: 0 20px; padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 40px; margin-top: 40px;
} }
#fansInfoBox button { #fansInfoBox button {
background: none; background: none;
border: none; border: none;
background-color: #b50005; background-color: #b50005;
color: #fff; color: #fff;
width: 100%; width: 100%;
height: 40px; height: 40px;
border-radius: 2px; border-radius: 2px;
font-size: 14px; font-size: 14px;
}
#fansInfoBox #closeLabelFn{
background-color: #fff;
margin-top: 10px;
color: #b50005;
} }
#fansInfoBox #closeLabelFn {
background-color: #fff;
margin-top: 10px;
color: #b50005;
}
#fansInfoBox .editLabels { #fansInfoBox .editLabels {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
display: none; display: none;
} }
#fansInfoBox .editLabels input { #fansInfoBox .editLabels input {
flex: 1; flex: 1;
height: 100%; height: 100%;
border: 1px solid #eee; border: 1px solid #eee;
margin-right: 8px; margin-right: 8px;
box-sizing: border-box; box-sizing: border-box;
outline: none; outline: none;
-webkit-appearance: none; -webkit-appearance: none;
} }
#fansInfoBox .editLabels .iconfont { #fansInfoBox .editLabels .iconfont {
color: #b50005; color: #b50005;
} }
#fansInfoBox .telValue,#fansInfoBox .nameValue{ #fansInfoBox .telValue,
width: 100%; #fansInfoBox .nameValue {
border: none; width: 100%;
background: none; border: none;
font-size: 1em; background: none;
padding: 0; font-size: 1em;
color: #333; padding: 0;
} color: #333;
#fansInfoBox .fansInfoBox_label{ }
position: absolute;
top: 0; #fansInfoBox .fansInfoBox_label {
left: 0; position: absolute;
width: 100%; top: 0;
height: 100%; left: 0;
background: #eee; width: 100%;
display: none; height: 100%;
box-sizing: border-box; background: #eee;
} display: none;
#fansInfoBox .fansInfoBox_label .labelConent{ box-sizing: border-box;
background-color: #fff; }
padding: 10px;
border-bottom: 1px solid #ccc; #fansInfoBox .fansInfoBox_label .labelConent {
} background-color: #fff;
padding: 10px;
#fansInfoBox .fansInfoBox_label .tagInput{ border-bottom: 1px solid #ccc;
display: flex; }
}
#fansInfoBox .fansInfoBox_label .tagInput input{ #fansInfoBox .fansInfoBox_label .tagInput {
height: 24px; display: flex;
border: 1px solid #eee; }
box-sizing: border-box;
padding-left: 10px; #fansInfoBox .fansInfoBox_label .tagInput input {
flex:1; height: 24px;
border: 1px solid #eee;
} box-sizing: border-box;
padding-left: 10px;
#fansInfoBox .fansInfoBox_label .tagInput .addTag{ flex: 1;
width: 50px; }
height: 24px;
font-size: 12px; #fansInfoBox .fansInfoBox_label .tagInput .addTag {
margin-left: 10px; width: 50px;
} height: 24px;
#fansInfoBox .fansInfoBox_label .userTags{ font-size: 12px;
margin-bottom: 10px; margin-left: 10px;
background-color: #fff; }
}
#fansInfoBox .fansInfoBox_label .userTags span,.tagListBox span{ #fansInfoBox .fansInfoBox_label .userTags {
border: 1px solid rgba(181, 0, 5, 0.4); margin-bottom: 10px;
border-radius: 20px; background-color: #fff;
color: #b50005; }
font-size: 0.8em;
padding: 2px 8px; #fansInfoBox .fansInfoBox_label .userTags span,
margin: 2px; .tagListBox span {
margin-top: 10px; border: 1px solid rgba(181, 0, 5, 0.4);
display: inline-block; border-radius: 20px;
} color: #b50005;
#fansInfoBox .fansInfoBox_label .tagHistory span.unSelect{ font-size: 0.8em;
color: rgba(181, 0, 5, 0.4); padding: 2px 8px;
border: 1px solid #aaa; margin: 2px;
} margin-top: 10px;
#fansInfoBox .tagHistory{ display: inline-block;
}
padding: 10px;
box-sizing: border-box; #fansInfoBox .fansInfoBox_label .tagHistory span.unSelect {
} color: rgba(181, 0, 5, 0.4);
#fansInfoBox .tagHistory .title{ border: 1px solid #aaa;
color: #999; }
}
#fansInfoBox .tagListBox{ #fansInfoBox .tagHistory {
margin-top: 10px; padding: 10px;
box-sizing: border-box;
}
#fansInfoBox .tagHistory .title {
color: #999;
}
#fansInfoBox .tagListBox {
margin-top: 10px;
} }
#fansInfoBox .saveTagBtnBox { #fansInfoBox .saveTagBtnBox {
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 50px; margin-top: 50px;
} }
#fansInfoBox .saveTagBtnBox .close{
background-color: #fff; #fansInfoBox .saveTagBtnBox .close {
color: #b50005; background-color: #fff;
margin-top: 10px; color: #b50005;
margin-top: 10px;
} }
\ No newline at end of file \ No newline at end of file
#queryFansBox { #queryFansBox {
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 100000000; z-index: 100000000;
display: none; display: none;
} }
.queryBtn { .queryBtn {
width: 30px; width: 30px;
height: 30px; height: 30px;
position: absolute; position: absolute;
top: 20px; top: 20px;
right: 20px; right: 20px;
} }
.qeruySection { .qeruySection {
width: 100%; width: 100%;
height: 46px; height: 46px;
background-color: #efefef; background-color: #efefef;
display: flex; display: flex;
padding: 8px; padding: 8px;
box-sizing: border-box; box-sizing: border-box;
} }
.qeruySection>div:first-child { .qeruySection>div:first-child {
background-color: #fff; background-color: #fff;
height: 30px; height: 30px;
padding-left: 20px; padding-left: 20px;
border-radius: 4px; border-radius: 4px;
flex: 1; flex: 1;
} }
.qeruySection>div:first-child>div{
margin-top: 5px; .qeruySection>div:first-child>div {
height: 20px; margin-top: 5px;
position: relative; height: 20px;
/* background-color: red; */ position: relative;
/* background-color: red; */
} }
.qeruySection>div:nth-child(2) { .qeruySection>div:nth-child(2) {
width: 50px; width: 50px;
text-align: center; text-align: center;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.qeruySection>div:nth-child(2) .icon-duihao{
color: #1AAD19; .qeruySection>div:nth-child(2) .icon-duihao {
display: none; color: #1AAD19;
display: none;
} }
.qeruySection>div:nth-child(2) button { .qeruySection>div:nth-child(2) button {
background: none; background: none;
border: none; border: none;
color: #1AAD19; color: #1AAD19;
height: 30px; height: 30px;
} }
.qeruySection>div:first-child .iconfont { .qeruySection>div:first-child .iconfont {
color: #999; color: #999;
font-size: 14px; font-size: 14px;
} }
#queryFansBox input { #queryFansBox input {
outline: none; outline: none;
-webkit-appearance: none; -webkit-appearance: none;
border: none; border: none;
background: none; background: none;
height: 100%; height: 100%;
width: calc(100% - 38px); width: calc(100% - 38px);
} }
.queryLabelsBox { .queryLabelsBox {
padding: 20px; padding: 20px;
} }
.queryLabelsBox .title { .queryLabelsBox .title {
text-align: center; text-align: center;
color: #999; color: #999;
font-size: 14px; font-size: 14px;
} }
.qeruySection .icon-guanbi{
position: absolute; .qeruySection .icon-guanbi {
right:10px; position: absolute;
top: 0; right: 10px;
font-size: 18px; top: 0;
display: none; font-size: 18px;
} display: none;
.queryLabelsBox .labelsList span{ }
border: 1px solid #1AAD19;
border-radius: 20px; .queryLabelsBox .labelsList span {
color: #1AAD19; border: 1px solid #1AAD19;
font-size: 0.8em; border-radius: 20px;
padding: 2px 8px; color: #1AAD19;
margin: 6px; font-size: 0.8em;
margin-top: 10px; padding: 2px 8px;
display: inline-block; margin: 6px;
} margin-top: 10px;
display: inline-block;
.queryFansItemBox{ }
display: flex;
padding: 10px 20px; .queryFansItemBox {
background-color: #fff; display: flex;
border-bottom: 1px solid #eee; padding: 10px 20px;
} background-color: #fff;
.queryFansItemBox .userLogo{ border-bottom: 1px solid #eee;
width: 36px; }
height: 36px;
border-radius: 50%; .queryFansItemBox .userLogo {
} width: 36px;
.queryFansItemBox .content{ height: 36px;
flex: 1; border-radius: 50%;
overflow: hidden; }
text-overflow: ellipsis;
white-space: nowrap; .queryFansItemBox .content {
} flex: 1;
.queryFansItemBox .content p{ overflow: hidden;
padding-left: 10px; text-overflow: ellipsis;
} white-space: nowrap;
.queryFansItemBox .content p:nth-child(2){ }
color: #999;
font-size: 0.8em; .queryFansItemBox .content p {
margin-top: 6px; padding-left: 10px;
width: 100%; }
overflow: hidden;
text-overflow: ellipsis; .queryFansItemBox .content p:nth-child(2) {
white-space: nowrap; color: #999;
} font-size: 0.8em;
.queryFansItemBox .lastTime{ margin-top: 6px;
color: #999; width: 100%;
font-size: 0.8em; overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.queryFansItemBox .lastTime {
color: #999;
font-size: 0.8em;
} }
\ No newline at end of file \ No newline at end of file
html, html,
body { body {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background-color: #efefef; background-color: #efefef;
} }
img[src=""],img[src="null"],img[src="undefined"]{
opacity: 0; img[src=""],
img[src="null"],
img[src="undefined"] {
opacity: 0;
} }
input,textarea{
outline: none; input,
-webkit-appearance: none; textarea {
outline: none;
-webkit-appearance: none;
} }
.icon-fanhuijiantou { .icon-fanhuijiantou {
font-size: 18px; font-size: 18px;
} }
#faceBox { #faceBox {
display: none; display: none;
} }
.isShow { .isShow {
/* display: none; */ /* display: none; */
} }
.topToolSBox { .topToolSBox {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 40px; height: 40px;
top: 0; top: 0;
left: 0; left: 0;
background: rgba(153, 153, 153, 0.5); background: rgba(153, 153, 153, 0.5);
padding-top: 5px; padding-top: 5px;
z-index: 198910141; z-index: 198910141;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
#backChat{
background: #fff; #backChat {
color: #666; background: #fff;
} color: #666;
.topToolSBox button{ }
width: 40%;
height: 30px; .topToolSBox button {
background-color: #b50005; width: 40%;
height: 30px;
border: none; background-color: #b50005;
border: none;
border-radius: 4px; border-radius: 4px;
color: #fff; color: #fff;
} }
.topToolSBox button.on{
background-color: #999;
color: #fff;
.topToolSBox button.on {
background-color: #999;
color: #fff;
} }
.dot { .dot {
position: absolute; position: absolute;
top: 2px; top: 2px;
left: 36px; left: 36px;
border-radius: 50%; border-radius: 50%;
background-color: red; background-color: red;
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
font-size: 8px !important; font-size: 8px !important;
text-align: center; text-align: center;
line-height: 16px; line-height: 16px;
color: #fff; color: #fff;
} }
.icon-xiaolian { .icon-xiaolian {
color: #666; color: #666;
font-size: 24px; font-size: 24px;
line-height: 40px; line-height: 40px;
padding-right: 4px; padding-right: 4px;
background-color: #fff; background-color: #fff;
} }
.model_box { .model_box {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: none; display: none;
text-align: center; text-align: center;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 198910141; z-index: 198910141;
color: #666; color: #666;
padding: 0 20px; padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.tip_box { .tip_box {
font-size: 24px; font-size: 24px;
} }
.tip_content_box { .tip_content_box {
font-size: 14px; font-size: 14px;
} }
.layim-chat-footer { .layim-chat-footer {
height: 50px; height: 50px;
} }
.layim-user-box { .layim-user-box {
display: flex; display: flex;
} }
.layim-chat-mine .layim-user-box { .layim-chat-mine .layim-user-box {
justify-content: flex-end; justify-content: flex-end;
} }
.moreFansBox{
background-color: #efefef; .moreFansBox {
padding: 10px !important; background-color: #efefef;
line-height: 28px; padding: 10px !important;
text-align: center; line-height: 28px;
text-align: center;
} }
.moreFansBox>span{
background-color: #fff; .moreFansBox>span {
color: #999; background-color: #fff;
padding: 4px 10px; color: #999;
border-radius: 4px; padding: 4px 10px;
border-radius: 4px;
} }
.username_box { .username_box {
display: inline-block; display: inline-block;
max-width: 100px; max-width: 100px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.time_box { .time_box {
margin: 0 20px; margin: 0 20px;
display: inline-block; display: inline-block;
} }
.layim-chat-main{ .layim-chat-main {
padding: 0 15px; padding: 0 15px;
} }
.layim-chat-main, .layim-chat-main,
.layim-content { .layim-content {
top: 10px; top: 10px;
/* bottom: 70px; */ /* bottom: 70px; */
} }
.contInfo img{
position: initial !important; .contInfo img {
width: 16px !important; position: initial !important;
height: 16px !important; width: 16px !important;
height: 16px !important;
} }
.isRobot{
display: none; .isRobot {
width: 100%; display: none;
background-color: #2f9833 !important; width: 100%;
background-color: #2f9833 !important;
} }
/* 加大列表行高 */ /* 加大列表行高 */
#chatListBox li{
padding: 10px 15px 10px 60px; #chatListBox li {
border-bottom: 1px solid #efefef; padding: 10px 15px 10px 60px;
border-bottom: 1px solid #efefef;
} }
.layui-layim-list li img{ .layui-layim-list li img {
top:13px; top: 13px;
} }
.layui-m-layerchild,.layim-panel, .layim-title,.layim-chat-main, .layim-content,.layui-layim,.layim-chat-footer,.layim-chat-main ul li,
.layui-layim-face,.layim-chat-user,.layim-chat-user cite,.layim-chat-text{ .layui-m-layerchild,
z-index: 1; .layim-panel,
.layim-title,
.layim-chat-main,
.layim-content,
.layui-layim,
.layim-chat-footer,
.layim-chat-main ul li,
.layui-layim-face,
.layim-chat-user,
.layim-chat-user cite,
.layim-chat-text {
z-index: 1;
} }
*{
z-index: 1; * {
z-index: 1;
} }
.pswp {
z-index: 1500000000;
}
.pswp{ @keyframes rotateZ {
z-index: 1500000000; 0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(360deg);
}
} }
.rotateZAnimated {
display: inline-block;
animation: rotateZ 1s infinite ease-out;
}
@keyframes rotateZ{ .rotateZAnimated .iconfont {
0%{ padding-right: 0 !important;
transform: rotateZ(0deg);
}
100%{
transform: rotateZ(360deg);
}
} }
.rotateZAnimated{ .icon-weibiaoti- {
display: inline-block; color: red;
animation: rotateZ 1s infinite ease-out;
} }
.rotateZAnimated .iconfont{
padding-right:0 !important; .editBox {
background-color: #fff;
line-height: 40px;
padding: 0 6px;
border-radius: 0 3px 3px 0;
position: relative;
} }
.icon-weibiaoti-{
color: red; .editBox i.on {
transform: rotateZ(0deg) !important;
} }
.editBox{
background-color: #fff;
line-height: 40px; /* 底部加号按钮相关 */
padding: 0 6px;
border-radius: 0 3px 3px 0; #chatBox .icon-guanbi {
position: relative; display: inline-block;
transform: rotateZ(45deg);
font-size: 24px;
color: #666;
transition: transform 0.2s;
} }
.editBox i.on{
transform: rotateZ(0deg) !important; .layim-chat-footer {
z-index: 2;
} }
/* 底部加号按钮相关 */
#chatBox .icon-guanbi{ .posStyle {
display: inline-block; position: absolute;
transform: rotateZ(45deg); bottom: 40px;
font-size: 24px; left: 0;
color: #666; display: none;
transition: transform 0.2s; }
}
.layim-chat-footer{ .posStyle:nth-child(2) {
z-index: 2; bottom: 80px;
} }
.posStyle{
position: absolute; .icon-xiangji,
bottom: 40px; .icon-fasonghongbaocopy {
left: 0; background-color: rgba(239, 239, 239, 0.5);
display: none; font-size: 24px;
line-height: 40px;
} padding: 0 6px;
.posStyle:nth-child(2){ color: #666;
bottom: 80px; }
}
.icon-xiangji,.icon-fasonghongbaocopy{ .bounceInUp {
animation: bounceInUp 0.3s;
background-color: rgba(239,239,239,0.5); }
font-size: 24px;
line-height: 40px; @keyframes bounceInUp {
padding: 0 6px; 0% {
color: #666; opacity: 0;
} -webkit-transform: translateY(2000px);
.bounceInUp{ transform: translateY(2000px)
animation: bounceInUp 0.3s; }
} 60% {
@keyframes bounceInUp{ opacity: 1;
0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)} -webkit-transform: translateY(-30px);
60%{opacity:1;-webkit-transform:translateY(-30px);transform:translateY(-30px)} transform: translateY(-30px)
80%{-webkit-transform:translateY(10px);transform:translateY(10px)} }
100%{-webkit-transform:translateY(0);transform:translateY(0)} 80% {
-webkit-transform: translateY(10px);
transform: translateY(10px)
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0)
}
} }
/* end */ /* end */
/* 楼盘卡片发送相关 */ /* 楼盘卡片发送相关 */
#floorListCard{
position: fixed; #floorListCard {
top: 0; position: fixed;
left: 0; top: 0;
width: 100%; left: 0;
height: 100%; width: 100%;
background: rgba(0, 0, 0, 0.5); height: 100%;
z-index: 100000000; background: rgba(0, 0, 0, 0.5);
display: none; z-index: 100000000;
align-items: center; display: none;
align-items: center;
}
#floorListCard .content{
width: 100%;
}
#floorListCard .closeBox{
margin-top: 30px;
text-align: center;
}
#floorListCard .content .icon-guanbi1{
font-size: 30px;
color: #eee;
}
#floorListCard ul{
background-color: #fff;
width: 80%;
margin: 0 auto;
border-radius: 4px;
padding: 10px;
box-sizing: border-box;
}
#floorListCard ul li{
height: 40px;
line-height: 40px;
color: #333;
font-size: 14px;
border-bottom: 1px solid #eee;
}
#floorListCard ul li span{
float: right;
display: block;
font-size: 14px;
background: #2f9833 !important;
height: 26px;
line-height: 26px;
color: #fff;
width: 48px;
text-align: center;
border-radius: 4px;
position: relative;
top: 6px;
}
.fadeInUp{
animation: fadeInUp 0.3s;
}
@keyframes fadeInUp{
0%{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}
100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}
}
[contenteditable]{
outline: none;
-webkit-appearance: none;
} }
#floorListCard .content {
width: 100%;
}
/* 搜索相关 */ #floorListCard .closeBox {
margin-top: 30px;
text-align: center;
}
.queryBtn{ #floorListCard .content .icon-guanbi1 {
width: 30px; font-size: 30px;
height: 30px; color: #eee;
line-height: 30px;
text-align: center;
position: absolute;
top: 20px;
right: 20px;
z-index: 2;
} }
#floorListCard ul {
background-color: #fff;
width: 80%;
margin: 0 auto;
border-radius: 4px;
padding: 10px;
box-sizing: border-box;
}
#floorListCard ul li {
height: 40px;
line-height: 40px;
color: #333;
font-size: 14px;
border-bottom: 1px solid #eee;
}
#floorListCard ul li span {
float: right;
display: block;
font-size: 14px;
background: #2f9833 !important;
height: 26px;
line-height: 26px;
color: #fff;
width: 48px;
text-align: center;
border-radius: 4px;
position: relative;
top: 6px;
}
.fadeInUp {
animation: fadeInUp 0.3s;
}
@keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(20px);
transform: translateY(20px)
}
100% {
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0)
}
}
[contenteditable] {
outline: none;
-webkit-appearance: none;
}
/* 搜索相关 */
.queryBtn {
width: 30px;
height: 30px;
line-height: 30px;
text-align: center;
position: absolute;
top: 20px;
right: 20px;
z-index: 2;
}
\ No newline at end of file \ No newline at end of file
html { html {
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
} }
* { * {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
font-weight:300; font-weight: 300;
} }
input[type="submit"], input[type="submit"],
input[type="reset"], input[type="reset"],
input[type="button"], input[type="button"],
input { input {
-webkit-appearance: none; -webkit-appearance: none;
resize: none; resize: none;
} }
body, body,
div, div,
ul, ul,
...@@ -57,7 +56,7 @@ hgroup, ...@@ -57,7 +56,7 @@ hgroup,
menu, menu,
nav, nav,
section { section {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
article, article,
...@@ -71,16 +70,14 @@ hgroup, ...@@ -71,16 +70,14 @@ hgroup,
menu, menu,
nav, nav,
section { section {
display: block; display: block;
} }
img { img {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
width: auto\9; width: auto\9;
-ms-interpolation-mode: bicubic;
-ms-interpolation-mode: bicubic;
} }
body, body,
...@@ -121,114 +118,135 @@ hgroup, ...@@ -121,114 +118,135 @@ hgroup,
menu, menu,
nav, nav,
section { section {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: none; border: none;
} }
body { body {
font-family: '΢ź', Microsoft YaHei, Tahoma, Arial, sans-serif; font-family: '΢���ź�', Microsoft YaHei, Tahoma, Arial, sans-serif;
color: #555; color: #555;
background-color: #eee; background-color: #eee;
} }
em, em,
i { i {
font-style: normal; font-style: normal;
} }
li{
list-style:none; li {
list-style: none;
} }
strong { strong {
font-weight: normal; font-weight: normal;
} }
.clearfix:after { .clearfix:after {
content: ""; content: "";
display: block; display: block;
visibility: hidden; visibility: hidden;
height: 0; height: 0;
clear: both; clear: both;
} }
.clearfix { .clearfix {
zoom: 1; zoom: 1;
} }
.fl { .fl {
float: left; float: left;
} }
.fr { .fr {
float: right; float: right;
} }
a { a {
text-decoration: none; text-decoration: none;
color: #969696; color: #969696;
cursor:pointer; cursor: pointer;
font-family: Microsoft YaHei, Tahoma, Arial, sans-serif; font-family: Microsoft YaHei, Tahoma, Arial, sans-serif;
} }
a:hover { a:hover {
color: #e74850; color: #e74850;
text-decoration: none; text-decoration: none;
} }
ul, ul,
ol { ol {
list-style: none; list-style: none;
} }
h1, h1,
h2, h2,
h3, h3,
h4, h4,
h5, h5,
h6 { h6 {
font-size: 100%; font-size: 100%;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
} }
img { img {
border: none; border: none;
vertical-align: middle; vertical-align: middle;
} }
.wrap { .wrap {
min-width: 320px; min-width: 320px;
max-width: 640px; max-width: 640px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
position: relative; position: relative;
} }
@media screen and (max-width: 360px) { @media screen and (max-width: 360px) {
html { html {
font-size: 13px; font-size: 13px;
} }
} }
@media (min-width: 360px) and (max-width: 400px) { @media (min-width: 360px) and (max-width: 400px) {
html { html {
font-size: 15px; font-size: 15px;
} }
} }
@media (min-width: 400px) and (max-width: 480px) { @media (min-width: 400px) and (max-width: 480px) {
html { html {
font-size: 15px; font-size: 15px;
} }
} }
@media screen and (min-width: 481px) { @media screen and (min-width: 481px) {
html { html {
font-size: 18px; font-size: 18px;
} }
} }
.bindingbox{
width:92%; .bindingbox {
margin:2rem auto; width: 92%;
margin: 2rem auto;
} }
.bindingbos{
overflow:hidden; .bindingbos {
line-height:3.6rem; overflow: hidden;
clear:both; line-height: 3.6rem;
font-size:1.04rem; clear: both;
border:1px solid #eee; font-size: 1.04rem;
border-radius:4px; border: 1px solid #eee;
padding:0 0.6rem; border-radius: 4px;
margin-bottom:1.7rem; padding: 0 0.6rem;
margin-bottom: 1.7rem;
} }
input:focus{
outline:none; input:focus {
outline: none;
} }
/* .bindingbox p{ /* .bindingbox p{
clear:both; clear:both;
font-size:0.9rem; font-size:0.9rem;
...@@ -237,64 +255,71 @@ input:focus{ ...@@ -237,64 +255,71 @@ input:focus{
margin-bottom:0.3rem; margin-bottom:0.3rem;
visibility: hidden; visibility: hidden;
} */ } */
.bindingbos span{
float:left; .bindingbos span {
color:#333; float: left;
} color: #333;
.bindingbos input{ }
float:left;
line-height:2rem; .bindingbos input {
margin-top:0.8rem; float: left;
width:-webkit-calc(100% - 4.5rem); line-height: 2rem;
width:-moz-calc(100% - 4.5rem); margin-top: 0.8rem;
width:calc(100% - 4.5rem); width: -webkit-calc(100% - 4.5rem);
color:#666; width: -moz-calc(100% - 4.5rem);
} width: calc(100% - 4.5rem);
#getcode{ color: #666;
padding: 0 1rem; }
line-height: 2.8rem;
position:absolute; #getcode {
top:0.4rem; padding: 0 1rem;
right:0.4rem; line-height: 2.8rem;
color: #000; position: absolute;
border-radius: 2px; top: 0.4rem;
font-size: 0.9rem; right: 0.4rem;
color: #000;
border-radius: 2px;
font-size: 0.9rem;
pointer-events: auto; pointer-events: auto;
width:7rem; width: 7rem;
color: #0069FE; color: #0069FE;
background-color: #fff; background-color: #fff;
border:1px solid #0069FE; border: 1px solid #0069FE;
} }
.sumbitbtn{
.sumbitbtn {
display: block; display: block;
width:100%; width: 100%;
background-color:#006FF8; background-color: #006FF8;
color:#fff; color: #fff;
text-align: center; text-align: center;
line-height:3.2rem; line-height: 3.2rem;
border-radius:4px; border-radius: 4px;
font-size:1.04rem; font-size: 1.04rem;
} }
.sumbitbtn:hover, .sumbitbtn:hover,
.sumbitbtn:active{ .sumbitbtn:active {
color:#fff; color: #fff;
} }
.bindinged{
line-height:2.8rem; .bindinged {
font-size:1.04rem; line-height: 2.8rem;
text-align:center; font-size: 1.04rem;
color:#666; text-align: center;
margin-top:20%; color: #666;
margin-top: 20%;
} }
.bindinged h4{
color:#119323; .bindinged h4 {
font-size:1.2rem; color: #119323;
margin-bottom:2rem; font-size: 1.2rem;
} margin-bottom: 2rem;
.bindinged i{ }
font-size:1.6rem;
display:inline-block; .bindinged i {
vertical-align:bottom; font-size: 1.6rem;
margin-right:0.4rem; display: inline-block;
vertical-align: bottom;
margin-right: 0.4rem;
} }
\ No newline at end of file \ No newline at end of file

25.4 KB | 宽: | 高:

50.4 KB | 宽: | 高:

WebContent/WEB-INF/res/images/logo.png
WebContent/WEB-INF/res/images/logo.png
WebContent/WEB-INF/res/images/logo.png
WebContent/WEB-INF/res/images/logo.png
  • 两方对比
  • 交换覆盖
  • 透明覆盖
var navs2 = [{ var navs2 = [{
"title": "商品管理", "title": "商品管理",
"icon": "icon-xiangmu", "icon": "icon-shangpin",
"href": "/zzhnc/goods/goodsList" "href": "/zzhnc/goods/goodsList"
}, },
{ {
"title": "活动介绍", "title": "活动介绍",
"icon": "icon-haibao1", "icon": "icon-huodong",
"href": "/zzhnc/activity/activityList" "href": "/zzhnc/activity/activityList"
}, },
{ {
...@@ -15,16 +15,21 @@ var navs2 = [{ ...@@ -15,16 +15,21 @@ var navs2 = [{
}, },
{ {
"title": "奖品管理", "title": "奖品管理",
"icon": "icon-xiaoshou1", "icon": "icon-huodong1",
"href": "/zzhnc/prize/prizeList" "href": "/zzhnc/prize/prizeList"
}, },
{ {
"title": "商家管理",
"icon": "icon-icon-yxj-empty-store",
"href": "/zzhnc/seller/sellerList"
},
{
"title": "报表", "title": "报表",
"icon": "icon-baobiao1", "icon": "icon-xiaoshou",
"children":[ "children":[
{ {
"title": "商品报表", "title": "商品报表",
"icon": "icon-kefu", "icon": "icon-shangpin",
"href": "/zzhnc/report/goods" "href": "/zzhnc/report/goods"
}, },
{ {
...@@ -37,8 +42,6 @@ var navs2 = [{ ...@@ -37,8 +42,6 @@ var navs2 = [{
"icon": "icon-jiangpin", "icon": "icon-jiangpin",
"href": "/zzhnc/report/prize" "href": "/zzhnc/report/prize"
} }
] ]
} }
......
Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
请先完成此消息的编辑!