永城市12345 (县级市)- 来源于虞城县12345 - 所有县级统一API

baoguang.js 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. $(document).ready(function() {
  2. GetBNewsList();
  3. //getClient();
  4. //顶部hover
  5. $('.topbarWx').hover(function() {
  6. $('.topbarWx .topbarWx-box').css('left', $(this).offset().left);
  7. });
  8. $('.topbarClient').hover(function() {
  9. $('.topbarClient .topbarClient-box').css('left', $(this).offset().left);
  10. });
  11. });
  12. function GetBNewsList() {
  13. layui.use('table', function() {
  14. var table = layui.table;
  15. //方法级渲染
  16. table.render({
  17. elem: '#list',
  18. url: huayi.config.callcenter_url + "Web/GetWebNewsList",
  19. method: 'get', //如果无需自定义HTTP类型,可不加该参数
  20. skin: 'row', //line (行边框风格) row (列边框风格) nob (无边框风格)
  21. even: true, //开启隔行背景
  22. where: {
  23. type: 3
  24. },
  25. limit: 10,
  26. limits: [10],
  27. request: {
  28. pageName: 'page' //页码的参数名称,默认:page
  29. ,
  30. limitName: 'pagesize' //每页数据量的参数名,默认:limit
  31. },
  32. response: {
  33. statusName: 'state', //状态字段名称
  34. statusCode: 'success', //状态字段成功值
  35. countName: 'total' //数据总数的字段名称,默认:count
  36. ,
  37. dataName: 'rows' //数据列表的字段名称,默认:data
  38. },
  39. cols: [
  40. [{
  41. field: 'bt',
  42. minWidth: 150,
  43. title: '信息主题',
  44. templet: '#switchTpl'
  45. }, {
  46. field: 'sj',
  47. width: 220,
  48. title: '日期'
  49. }]
  50. ],
  51. page: true
  52. });
  53. });
  54. }
  55. function ComContent2(val, row) {
  56. return '<div class="imgs" >' +
  57. '<a href="PG.html?id=' + row.id + '"> ' + val + '</a>' +
  58. '</div>';
  59. }