1
This commit is contained in:
parent
17407e0e1a
commit
a0e8f1a722
@ -11,6 +11,21 @@ class MarketController extends BaseController {
|
|||||||
|
|
||||||
public function search()
|
public function search()
|
||||||
{
|
{
|
||||||
|
$type = getReqVal('type', 0);
|
||||||
|
if ($type == mt\Market::SYS_TYPE) {
|
||||||
|
$this->searchSys();
|
||||||
|
} else {
|
||||||
|
$this->_rspData(array(
|
||||||
|
'rows' => array(),
|
||||||
|
'page' => array(
|
||||||
|
'total' => 0,
|
||||||
|
'count' => 0,
|
||||||
|
'per_page' => 10,
|
||||||
|
'current_page' => 1,
|
||||||
|
'total_pages' => 0
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buy()
|
public function buy()
|
||||||
@ -29,4 +44,21 @@ class MarketController extends BaseController {
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function searchSys()
|
||||||
|
{
|
||||||
|
$page = getReqVal('page', 1);
|
||||||
|
$type = getReqVal('type', 0);
|
||||||
|
$sort = getReqVal('sort', '');
|
||||||
|
$this->_rspData(array(
|
||||||
|
'rows' => array(),
|
||||||
|
'page' => array(
|
||||||
|
'total' => 0,
|
||||||
|
'count' => 0,
|
||||||
|
'per_page' => 10,
|
||||||
|
'current_page' => 1,
|
||||||
|
'total_pages' => 0
|
||||||
|
)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
27
webapp/mt/Currency.php
Normal file
27
webapp/mt/Currency.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace mt;
|
||||||
|
|
||||||
|
require_once('mt/AttrHelper.php');
|
||||||
|
require_once('mt/StrHelper.php');
|
||||||
|
|
||||||
|
use phpcommon;
|
||||||
|
|
||||||
|
class Currency {
|
||||||
|
|
||||||
|
public static function get($id)
|
||||||
|
{
|
||||||
|
return getXVal(self::getMetaList(), $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function getMetaList()
|
||||||
|
{
|
||||||
|
if (!self::$metaList) {
|
||||||
|
self::$metaList = getMetaTable('currence@currence.php');
|
||||||
|
}
|
||||||
|
return self::$metaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static $metaList;
|
||||||
|
|
||||||
|
}
|
29
webapp/mt/Market.php
Normal file
29
webapp/mt/Market.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace mt;
|
||||||
|
|
||||||
|
require_once('mt/AttrHelper.php');
|
||||||
|
require_once('mt/StrHelper.php');
|
||||||
|
|
||||||
|
use phpcommon;
|
||||||
|
|
||||||
|
class Market {
|
||||||
|
|
||||||
|
const SYS_TYPE = 0;
|
||||||
|
|
||||||
|
public static function get($id)
|
||||||
|
{
|
||||||
|
return getXVal(self::getMetaList(), $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function getMetaList()
|
||||||
|
{
|
||||||
|
if (!self::$metaList) {
|
||||||
|
self::$metaList = getMetaTable('market@market.php');
|
||||||
|
}
|
||||||
|
return self::$metaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static $metaList;
|
||||||
|
|
||||||
|
}
|
27
webapp/mt/WhiteList.php
Normal file
27
webapp/mt/WhiteList.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace mt;
|
||||||
|
|
||||||
|
require_once('mt/AttrHelper.php');
|
||||||
|
require_once('mt/StrHelper.php');
|
||||||
|
|
||||||
|
use phpcommon;
|
||||||
|
|
||||||
|
class WhiteList {
|
||||||
|
|
||||||
|
public static function get($id)
|
||||||
|
{
|
||||||
|
return getXVal(self::getMetaList(), $id);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static function getMetaList()
|
||||||
|
{
|
||||||
|
if (!self::$metaList) {
|
||||||
|
self::$metaList = getMetaTable('whitelist@whitelist.php');
|
||||||
|
}
|
||||||
|
return self::$metaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static $metaList;
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user