作者 lyh

gx

... ... @@ -77,11 +77,11 @@ class MenuSpecialController extends BaseController
public function save(MenuSpecialLogic $logic){
$this->request->validate([
'name'=>'required',
'user_list'=>'required',
// 'user_list'=>'required',
'remark'=>'required'
],[
'name.required' => 'name不能为空',
'user_list.required' => 'user_list不能为空',
// 'user_list.required' => 'user_list不能为空',
'remark.required' => 'remark不能为空'
]);
$logic->specialSave();
... ...
... ... @@ -105,8 +105,12 @@ class ImageController extends Controller
if ($info === false) {
$this->response('指定图片不存在!', Code::USER_ERROR);
}
//查看缩略图是否存在
$filename = $this->config['root'] . '/' .$info['path'] . '_' . $w . '_' . $h;
if($info['is_cos'] == 1){
$filename = getImageUrl($info['path']);
}else{
//查看缩略图是否存在
$filename = $this->config['root'] . $info['path'] . '_' . $w . '_' . $h;
}
if(is_file($filename)){
$content = file_get_contents($filename);
$header['Content-Length'] = strlen($content);
... ... @@ -127,7 +131,7 @@ class ImageController extends Controller
*/
public function readImageContent($info,$w,$h)
{
$path = $this->config['root'] . '/' . $info['path'];
$path = $this->config['root'] . $info['path'];
if (!is_file($path)) {
$this->response('指定图片已被系统删除!', Code::USER_ERROR);
}
... ...