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

gonggao.js 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //angular.module('gonggao',[])
  2. // .controller('gonggaoCorl',function($scope,$rootScope){
  3. //
  4. // });
  5. $(document).ready(function() {
  6. GetNewsList();
  7. //getClient();
  8. //顶部hover
  9. $('.topbarWx').hover(function() {
  10. $('.topbarWx .topbarWx-box').css('left', $(this).offset().left);
  11. });
  12. $('.topbarClient').hover(function() {
  13. $('.topbarClient .topbarClient-box').css('left', $(this).offset().left);
  14. });
  15. });
  16. function GetNewsList() {
  17. $('#list1').bootstrapTable('destroy');
  18. //初始化表格,动态从服务器加载数据
  19. $("#list1").bootstrapTable({
  20. method: "get", //使用get请求到服务器获取数据
  21. url: huayi.config.callcenter_url + "Web/GetWebNewsList", //获取数据的Servlet地址
  22. contentType: "application/x-www-form-urlencoded",
  23. striped: true, //表格显示条纹
  24. pagination: true, //启动分页
  25. pageSize: 15, //每页显示的记录数
  26. pageNumber: 1, //当前第几页
  27. pageList: [10, 20, 50, 100], //记录数可选列表
  28. search: false, //是否启用查询
  29. showColumns: false, //显示下拉框勾选要显示的列
  30. showRefresh: false, //显示刷新按钮
  31. sidePagination: "server", //表示服务端请求
  32. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  33. //设置为limit可以获取limit, offset, search, sort, order
  34. queryParamsType: "undefined",
  35. queryParams: function queryParams(params) { //设置查询参数
  36. var param = {
  37. page: params.pageNumber,
  38. pagesize: params.pageSize,
  39. type: 6,
  40. };
  41. return param;
  42. },
  43. onLoadSuccess: function(data) { //加载成功时执行
  44. //layer.msg("加载成功");
  45. },
  46. onLoadError: function() { //加载失败时执行
  47. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  48. }
  49. });
  50. }
  51. function ComContent1(val, row) {
  52. return '<div class="imgs" >' +
  53. '<a href="gonggao-con.html?id=' + row.id + '"> ' + val + '</a>' +
  54. '</div>';
  55. }