This commit is contained in:
aozhiwei 2022-01-13 17:45:53 +08:00
parent 17407e0e1a
commit a0e8f1a722
4 changed files with 115 additions and 0 deletions

View File

@ -11,6 +11,21 @@ class MarketController extends BaseController {
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()
@ -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
View 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
View 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
View 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;
}