$(document).ready(function() { $.support.cors = true; GetWebReleaseList(); getClient(); //顶部hover $('.topbarWx').hover(function() { $('.topbarWx .topbarWx-box').css('left', $(this).offset().left); }); $('.topbarClient').hover(function() { $('.topbarClient .topbarClient-box').css('left', $(this).offset().left); }); }); function GetWebReleaseList() { layui.use('table', function() { var table = layui.table; //方法级渲染 table.render({ elem: '#list', url: huayi.config.callcenter_url + "Web/GetWebNewsList", method: 'get', //如果无需自定义HTTP类型,可不加该参数 skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格) even: true, //开启隔行背景 where: { type: 4 }, limit: 10, limits: [10], request: { pageName: 'page' //页码的参数名称,默认:page , limitName: 'pagesize' //每页数据量的参数名,默认:limit }, response: { statusName: 'state', //状态字段名称 statusCode: 'success', //状态字段成功值 countName: 'total' //数据总数的字段名称,默认:count , dataName: 'rows' //数据列表的字段名称,默认:data }, cols: [ [{ field: 'bt', minWidth: 150, title: '主题', templet: '#switchTpl' }, { field: 'sj', width: 220, title: '发布时间' }] ], page: true }); }); } function ComContent(val, row) { return '