xiaoyong931011
2021-09-26 e268357d7b54492319f657fef30f9a6c33175c9f
20210926
2 files modified
31 ■■■■■ changed files
src/main/resources/mapper/modules/MallGoodsCategoryMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/product/categoryList.html 29 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallGoodsCategoryMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="cc.mrbird.febs.mall.mapper.MallGoodsCategoryMapper">
    <select id="selectCategoryListInPage" resultType="cc.mrbird.febs.mall.entity.MallGoodsCategory">
        SELECT m.id,m.name,b.name parentName,m.is_recommend isComand
        SELECT m.id,m.name,b.name parentName,m.is_recommend isComand,m.image
                FROM mall_goods_category m
                left join mall_goods_category b on m.parent_id = b.id
        <where>
src/main/resources/templates/febs/views/modules/product/categoryList.html
@@ -28,6 +28,16 @@
                        </div>
                    </form>
                    <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
                    <style type="text/css">
                        .layui-table-cell{
                            text-align:center;
                            height: auto;
                            white-space: normal;
                        }
                        .layui-table img{
                            max-width:100px
                        }
                    </style>
                </div>
            </div>
        </div>
@@ -78,6 +88,21 @@
                    }
                });
            }
            if (layEvent === 'seeImges') {
                var t = $view.find('#seeImges'+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>'
                });
            }
        });
@@ -114,6 +139,10 @@
                cols: [[
                    {field: 'name', title: '名称', minWidth: 150,align:'left'},
                    {field: 'parentName', title: '父级名称', minWidth: 150,align:'left'},
                    {field: 'image', title: '图片',
                        templet: function (d) {
                            return '<a lay-event="seeImges"><img id="seeImges'+d.id+'" src="'+d.image+'" alt=""></a>';
                        }, minWidth: 100,align:'center'},
                    {title: '操作',
                        templet: function (d) {
                            return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="see" shiro:hasPermission="user:update">编辑</button>'