diff --git a/data/user/user.json b/data/user/user.json index 3c07881..8c8ffef 100644 --- a/data/user/user.json +++ b/data/user/user.json @@ -6,121 +6,132 @@ { "id": "001", "username": "zhangsan", - "name": "张三", + "reallyName": "张三", "password": "111111", "status": 0, "role": 0, "email": "zhangsan@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "002", "username": "lisi", - "name": "李四", + "reallyName": "李四", "password": "111111", "status": 0, "role": 0, "email": "lisi@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "003", "username": "wangwu", - "name": "王五", + "reallyName": "王五", "password": "111111", "status": 1, "role": 1, "email": "wangwu@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "004", "username": "zhaoliu", - "name": "赵六", + "reallyName": "赵六", "password": "111111", "status": 1, "role": 1, "email": "zhaoliu@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "005", "username": "sunqi", - "name": "孙七", + "reallyName": "孙七", "password": "111111", "status": 1, "role": 1, "email": "sunqi@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "006", "username": "zhouba", - "name": "周八", + "reallyName": "周八", "password": "111111", "status": 1, "role": 1, "email": "zhouba@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "007", "username": "wujiu", - "name": "吴九", + "reallyName": "吴九", "password": "111111", "status": 1, "role": 1, "email": "wujiu@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "008", "username": "zhengshi", - "name": "郑十", + "reallyName": "郑十", "password": "111111", "status": 1, "role": 1, "email": "zhengshi@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "009", "username": "liubei", - "name": "刘备", + "reallyName": "刘备", "password": "111111", "status": 1, "role": 1, "email": "liubei@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "010", "username": "zhangfei", - "name": "张飞", + "reallyName": "张飞", "password": "111111", "status": 1, "role": 1, "email": "zhangfei@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 }, { "id": "011", "username": "guanyu", - "name": "关羽", + "reallyName": "关羽", "password": "111111", "status": 1, "role": 1, "email": "guanyu@qq.com", + "phone": "13222222222", "createTime": "2018-05-06 18:15:28", "logins": 24 } diff --git a/lib/okPlugins/okLayer.js b/lib/okPlugins/okLayer.js index a4645b6..f11769d 100644 --- a/lib/okPlugins/okLayer.js +++ b/lib/okPlugins/okLayer.js @@ -16,9 +16,10 @@ layui.define(["layer"], function (exports) { * @param content * @param width * @param height - * @param isRefreshTable + * @param successFunction + * @param endFunction */ - open: function (title, content, width, height, callbackFunction) { + open: function (title, content, width, height, successFunction, endFunction) { layer.open({ title: title, type: 2, @@ -29,7 +30,8 @@ layui.define(["layer"], function (exports) { content: content, zIndex: layer.zIndex, skin: okLayer.skinChoose(), - end: callbackFunction + success: successFunction, + end: endFunction }); }, /** diff --git a/pages/article/article.html b/pages/article/article.html index 4ac943e..4078718 100644 --- a/pages/article/article.html +++ b/pages/article/article.html @@ -158,13 +158,13 @@ } function add () { - okLayer.open("添加文章", "article-add.html", "90%", "90%", function () { + okLayer.open("添加文章", "article-add.html", "90%", "90%", null, function () { articleTable.reload(); }) } function edit (id) { - okLayer.open("编辑文章", "article-edit.html?id=" + id, "90%", "90%", function () { + okLayer.open("编辑文章", "article-edit.html?id=" + id, "90%", "90%", null, function () { articleTable.reload(); }) } diff --git a/pages/role/role.html b/pages/role/role.html index 7e44979..7a889d6 100644 --- a/pages/role/role.html +++ b/pages/role/role.html @@ -103,7 +103,7 @@ }); function add () { - okLayer.open("添加角色", "role-add.html", "90%", "90%", function () { + okLayer.open("添加角色", "role-add.html", "90%", "90%", null, function () { roleTable.reload(); }) } @@ -124,7 +124,7 @@ } function edit (id) { - okLayer.open("编辑角色", "role-edit.html?id=" + id, "90%", "90%", function () { + okLayer.open("编辑角色", "role-edit.html?id=" + id, "90%", "90%", null, function () { roleTable.reload(); }) } diff --git a/pages/use/use-okLayer.html b/pages/use/use-okLayer.html index 533e43e..da49e1e 100644 --- a/pages/use/use-okLayer.html +++ b/pages/use/use-okLayer.html @@ -64,9 +64,10 @@ okLayer.confirm("确定要批量删除吗?", function (index) { * @param content 内容url * @param width 弹窗宽度 * @param height 弹窗高度 - * @param function 回调函数 + * @param successFunction 弹出后回调函数 + * @param endFunction 销毁后回调函数 */ -okLayer.open("添加用户", "user-add.html", "90%", "90%", function() {}) +okLayer.open("添加用户", "user-add.html", "90%", "90%", function(layero, index) {}, function() {}) diff --git a/pages/use/use-okTab.html b/pages/use/use-okTab.html index 960292a..7188eea 100644 --- a/pages/use/use-okTab.html +++ b/pages/use/use-okTab.html @@ -30,8 +30,7 @@ XX管理