Ejemplo n.º 1
0
 /**
  * 创建菜单
  * 
  * {@see http://mp.weixin.qq.com/wiki/13/43de8269be54a0a6f64413e4dfa94f39.html }
  *
  * @author xjiujiu <*****@*****.**>
  * @access public
  * @param  {String} JSON字符串
  */
 public function create($menuList)
 {
     $json = HRequest::post(str_replace('{access_token}', $this->_accessToken, self::$_createUrl), $menuList);
     $json = json_decode($json, true);
     if (0 < $json['errcode']) {
         throw new HRequestException('创建失败,错误信息:' . $json['errcode'] . ':' . $json['errmessage']);
     }
 }