/** * 选择器名字的列表 */ public function getList() { $pageSize = MiniHttp::getParam('page_size', 10); $currentPage = MiniHttp::getParam('current_page', 1); $type = MiniHttp::getParam('type', 'web'); $items = MiniChooser::getInstance()->getPageList($pageSize, $currentPage, $type); $total = MiniChooser::getInstance()->getTotal($type); $value['items'] = $items; $value['total'] = $total; return $value; }
/** * 根据Domain,app_key来获取结果 */ public function validKey($domain, $appKey) { $chooser = MiniChooser::getInstance()->getByKey($appKey); if (empty($chooser)) { return false; } $chooserId = $chooser['id']; $item = MiniChooserDomain::getInstance()->getByDomain($chooserId, $domain); if (empty($item)) { return false; } return true; }