public function mobile()
 {
     if (IS_POST) {
         $santi = new SFFlowFacade();
         $request = new SFMobile();
         $mobile = I('post.mobile', '');
         $result = $santi->is10000($mobile);
         if ($result) {
             echo "电信号码";
         }
         $result = $santi->is10010($mobile);
         if ($result) {
             echo "联通号码";
         }
         $result = $santi->is10086($mobile);
         if ($result) {
             echo "移动号码";
         }
         dump($result);
     } else {
         $this->display();
     }
 }
 /**
  * 赠送给用户流量包
  * @param $invite_id int 邀请人用户ID
  * @param $mobile string 被邀请人注册的手机号
  */
 private function giveFlowPacketTo($invite_id, $mobile)
 {
     $is_close = C('CLOSE_SANTI_API');
     addLog("User/giveFlowPacketTo", $is_close, $is_close, "关闭了送流量接口!");
     if ($is_close == 1) {
         //如果关闭了 ,则直接返回
         addLog("User/giveFlowPacketTo", $is_close, $is_close, "关闭了送流量接口!");
         return;
     }
     $invite_mobile = '';
     $result = apiCall(UserApi::GET_INFO, array($invite_id));
     if ($result['status'] && is_array($result['info'])) {
         $invite_mobile = $result['info']['mobile'];
     }
     $santi = new SFFlowFacade();
     $flow = 0;
     if (!empty($invite_mobile) && strlen($invite_mobile) == 11) {
         //检测是否符合条件
         //            $result = apiCall(SantiOrderApi::COUNT,array(array('mobile'=>$invite_mobile)));
         //            if($result['info'] < $invite_cnt){
         //11位手机号
         //TODO: 送给这个手机号,邀请人,老用户
         //
         if ($santi->is10010($invite_mobile)) {
             $flow = 20;
         } else {
             $flow = 10;
         }
         $result = $santi->createAndSubmit($invite_mobile, $flow);
         if (!$result['status']) {
             addLog("User/giveFlowPacketTo", $result, $invite_mobile, $flow . "M,赠送流量失败(邀请人,老用户)!");
         } else {
             addLog("User/giveFlowPacketTo", $result, $invite_mobile, $flow . "M赠送流量成功!(邀请人,老用户)");
         }
         //            }
     }
     if (!empty($mobile)) {
         //TODO: 送给这个手机号流量,被邀请人,新用户
         if (empty($invite_mobile)) {
             //未使用邀请码注册  送50M
             $flow = 50;
         } else {
             //使用邀请码注册 送100M
             $flow = 100;
         }
         $result = $santi->createAndSubmit($mobile, $flow);
         if (!$result['status']) {
             addLog("User/giveFlowPacketTo", $result, $mobile, $flow . "M赠送流量失败(注册用户)!");
         } else {
             addLog("User/giveFlowPacketTo", $result, $mobile, $flow . "M赠送流量成功(注册用户)!");
         }
     }
 }