Skip to content
切换导航面板
项目
群组
代码片段
帮助
zhangtai
/
zzhnc
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
文件
提交
分支
标签
贡献者
图像
比较
图表
Commit 5167e49a
由
zxt@theyeasy.com
编写于
Jan 02, 2018
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge branch 'master' into zxt
2 个父辈
e65ec6bb
ce7c4106
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
49 行增加
和
19 行删除
WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp
WebContent/WEB-INF/jsp/pc/activity/activityList.jsp
WebContent/WEB-INF/jsp/pc/index.jsp
WebContent/WEB-INF/jsp/pc/report/fans.jsp
WebContent/WEB-INF/jsp/pc/activity/activityEdit.jsp
查看文件 @
5167e49
...
@@ -28,18 +28,27 @@
...
@@ -28,18 +28,27 @@
max-width
:
80%
;
max-width
:
80%
;
}
}
</style>
</style>
<script
src=
"http://cdn.sockjs.org/sockjs-0.3.min.js"
></script>
<body
class=
"wrap"
>
<body
class=
"wrap"
>
<div
class=
"layui-form"
>
<div
class=
"layui-form"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<i
class=
"redrequired"
>
*
</i>
文章标题
</label>
<label
class=
"layui-form-label"
>
文章标题
</label>
<div
class=
"layui-input-inline"
style=
"width: 400px;"
>
<div
class=
"layui-input-inline"
style=
"width: 400px;"
>
<input
type=
"text"
name=
"title"
lay-verify=
"required|title"
placeholder=
"文章标题"
class=
"layui-input"
>
<input
type=
"text"
name=
"title"
lay-verify=
"required|title"
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
class=
"redrequired"
>
*
</i>
专区类型
</label>
<div
class=
"layui-input-inline"
style=
"width: 400px;"
>
<select
name=
"type"
lay-verify=
"required"
>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
活动预告
</option>
<option
value=
"2"
>
福利专区
</option>
</select>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
><i
class=
"redrequired"
>
*
</i>
上传主图
</label>
<label
class=
"layui-form-label"
><i
class=
"redrequired"
>
*
</i>
上传主图
</label>
<div
class=
"layui-input-inline"
style=
"width: 400px;"
>
<div
class=
"layui-input-inline"
style=
"width: 400px;"
>
<div
class=
"layui-upload"
>
<div
class=
"layui-upload"
>
...
@@ -52,8 +61,8 @@
...
@@ -52,8 +61,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
style=
"display: none"
>
<label
class=
"layui-form-label"
>
<i
class=
"redrequired"
>
*
</i>
文章内容
</label>
<label
class=
"layui-form-label"
>
文章内容
</label>
<div
class=
"layui-input-block"
style=
"margin-left: 130px;"
>
<div
class=
"layui-input-block"
style=
"margin-left: 130px;"
>
<!-- 加载编辑器的容器 -->
<!-- 加载编辑器的容器 -->
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
<script
id=
"container"
name=
"content"
type=
"text/plain"
>
...
@@ -75,7 +84,7 @@
...
@@ -75,7 +84,7 @@
<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>
window
.
onload
=
function
()
{
/*
window.onload = function() {
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
UE.Editor.prototype.getActionUrl = function(action) {
UE.Editor.prototype.getActionUrl = function(action) {
if(action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
if(action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
...
@@ -89,8 +98,7 @@
...
@@ -89,8 +98,7 @@
var ue = UE.getEditor('container', {
var ue = UE.getEditor('container', {
autoHeight: false
autoHeight: false
});
});
}*/
}
layui
.
use
([
'form'
,
'element'
,
'layer'
,
'upload'
],
function
()
{
layui
.
use
([
'form'
,
'element'
,
'layer'
,
'upload'
],
function
()
{
var
form
=
layui
.
form
,
var
form
=
layui
.
form
,
...
@@ -108,9 +116,10 @@
...
@@ -108,9 +116,10 @@
console
.
log
(
data
);
console
.
log
(
data
);
if
(
data
.
code
==
0
)
{
if
(
data
.
code
==
0
)
{
$
(
"[name=title]"
).
val
(
data
.
data
.
title
);
$
(
"[name=title]"
).
val
(
data
.
data
.
title
);
UE
.
getEditor
(
"container"
).
ready
(
function
()
{
/*
UE.getEditor("container").ready(function() {
UE.getEditor("container").setContent(unescape(data.data.content));
UE.getEditor("container").setContent(unescape(data.data.content));
})
})*/
$
(
"[name=type]"
).
val
(
data
.
data
.
type
);
$
(
"[name=imgurl]"
).
val
(
data
.
data
.
imgurl
);
$
(
"[name=imgurl]"
).
val
(
data
.
data
.
imgurl
);
$
(
".mainpictrue"
).
attr
(
"src"
,
data
.
data
.
imgurl
).
css
(
"margin-top"
,
"15px"
);
$
(
".mainpictrue"
).
attr
(
"src"
,
data
.
data
.
imgurl
).
css
(
"margin-top"
,
"15px"
);
form
.
render
();
form
.
render
();
...
@@ -141,9 +150,10 @@
...
@@ -141,9 +150,10 @@
//提交
//提交
form
.
on
(
'submit(submit)'
,
function
(
data
)
{
form
.
on
(
'submit(submit)'
,
function
(
data
)
{
var
title
=
$
(
"[name=title]"
).
val
();
var
title
=
$
(
"[name=title]"
).
val
();
var
content
=
UE
.
getEditor
(
'container'
).
getContent
();
//
var content = UE.getEditor('container').getContent();
var
imgurl
=
$
(
"[name=imgurl]"
).
val
();
var
imgurl
=
$
(
"[name=imgurl]"
).
val
();
if
(
title
==
""
)
{
var
type
=
$
(
"[name=type]"
).
val
();
/*if(title == "") {
top.layer.msg("请填写文章标题");
top.layer.msg("请填写文章标题");
return false;
return false;
} else {
} else {
...
@@ -151,21 +161,30 @@
...
@@ -151,21 +161,30 @@
top.layer.msg("文章标题不超过20个汉字");
top.layer.msg("文章标题不超过20个汉字");
return false;
return false;
}
}
}*/
if
(
strlen
(
title
)
>
40
)
{
top
.
layer
.
msg
(
"文章标题不超过20个汉字"
);
return
false
;
}
if
(
type
<
1
){
top
.
layer
.
msg
(
"请选择专区类型"
);
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;
}
}
*/
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,
type
:
type
,
imgurl
:
imgurl
imgurl
:
imgurl
},
function
(
data
)
{
},
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -179,7 +198,8 @@
...
@@ -179,7 +198,8 @@
//添加项目
//添加项目
$
.
post
(
"/zzhnc/article/addArticle"
,
{
$
.
post
(
"/zzhnc/article/addArticle"
,
{
title
:
title
,
title
:
title
,
content
:
content
,
//content: content,
type
:
type
,
imgurl
:
imgurl
imgurl
:
imgurl
},
function
(
data
)
{
},
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -197,7 +217,8 @@
...
@@ -197,7 +217,8 @@
//重置
//重置
$
(
".resetBtn"
).
on
(
"click"
,
function
()
{
$
(
".resetBtn"
).
on
(
"click"
,
function
()
{
$
(
"[name=title]"
).
val
(
""
);
$
(
"[name=title]"
).
val
(
""
);
$
(
"[name=content]"
).
val
(
""
);
//$("[name=content]").val("");
$
(
"[name=type]"
).
val
(
""
);
$
(
"[name=imgurl]"
).
val
(
""
);
$
(
"[name=imgurl]"
).
val
(
""
);
$
(
".mainpictrue"
).
attr
(
"src"
,
""
).
css
(
"margin-top"
,
"0"
);
$
(
".mainpictrue"
).
attr
(
"src"
,
""
).
css
(
"margin-top"
,
"0"
);
form
.
render
();
form
.
render
();
...
...
WebContent/WEB-INF/jsp/pc/activity/activityList.jsp
查看文件 @
5167e49
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<th>
No
</th>
<th>
No
</th>
<th
style=
"width: 130px;"
>
主图
</th>
<th
style=
"width: 130px;"
>
主图
</th>
<th>
标题
</th>
<th>
标题
</th>
<th>
类型
</th>
<th>
更新时间
</th>
<th>
更新时间
</th>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
...
@@ -74,6 +75,7 @@
...
@@ -74,6 +75,7 @@
'<td>'
+
((
data
.
page
-
1
)
*
data
.
pageSize
+
i
+
1
)
+
'</td>'
+
'<td>'
+
((
data
.
page
-
1
)
*
data
.
pageSize
+
i
+
1
)
+
'</td>'
+
'<td><img src="'
+
data
.
rows
[
i
].
imgurl
+
'" style="width: 100px; height: 100px;" /></td>'
+
'<td><img src="'
+
data
.
rows
[
i
].
imgurl
+
'" style="width: 100px; height: 100px;" /></td>'
+
'<td>'
+
data
.
rows
[
i
].
title
+
'</td>'
+
'<td>'
+
data
.
rows
[
i
].
title
+
'</td>'
+
'<td>'
+
toType
(
data
.
rows
[
i
].
type
)
+
'</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-sm updataBtn">修改</a>'
+
'<a href="#" class="layui-btn layui-btn-sm updataBtn">修改</a>'
+
...
@@ -170,6 +172,15 @@
...
@@ -170,6 +172,15 @@
layer
.
close
(
index
);
layer
.
close
(
index
);
});
});
});
});
//专区类型转换
function
toType
(
t
){
if
(
t
==
1
){
return
t
=
"活动介绍"
}
else
{
return
t
=
"福利专区"
}
}
})
})
</script>
</script>
...
...
WebContent/WEB-INF/jsp/pc/index.jsp
查看文件 @
5167e49
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +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/layout.css"
>
<link
rel=
"stylesheet"
href=
"/zzhnc/res/css/layout.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_450595_ifme6z69cizwu3di.css"
>
<link
rel=
"stylesheet"
href=
"http
s
://at.alicdn.com/t/font_450595_ifme6z69cizwu3di.css"
>
<style>
<style>
#chromeTip
{
#chromeTip
{
position
:
fixed
;
position
:
fixed
;
...
...
WebContent/WEB-INF/jsp/pc/report/fans.jsp
查看文件 @
5167e49
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
<th>
No
</th>
<th>
No
</th>
<th>
头像昵称
</th>
<th>
头像昵称
</th>
<th>
地区
</th>
<th>
地区
</th>
<th>
上级粉丝
</th>
<th>
小程序 openid
</th>
<th>
小程序 openid
</th>
<th>
创建时间
</th>
<th>
创建时间
</th>
<th>
上次登录时间
</th>
<th>
上次登录时间
</th>
...
@@ -70,7 +69,6 @@
...
@@ -70,7 +69,6 @@
'<td>'
+
((
data
.
page
-
1
)
*
data
.
pageSize
+
i
+
1
)
+
'</td>'
+
'<td>'
+
((
data
.
page
-
1
)
*
data
.
pageSize
+
i
+
1
)
+
'</td>'
+
'<td><img class="fansImg" src="'
+
data
.
rows
[
i
].
logo
+
'" />'
+
data
.
rows
[
i
].
nickname
+
'</td>'
+
'<td><img class="fansImg" src="'
+
data
.
rows
[
i
].
logo
+
'" />'
+
data
.
rows
[
i
].
nickname
+
'</td>'
+
'<td>'
+
ToAddress
(
data
.
rows
[
i
])
+
'</td>'
+
'<td>'
+
ToAddress
(
data
.
rows
[
i
])
+
'</td>'
+
'<td>'
+
data
.
rows
[
i
].
parentfansid
+
'</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>'
+
...
...
编写
预览
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论