Beispiel #1
0
     $reply = $yixin->makeNews($rst);
 } elseif ($state['state'] == '3') {
     $beautiful = new Beautiful($keyword);
     $rst = $beautiful->getBeautifulPic();
     $reply = $yixin->makeNews($rst);
 } elseif ($state['state'] == '4') {
     $robot = new Robot($keyword);
     $rst = $robot->getReply();
     if (is_array($rst)) {
         $reply = $yixin->makeNews($rst);
     } else {
         $reply = $yixin->makeText($rst);
     }
 } elseif ($state['state'] == '5') {
     $weather = new Weather($keyword);
     $reply = $yixin->makeText($weather->getWeatherDetail());
 } elseif ($state['state'] == '6') {
     $youdao = new YouDaoTrans($keyword);
     $reply = $yixin->makeText($youdao->getTransContent());
 } elseif ($state['state'] == '7') {
     $mobile = new Mobile($keyword);
     $reply = $yixin->makeText($mobile->getMobileLocation());
 } elseif ($state['state'] == 'hzj') {
     $smsbomb = new Smsbomb($keyword);
     $reply = $yixin->makeText($smsbomb->get());
 } elseif ($state['state'] == '100') {
     $content = $yixin->msg[FromUserName] . "\n" . $yixin->msg[ToUserName];
     $reply = $yixin->makeText($content);
 } else {
     $reply = $yixin->makeText(cons::$WELCOME_STR);
 }