From 4f0a17c41eaf8cf31d3d15d7977caa428dcf9e75 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Wed, 10 Apr 2024 17:08:25 +0800 Subject: [PATCH] 轮播图调整 1、按照编号排序 --- src/main/resources/templates/febs/views/modules/banner/platformBanner.html | 50 ++++++++++++++++++++++++++++---------------------- 1 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/main/resources/templates/febs/views/modules/banner/platformBanner.html b/src/main/resources/templates/febs/views/modules/banner/platformBanner.html index 0956031..768bc1f 100644 --- a/src/main/resources/templates/febs/views/modules/banner/platformBanner.html +++ b/src/main/resources/templates/febs/views/modules/banner/platformBanner.html @@ -60,17 +60,8 @@ </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"> @@ -101,7 +92,7 @@ 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'); @@ -114,6 +105,21 @@ 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>' }); } }); @@ -134,7 +140,7 @@ // 刷新按钮 $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'); @@ -157,19 +163,19 @@ 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: 'jumpUrl', title: '跳转链接', 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'}, - {title: '跳转外部或内部', templet: '#isInside', minWidth: 60,align:'center'}, + {field: 'jumpUrl', title: '跳转链接', minWidth: 200,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'} ]] -- Gitblit v1.9.1