mirror of
https://github.com/yunluo/gdk.git
synced 2024-06-16 20:45:06 +02:00
修复金币详情不加载的问题
This commit is contained in:
parent
6f8cbe5a69
commit
b94f672fcb
|
@ -18,10 +18,9 @@ class GDK_Points_List_Table extends WP_List_Table
|
||||||
public function prepare_items()
|
public function prepare_items()
|
||||||
{
|
{
|
||||||
$columns = $this->get_columns();
|
$columns = $this->get_columns();
|
||||||
$hidden = $this->get_hidden_columns();
|
|
||||||
$sortable = $this->get_sortable_columns();
|
$sortable = $this->get_sortable_columns();
|
||||||
$data = $this->table_data();
|
$data = GDK_Points::get_points(null, null, null, ARRAY_A);
|
||||||
usort($data, array(&$this,'sort_data'));
|
usort($data, $this->sort_data());
|
||||||
$perPage = 30; //每页30个数据
|
$perPage = 30; //每页30个数据
|
||||||
$currentPage = $this->get_pagenum();
|
$currentPage = $this->get_pagenum();
|
||||||
$totalItems = count($data);
|
$totalItems = count($data);
|
||||||
|
@ -34,7 +33,6 @@ class GDK_Points_List_Table extends WP_List_Table
|
||||||
|
|
||||||
$this->_column_headers = [
|
$this->_column_headers = [
|
||||||
$columns,
|
$columns,
|
||||||
$hidden,
|
|
||||||
$sortable,
|
$sortable,
|
||||||
];
|
];
|
||||||
$this->items = $data;
|
$this->items = $data;
|
||||||
|
@ -61,16 +59,6 @@ class GDK_Points_List_Table extends WP_List_Table
|
||||||
return $columns;
|
return $columns;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Define which columns are hidden
|
|
||||||
*
|
|
||||||
* @return Array
|
|
||||||
*/
|
|
||||||
public function get_hidden_columns()
|
|
||||||
{
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define the sortable columns
|
* Define the sortable columns
|
||||||
*
|
*
|
||||||
|
@ -106,17 +94,7 @@ class GDK_Points_List_Table extends WP_List_Table
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the table data
|
|
||||||
*
|
|
||||||
* @return Array
|
|
||||||
*/
|
|
||||||
private function __table_data()
|
|
||||||
{
|
|
||||||
$data = [];
|
|
||||||
$data = GDK_Points::get_points(null, null, null, ARRAY_A);
|
|
||||||
return $data;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define what data to show on each column of the table
|
* Define what data to show on each column of the table
|
||||||
|
|
Loading…
Reference in a new issue