Your Name 3 years ago
parent
commit
5e3181fcc1
1 changed files with 7 additions and 5 deletions
  1. 7 5
      tool/work/lib/Manage.php

+ 7 - 5
tool/work/lib/Manage.php

@@ -181,12 +181,9 @@ Class Manage
 	public function getUser($id)
 	{
 		$info = Dever::db('work/info')->find($id);
-		$data = array();
 		if ($info && isset($info['mobile']) && $info['mobile']) {
 			$data= Dever::db('work/user')->find(array('mobile'=>$info['mobile']));
-		}
-		
-		if ($data) {
+			if ($data) {
 			$html['user'] = $data['name'].'<br/>'.$data['mobile'];
 			if (isset($info['fdate']) && $info['fdate']) {
 				$fdate = date('Y-m-d H:i:s',$info['fdate']);
@@ -206,10 +203,15 @@ Class Manage
 				$question_name = $question['name'];
 			}
 			$html['cate_name'] = $cate_name.'<br/>'.$question_name;
-			return $html;
+				return $html;
+			} else {
+				return '';
+			}
 		} else {
 			return '';
 		}
+		
+		
 	}
 	public function xietiao_api($id)
 	{