Exemplo n.º 1
0
 public function handle_request()
 {
     $request = APF::get_instance()->get_request();
     $params = $request->get_parameters();
     $allowTypes = array('image', 'voice', 'video', 'thumb', 'news');
     header('Content-Type:text/html; charset=utf-8');
     if (!in_array($params['type'], $allowTypes)) {
         echo "素材类型不对\n";
         print_r($allowTypes);
         exit;
     }
     //实例微信
     $WechatMbroker = new Bll_Wechat_Mbroker_WechatMbroker();
     //设置自定义菜单
     $result = $WechatMbroker->getMediaList($params['type'], $params['offset'], $params['count']);
     //结果返回
     print_r($result);
 }