...
|
...
|
@@ -652,17 +652,26 @@ class User extends Api |
|
|
$this->error('请先上传用户头像');
|
|
|
}
|
|
|
|
|
|
|
|
|
//将用户的头像保存到本地
|
|
|
$dir_user = ROOT_PATH . 'public' . DS . 'uploads/user';
|
|
|
if (!file_exists($dir_user)){
|
|
|
mkdir($dir_user,0777,true);
|
|
|
}
|
|
|
$qiniu_url = $qiniu.$data['image'];
|
|
|
$image_name = $user_id.'.png';
|
|
|
$furl = ROOT_PATH . 'public' . DS . 'uploads/user/'.$image_name;
|
|
|
$furl = $dir_user . DS .$image_name;
|
|
|
$a = file_get_contents($qiniu_url);
|
|
|
file_put_contents($furl,$a);
|
|
|
|
|
|
//将考试的印章图片保存到本地
|
|
|
$dir_qrcode = ROOT_PATH . 'public' . DS . 'uploads/qrcode';
|
|
|
if (!file_exists($dir_qrcode)){
|
|
|
mkdir($dir_qrcode,0777,true);
|
|
|
}
|
|
|
$yinimage = $qiniu.$data['yinimage'];
|
|
|
$imagename = $data['study_id'].'.png';
|
|
|
$yinfurl = ROOT_PATH . 'public' . DS . 'uploads/qrcode/'.$imagename;
|
|
|
$yinfurl = $dir_qrcode . DS .$imagename;
|
|
|
$b = file_get_contents($yinimage);
|
|
|
file_put_contents($yinfurl,$b);
|
|
|
|
...
|
...
|
|