| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //angular.module('gonggao',[])
- // .controller('gonggaoCorl',function($scope,$rootScope){
- //
- // });
- $(document).ready(function() {
- GetNewsList();
- //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 GetNewsList() {
- $('#list1').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#list1").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "Web/GetWebNewsList", //获取数据的Servlet地址
- contentType: "application/x-www-form-urlencoded",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 15, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- page: params.pageNumber,
- pagesize: params.pageSize,
- type: 6,
- };
- return param;
- },
- onLoadSuccess: function(data) { //加载成功时执行
- //layer.msg("加载成功");
-
- },
- onLoadError: function() { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- function ComContent1(val, row) {
- return '<div class="imgs" >' +
- '<a href="gonggao-con.html?id=' + row.id + '"> ' + val + '</a>' +
- '</div>';
- }
|