| | |
| | | </script> |
| | | <!-- 表格操作栏 start --> |
| | | <script type="text/html" id="user-option"> |
| | | <!-- <span shiro:lacksPermission="user:view,user:update,user:delete">--> |
| | | <!-- <span class="layui-badge-dot febs-bg-orange"></span> 无权限--> |
| | | <!-- </span>--> |
| | | <!-- <a lay-event="edit" shiro:hasPermission="user:update">编辑--> |
| | | <a lay-event="edit">编辑 |
| | | <i class="layui-icon febs-edit-area febs-blue"></i> |
| | | </a> |
| | | <!-- <a lay-event="delete" shiro:hasPermission="user:update">删除--> |
| | | <a lay-event="delete">删除 |
| | | <i class="layui-icon febs-edit-area febs-blue"></i> |
| | | </a> |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">编辑</button> |
| | | <button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="delete">删除</button> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | |
| | | layEvent = obj.event; |
| | | |
| | | if (layEvent === 'edit') { |
| | | febs.modal.open('轮播图设置', 'modules/banner/platformBannerUpdate/' + data.id, { |
| | | febs.modal.open('轮播图', 'modules/banner/platformBannerUpdate/' + data.id, { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#banner-update').find('#submit').trigger('click'); |
| | |
| | | if (layEvent === 'delete') { |
| | | febs.modal.confirm('删除', '您是否确认删除?', function () { |
| | | deleteUsers(data.id); |
| | | }); |
| | | } |
| | | if (layEvent === 'seeImgThumb') { |
| | | var t = $view.find('#seeImgThumb'+data.id+''); |
| | | //页面层 |
| | | layer.open({ |
| | | type: 1, |
| | | title: "图片", |
| | | skin: 'layui-layer-rim', //加上边框 |
| | | area: ['80%', '80%'], //宽高 |
| | | shadeClose: true, //开启遮罩关闭 |
| | | end: function (index, layero) { |
| | | return false; |
| | | }, |
| | | content: '<div style="text-align:center"><img src="' + $(t).attr('src') + '" /></div>' |
| | | }); |
| | | } |
| | | }); |
| | |
| | | |
| | | // 刷新按钮 |
| | | $add.on('click', function () { |
| | | febs.modal.open('轮播图新增', 'modules/banner/platformBannerAdd/', { |
| | | febs.modal.open('轮播图', 'modules/banner/platformBannerAdd/', { |
| | | btn: ['提交', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#banner-add').find('#submit').trigger('click'); |
| | |
| | | id: 'bannerTable', |
| | | url: ctx + 'admin/banner/platformBanner', |
| | | cols: [[ |
| | | {field: 'id', title: '', minWidth: 10,align:'left'}, |
| | | {field: 'id', title: '编号', minWidth: 10,align:'left'}, |
| | | {field: 'name', title: '标题', minWidth: 120,align:'center'}, |
| | | {field: 'imageUrl', title: '图片链接', |
| | | {field: 'sort', title: '排序', minWidth: 120,align:'center'}, |
| | | |
| | | {field: 'imageUrl', title: '缩略图', |
| | | templet: function (d) { |
| | | return '<img src="'+d.imageUrl+'" >' |
| | | }, minWidth: 200,align:'center'}, |
| | | // {field: 'sort', title: '联系方式', minWidth: 200,align:'center'}, |
| | | |
| | | return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.imageUrl+'" alt=""></a>'; |
| | | }, minWidth: 150,align:'center'}, |
| | | {title: '是否可跳转', templet: '#isJump', minWidth: 60,align:'center'}, |
| | | {field: 'jumpUrl', title: '跳转链接', minWidth: 200,align:'center'}, |
| | | {title: '跳转外部或内部', templet: '#isInside', minWidth: 60,align:'center'}, |
| | | // {title: '跳转外部或内部', templet: '#isInside', minWidth: 60,align:'center'}, |
| | | // {title: '显示端口', templet: '#showPort', minWidth: 60,align:'center'}, |
| | | {title: '是否置顶', templet: '#isTop', minWidth: 60,align:'center'}, |
| | | // {title: '是否置顶', templet: '#isTop', minWidth: 60,align:'center'}, |
| | | |
| | | {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'} |
| | | ]] |