Beispiel #1
0
if (!defined('IN_MOBILE_API')) {
    exit('Access Denied');
}
require './source/class/class_core.php';
define("FILE_PATH", dirname(dirname(dirname(__FILE__))));
require_once FILE_PATH . '/libs/appdesign.inc.php';
require_once libfile('function/cache');
$discuz = C::app();
$discuz->init();
$view_id = isset($_GET['vid']) ? $_GET['vid'] : '0';
$key = 'bigapp_view_' . $view_id;
updatecache('setting');
if (isset($_G['setting'][$key]) && !empty($_G['setting'][$key])) {
    $res = unserialize($_G['setting'][$key]);
} else {
    $res = C::t('common_setting')->fetch($key, true);
}
if (isset($res[0]) && empty($res[0])) {
    //拉取不到对应的视图信息
    $variable['code'] = '1';
    $variable['msg'] = 'fail';
} else {
    $tab_cfg = AppDesign::getViewTabCfgInfo($res);
    $variable["tab_cfg"] = $tab_cfg;
    $variable['code'] = '0';
    $variable['msg'] = 'succ';
}
bigapp_core::result(bigapp_core::variable($variable));
?>

 public static function getTabCfgInfo($buttonInfo)
 {
     global $_G;
     $tab_cfg = array();
     $button_type = $buttonInfo['button_type'];
     //自定义类别的按钮,需根据tab_type,构建tab页面数据
     if ('1' === $button_type) {
         $tab_cfg = AppDesign::getViewTabCfgInfo($buttonInfo['tab_cfg']);
     }
     return $tab_cfg;
 }