作者 lyh

gx

@@ -77,11 +77,11 @@ class MenuSpecialController extends BaseController @@ -77,11 +77,11 @@ class MenuSpecialController extends BaseController
77 public function save(MenuSpecialLogic $logic){ 77 public function save(MenuSpecialLogic $logic){
78 $this->request->validate([ 78 $this->request->validate([
79 'name'=>'required', 79 'name'=>'required',
80 - 'user_list'=>'required', 80 +// 'user_list'=>'required',
81 'remark'=>'required' 81 'remark'=>'required'
82 ],[ 82 ],[
83 'name.required' => 'name不能为空', 83 'name.required' => 'name不能为空',
84 - 'user_list.required' => 'user_list不能为空', 84 +// 'user_list.required' => 'user_list不能为空',
85 'remark.required' => 'remark不能为空' 85 'remark.required' => 'remark不能为空'
86 ]); 86 ]);
87 $logic->specialSave(); 87 $logic->specialSave();
@@ -105,8 +105,12 @@ class ImageController extends Controller @@ -105,8 +105,12 @@ class ImageController extends Controller
105 if ($info === false) { 105 if ($info === false) {
106 $this->response('指定图片不存在!', Code::USER_ERROR); 106 $this->response('指定图片不存在!', Code::USER_ERROR);
107 } 107 }
108 - //查看缩略图是否存在  
109 - $filename = $this->config['root'] . '/' .$info['path'] . '_' . $w . '_' . $h; 108 + if($info['is_cos'] == 1){
  109 + $filename = getImageUrl($info['path']);
  110 + }else{
  111 + //查看缩略图是否存在
  112 + $filename = $this->config['root'] . $info['path'] . '_' . $w . '_' . $h;
  113 + }
110 if(is_file($filename)){ 114 if(is_file($filename)){
111 $content = file_get_contents($filename); 115 $content = file_get_contents($filename);
112 $header['Content-Length'] = strlen($content); 116 $header['Content-Length'] = strlen($content);
@@ -127,7 +131,7 @@ class ImageController extends Controller @@ -127,7 +131,7 @@ class ImageController extends Controller
127 */ 131 */
128 public function readImageContent($info,$w,$h) 132 public function readImageContent($info,$w,$h)
129 { 133 {
130 - $path = $this->config['root'] . '/' . $info['path']; 134 + $path = $this->config['root'] . $info['path'];
131 if (!is_file($path)) { 135 if (!is_file($path)) {
132 $this->response('指定图片已被系统删除!', Code::USER_ERROR); 136 $this->response('指定图片已被系统删除!', Code::USER_ERROR);
133 } 137 }