Skip to content
切换导航面板
项目
群组
代码片段
帮助
zhangtai
/
zzhnc
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
文件
提交
分支
标签
贡献者
图像
比较
图表
Commit 2c000be1
由
沈姿.前端(已离职)
编写于
Dec 27, 2017
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'shenzi'
2 个父辈
f40c3b96
7fefcc95
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
181 行增加
和
259 行删除
WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp
WebContent/WEB-INF/jsp/pc/banner/bannerList.jsp
WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp
WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp
WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp
WebContent/WEB-INF/jsp/pc/autoresponse/autoresponse.jsp
查看文件 @
2c000be
...
...
@@ -68,8 +68,8 @@
<script
src=
"/zzhnc/res/js/me.js"
></script>
<script>
layui
.
use
([
'form'
,
'element'
,
'laydate'
,
'layer'
,
'laypage'
],
function
()
{
var
form
=
layui
.
form
()
,
element
=
layui
.
element
()
,
var
form
=
layui
.
form
,
element
=
layui
.
element
,
laydate
=
layui
.
laydate
,
layer
=
layui
.
layer
,
laypage
=
layui
.
laypage
;
...
...
@@ -77,52 +77,10 @@
//查询条件
var
queryObj
=
{
page
:
1
,
projectId
:
""
,
keyword
:
null
,
isRedirectStaff
:
null
}
//查询操作
form
.
on
(
'submit(querybtn)'
,
function
(
data
)
{
queryObj
=
data
.
field
;
queryObj
.
page
=
1
;
initdata
(
queryObj
);
form
.
render
();
});
//重置操作
$
(
".resetBtn"
).
on
(
"click"
,
function
()
{
$
(
"input[name=keyword]"
).
val
(
""
);
form
.
render
();
queryObj
.
keyword
=
null
;
queryObj
.
isRedirectStaff
=
null
;
queryObj
.
projectId
=
null
,
initdata
(
queryObj
);
})
//发布操作
$
(
".publicBtn"
).
on
(
"click"
,
function
()
{
$
.
get
(
"/zzhnc/autoreply/publish"
,
function
(
data
)
{
var
data
=
JSON
.
parse
(
data
)
if
(
data
.
code
==
0
)
{
top
.
layer
.
msg
(
"发布成功!"
);
}
else
{
top
.
layer
.
msg
(
data
.
msg
);
}
})
})
//发布按钮提示信息
$
(
".publicBtn"
).
on
(
"mouseenter"
,
function
()
{
layer
.
tips
(
'添加或修改完关键字后,需要进行发布,以使新添加或修改的关键字生效。'
,
".publicBtn"
,
{
tips
:
[
1
,
'#3595CC'
],
time
:
4000
});
})
//初始化数据
initdata
(
queryObj
);
//页面初始化
function
initdata
(
queryObj
)
{
$
.
post
(
"/zzhnc/autoreply/getAutoreplyList"
,
queryObj
,
function
(
data
)
{
...
...
@@ -165,7 +123,48 @@
})
}
//初始化数据
initdata
(
queryObj
);
//查询操作
form
.
on
(
'submit(querybtn)'
,
function
(
data
)
{
queryObj
=
data
.
field
;
queryObj
.
page
=
1
;
initdata
(
queryObj
);
form
.
render
();
});
//重置操作
$
(
".resetBtn"
).
on
(
"click"
,
function
()
{
$
(
"input[name=keyword]"
).
val
(
""
);
form
.
render
();
queryObj
.
keyword
=
null
;
queryObj
.
isRedirectStaff
=
null
;
queryObj
.
projectId
=
null
,
initdata
(
queryObj
);
})
//发布操作
$
(
".publicBtn"
).
on
(
"click"
,
function
()
{
$
.
get
(
"/zzhnc/autoreply/publish"
,
function
(
data
)
{
var
data
=
JSON
.
parse
(
data
)
if
(
data
.
code
==
0
)
{
top
.
layer
.
msg
(
"发布成功!"
);
}
else
{
top
.
layer
.
msg
(
data
.
msg
);
}
})
})
//发布按钮提示信息
$
(
".publicBtn"
).
on
(
"mouseenter"
,
function
()
{
layer
.
tips
(
'添加或修改完关键字后,需要进行发布,以使新添加或修改的关键字生效。'
,
".publicBtn"
,
{
tips
:
[
1
,
'#3595CC'
],
time
:
4000
});
})
//添加关键字
$
(
document
).
on
(
"click"
,
".createBtn"
,
function
()
{
layer
.
open
({
...
...
@@ -265,7 +264,7 @@
})
})
//删除
项目
//删除
关键字
$
(
document
).
on
(
"click"
,
".deleteBtn"
,
function
()
{
var
id
=
$
(
this
).
parents
(
"tr"
).
attr
(
"data-id"
);
layer
.
confirm
(
'您确定要删除该关键字吗?'
,
{
...
...
WebContent/WEB-INF/jsp/pc/banner/bannerList.jsp
查看文件 @
2c000be
...
...
@@ -45,7 +45,7 @@
<legend>
banner图片展示
</legend>
</fieldset>
<div
class=
"bannerShow"
>
</div>
<div
class=
"nodata"
>
暂无banner图,请上传banner图片。
</div>
</body>
...
...
@@ -58,6 +58,34 @@
upload
=
layui
.
upload
,
layer
=
layui
.
layer
;
//初始化数据
function
initData
()
{
$
.
get
(
"/zzhnc/banner/list"
,
{
url
:
"1"
},
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
length
>
0
)
{
$
(
".nodata"
).
hide
()
$
(
".bannerShow"
).
html
(
""
);
var
str
=
""
;
for
(
var
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
str
+=
'<div class="item" >'
+
'<img src="'
+
res
.
data
[
i
].
imageUrl
+
'" />'
+
'<i class="layui-icon" data-id="'
+
res
.
data
[
i
].
id
+
'" id="deleteBtn">ဇ</i>'
+
'</div>'
;
}
$
(
".bannerShow"
).
html
(
str
);
}
else
{
$
(
".nodata"
).
show
()
}
}
})
}
initData
();
//上传图片
upload
.
render
({
url
:
'/zzhnc/upload/UploadImg'
,
...
...
@@ -65,33 +93,29 @@
method
:
'post'
,
done
:
function
(
res
)
{
if
(
res
.
code
==
0
)
{
$
.
post
(
"/zzhnc/banner/add"
,{
$
.
post
(
"/zzhnc/banner/add"
,
{
url
:
res
.
data
},
function
(
res
){
},
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
0
){
$
(
".bannerShow"
).
show
()
$
(
".nodata"
).
hide
()
var
str
=
'<div class="item">'
+
'<img src="'
+
res
.
data
+
'" />'
+
'<i class="layui-icon" id="deleteBtn">ဇ</i>'
+
'</div>'
;
$
(
".bannerShow"
).
append
(
str
);
if
(
res
.
code
==
0
)
{
layer
.
msg
(
"添加成功!"
)
initData
()
}
})
}
}
});
//删除banner图
$
(
document
).
on
(
"click"
,
"#deleteBtn"
,
function
()
{
var
id
=
$
(
this
).
data
(
"id"
);
$
.
get
(
"/zzhnc/banner/"
+
id
+
"/delete"
,
""
,
function
(
res
)
{
$
.
get
(
"/zzhnc/banner/"
+
id
+
"/delete"
,
""
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
0
){
layer
.
alert
(
'删除成功!'
);
}
else
{
layer
.
alert
(
'删除失败!'
);
if
(
res
.
code
==
0
)
{
layer
.
msg
(
'删除成功!'
);
initData
()
}
else
{
layer
.
msg
(
'删除失败!'
);
}
})
})
...
...
WebContent/WEB-INF/jsp/pc/goods/goodsEdit.jsp
查看文件 @
2c000be
...
...
@@ -11,152 +11,76 @@
<link
rel=
"stylesheet"
href=
"/zzhnc/res/plugins/layui/css/layui.css"
>
<link
rel=
"stylesheet"
href=
"/zzhnc/res/css/basic.css"
>
<style
type=
"text/css"
>
.activity-rule-box
{
padding-left
:
20px
;
}
#myEditor
img
{
width
:
80%
;
}
#myEditor
{
margin
:
0
!important
;
}
.layui-form-select
dl
{
max-height
:
190px
;
}
#allmap
{
top
:
10px
;
width
:
100%
;
height
:
400px
;
overflow
:
hidden
;
margin
:
0
;
}
.layui-upload-list
{
width
:
200px
;
max-height
:
200px
;
overflow
:
hidden
;
clear
:
both
;
border-radius
:
4px
;
}
.layui-upload-list
img
{
width
:
100%
;
margin-top
:
15px
;
}
#connect-container
{
float
:
left
;
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%
;
.red
{
color
:
red
;
margin-right
:
5px
;
}
</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>
<form
class=
"layui-form"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</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-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
class=
"layui-form-mid layui-word-aux"
>
不超过20个汉字
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</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-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
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</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
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
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</i>
所属商家
</label>
<div
class=
"layui-input-inline"
style=
"width: 390px;"
>
<
input
type=
"text"
name=
"subtitle"
lay-verify=
"title"
placeholder=
"商品所属商家"
class=
"layui-input
"
>
</div
>
</div
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</i>
商家店铺号
</label
>
<div
class=
"layui-input-inline"
style=
"width: 390px;"
>
<
input
type=
"text"
name=
"subtitle"
lay-verify=
"title"
placeholder=
"商家店铺号"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"red"
>
*
</i>
详细信息
</label>
<div
class=
"layui-input-block"
>
<!-- 加载编辑器的容器 -->
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
这里写你的初始化内容
</script>
<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>
</form>
</div>
</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>
</form>
</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
type=
"text/javascript"
src=
"/zzhnc/res/UE/ueditor.config.js"
></script>
<script
type=
"text/javascript"
src=
"/zzhnc/res/UE/ueditor.all.js"
></script>
<script>
window
.
onload
=
function
()
{
UE
.
Editor
.
prototype
.
_bkGetActionUrl
=
UE
.
Editor
.
prototype
.
getActionUrl
;
...
...
@@ -169,25 +93,20 @@
}
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
,
layui
.
use
([
'form'
,
'element'
,
'layer'
,
'laypage'
,
'upload'
],
function
()
{
var
form
=
layui
.
form
,
element
=
layui
.
element
,
layer
=
layui
.
layer
,
laypage
=
layui
.
laypage
;
var
$
=
layui
.
jquery
,
laypage
=
layui
.
laypage
,
upload
=
layui
.
upload
;
//普通图片上传
//普通图片上传
var
uploadInst
=
upload
.
render
({
upload
.
render
({
elem
:
'#upload'
,
url
:
'/zzhnc/upload/UploadImg'
,
done
:
function
(
data
)
{
...
...
@@ -197,13 +116,9 @@
$
(
"input[name=imgurl]"
).
val
(
imgurl
);
$
(
".mainpictrue"
).
attr
(
"src"
,
imgurl
);
}
else
{
layer
.
msg
(
'上传失败'
);
}
//如果上传失败
if
(
data
.
code
>
0
)
{
return
layer
.
msg
(
'上传失败'
);
}
//上传成功
}
});
...
...
@@ -223,7 +138,6 @@
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
));
...
...
@@ -297,10 +211,4 @@
})
</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>
\ No newline at end of file
WebContent/WEB-INF/jsp/pc/goods/goodsList.jsp
查看文件 @
2c000be
...
...
@@ -10,44 +10,33 @@
<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"
style=
"width: 140px;"
>
<div
class=
"layui-input-inline"
>
<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"
>

</i>
添加
文章
</a>
<a
class=
"layui-btn layui-btn-warm createBtn"
href=
"#"
><i
class=
"layui-icon"
>

</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: 120px;"
>
图片链接
</th>
<th
style=
"min-width: 80px;"
>
更新时间
</th>
<th
style=
"min-width: 80px;"
>
操作
</th>
<th>
No
</th>
<th>
商品主图
</th>
<th>
商品标题
</th>
<th>
商品副标题
</th>
<th>
所属商家
</th>
<th>
商家店铺号
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablelist"
>
</tbody>
</table>
<div
class=
"nodata"
>
暂无数据
</div>
...
...
@@ -71,28 +60,7 @@
pagesize
:
10
,
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
)
return
false
})
//初始化数据
initdata
(
queryObj
);
function
initdata
(
queryObj
)
{
$
.
post
(
"/zzhnc/article/getArticlesList"
,
queryObj
,
function
(
data
)
{
...
...
@@ -135,6 +103,29 @@
})
}
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
)
return
false
})
//初始化数据
initdata
(
queryObj
);
//添加文章
$
(
document
).
on
(
"click"
,
".createBtn"
,
function
()
{
if
(
parent
.
tab
.
exists
(
"添加文章"
)
>
0
)
{
...
...
WebContent/WEB-INF/jsp/pc/prize/prizeList.jsp
查看文件 @
2c000be
...
...
@@ -326,7 +326,7 @@
layer
=
layui
.
layer
,
laypage
=
layui
.
laypage
;
$
.
pos
t
(
"/zzhnc/activity/getActivitySetting"
,
function
(
data
)
{
$
.
ge
t
(
"/zzhnc/activity/getActivitySetting"
,
function
(
data
)
{
console
.
log
(
data
)
if
(
data
.
code
==
0
)
{
//基本信息
...
...
编写
预览
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论