diff --git a/application/admin/controller/general/Student.php b/application/admin/controller/general/Student.php index 13037c2..b799399 100644 --- a/application/admin/controller/general/Student.php +++ b/application/admin/controller/general/Student.php @@ -126,6 +126,7 @@ class Student extends Backend $params['password'] = md5($params['password']); $school = db('auth_group')->where('id',$params['group_id'])->find(); $params['school'] = $school['name']; + $params['avatar'] = $this->getPicUrl($params['avatar']); $info = db('auth_group')->where('id', $params['group_id'])->find(); while ($info['level'] > 2){ @@ -146,6 +147,20 @@ class Student extends Backend } $this->success(); } + + + +function getPicUrl($url) +{ + if($url==''||$url==null){ + return ''; + } + if(substr($url,0,4)=='http'){ + return $url; + }else{ + return 'https://hphb-storage.oss-cn-beijing.aliyuncs.com'.$url; + } +} /** * 编辑