- 文章内容* |
+ 文章内容* |
@@ -92,7 +78,6 @@
-
{/block}
@@ -140,7 +125,7 @@ function init(layui) {
success: function (e) {
if (e.code == 0) {
layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) {
- window.location.href="{:url('home/article/index')}";
+ parent.location.reload();
});
} else {
layer.msg(e.msg);
@@ -149,16 +134,11 @@ function init(layui) {
})
return false;
});
- //监听返回
- $('.body-content').on('click', '[lay-event="back"]', function () {
- history.back(-1);
- return false;
- });
}
{include file="common/layui" base="base" extend="['tagpicker']" callback="init" /}
-{include file="common/ueditor" id="container" name="content" width="776" height="500" toolbar="[]" /}
+{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /}
{/block}
\ No newline at end of file
diff --git a/app/home/view/article/edit.html b/app/home/view/article/edit.html
index 0a093b6..4f696b8 100644
--- a/app/home/view/article/edit.html
+++ b/app/home/view/article/edit.html
@@ -2,15 +2,13 @@
{block name="body"}
{/block}
@@ -146,7 +126,7 @@
success: function (e) {
if (e.code == 0) {
layer.confirm('保存成功,返回列表页吗?', { icon: 3, title: '提示' }, function (index) {
- window.location.href="{:url('home/article/index')}";
+ parent.location.reload();
});
} else {
layer.msg(e.msg);
@@ -155,16 +135,11 @@
})
return false;
});
- //监听返回
- $('.body-content').on('click', '[lay-event="back"]', function () {
- history.back(-1);
- return false;
- });
}
{include file="common/layui" base='base' extend="['tagpicker']" callback="init" /}
-{include file="common/ueditor" id="container" name="content" width="776" height="500" toolbar="[]" /}
+{include file="common/ueditor" id="container" name="content" width="750" height="500" toolbar="[]" /}
{/block}
\ No newline at end of file
diff --git a/app/home/view/article/index.html b/app/home/view/article/index.html
index ea8c38c..72ba83d 100644
--- a/app/home/view/article/index.html
+++ b/app/home/view/article/index.html
@@ -19,19 +19,13 @@
-
-
{/block}
@@ -42,6 +36,7 @@
function init(layui) {
var TAB = parent.layui.tab,
table = layui.table,
+ rightpage = layui.rightpage,
form = layui.form;
var tableIns = table.render({
@@ -62,60 +57,54 @@
field: 'sort',
title: '排序',
align: 'center',
- width: 80
+ width: 66
}, {
field: 'cate_title',
title: '分类',
- width: 200
+ align: 'center',
+ width: 120
}, {
field: 'title',
- title: '文章标题',
- templet: ''
- }, {
- field: 'status',
- title: '状态',
- toolbar: '#status',
+ title: '文章标题'
+ },{
+ field: 'read',
+ title: '阅读量',
align: 'center',
- width: 66
+ width: 80
}, {
- field: 'is_home',
- title: '首页共享',
- toolbar: '#is_share',
+ field: 'user',
+ title: '发布人',
align: 'center',
- width: 90
+ width: 80
+ }, {
+ field: 'department',
+ title: '部门',
+ align: 'center',
+ width: 100
}, {
field: 'right',
title: '操作',
toolbar: '#barDemo',
- width: 100,
+ width: 60,
align: 'center'
}
]
]
});
-
+
+ //表头工具栏事件
+ table.on('toolbar(test)', function(obj){
+ if (obj.event === 'add') {
+ rightpage.open("{:url('home/article/add')}");
+ return;
+ }
+ });
//监听行工具事件
table.on('tool(test)', function(obj) {
var data = obj.data;
- if (obj.event === 'del') {
- layer.confirm('确定要删除吗?', {
- icon: 3,
- title: '提示'
- }, function(index) {
- $.ajax({
- url: "{:url('home/article/delete')}",
- data: {
- id: data.id
- },
- success: function(e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- obj.del();
- }
- }
- })
- layer.close(index);
- });
+ if(obj.event === 'view'){
+ rightpage.open('/home/article/view?id='+data.id);
+ return;
}
});
@@ -134,6 +123,6 @@
});
}
-{include file="common/layui" base="base" extend="[]" callback="init" /}
+{include file="common/layui" base="base" extend="['rightpage']" callback="init" /}
{/block}
diff --git a/app/home/view/article/list.html b/app/home/view/article/list.html
new file mode 100644
index 0000000..dbcf5c4
--- /dev/null
+++ b/app/home/view/article/list.html
@@ -0,0 +1,160 @@
+{extend name="common/base"/}
+
+{block name="body"}
+
+
+
+
+
+
+
+
+
+{/block}
+
+
+
+{block name="script"}
+
+{include file="common/layui" base="base" extend="['rightpage']" callback="init" /}
+{/block}
+
diff --git a/app/home/view/article/view.html b/app/home/view/article/view.html
new file mode 100644
index 0000000..049c6ea
--- /dev/null
+++ b/app/home/view/article/view.html
@@ -0,0 +1,56 @@
+{extend name="common/base"/}
+
+{block name="body"}
+
+{/block}
+
+
+
+{block name="script"}
+
+{include file="common/layui" base='base' extend="[]" callback="init" /}
+{/block}
+
\ No newline at end of file
diff --git a/app/home/view/mail/add.html b/app/home/view/mail/add.html
index 78a300b..27a5654 100644
--- a/app/home/view/mail/add.html
+++ b/app/home/view/mail/add.html
@@ -6,7 +6,7 @@
{block name="body"}
|