/**
  * 获取JSSDK接口认证.
  *
  * @author Cui
  *
  * @date   2015-07-27
  *
  * @return string 认证签名.
  */
 public function getTicket()
 {
     $key = 'JSAPI_TICKET' . Api::getSecrect();
     $ticket = Api::Cache($key);
     if (!$ticket) {
         $this->module = 'get_jsapi_ticket';
         $res = $this->_get('', '');
         if (!$res) {
             exit($this->getError());
         }
         $ticket = $res['ticket'];
         $expires = $res['expires_in'];
         Api::Cache($key, $ticket, $expires - 300);
     }
     return $ticket;
 }