private function _click() { $resource = $this->getResource(); Vera_Log::addNotice('eventKey', $resource['EventKey']); $conf = Vera_Conf::getAppConf('common'); $result = Data_Wechat_Db::eventReply($resource['EventKey']); if (!$result) { //出错回复 $ret = $conf['errMsg']; } elseif (in_array($result['replyType'], $conf['replyType'])) { //固定回复 $ret['type'] = $result['replyType']; $ret['data'] = json_decode($result['reply'], true); } else { //功能性回复 $class = 'Service_' . $result['replyType']; $instance = new $class($resource); $ret = $instance->{$result['reply']}(); } return $ret; }