...
|
...
|
@@ -267,10 +267,6 @@ class OrderSalesmanController extends WeChatBaseController |
|
|
$new_img->thumb($width,$height - intval($top) * 2,5);
|
|
|
$new_img->thumb($width/2,($height - intval($top) * 2)/2);
|
|
|
$new_img->save('./upload/'.$img_url,'jpg',100);
|
|
|
$session_img = Session::get('img_url');
|
|
|
if(file_exists('./upload/'.$session_img)) {
|
|
|
@unlink('./upload/'.$session_img);
|
|
|
}
|
|
|
$this->success('成功','',cmf_get_asset_url($img_url));
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -298,6 +294,10 @@ class OrderSalesmanController extends WeChatBaseController |
|
|
$new_file = $new_file.cmf_get_current_user_id().$time.".{$type}";
|
|
|
if (file_put_contents($new_file, base64_decode(str_replace($result[1], '', $base64_image_content)))){
|
|
|
$file = $file_path.cmf_get_current_user_id().$time.".{$type}";
|
|
|
$session_img = Session::get('img_url');
|
|
|
if(file_exists('./upload/'.$session_img)) {
|
|
|
@unlink('./upload/'.$session_img);
|
|
|
}
|
|
|
Session::set('img_url',$file);
|
|
|
return $file;
|
|
|
}else{
|
...
|
...
|
|