作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -379,15 +379,27 @@ class ImageController extends Controller @@ -379,15 +379,27 @@ class ImageController extends Controller
379 $max = config('upload.default_b_image')['size']['max']; 379 $max = config('upload.default_b_image')['size']['max'];
380 if(is_array($files)){ 380 if(is_array($files)){
381 foreach ($files as $file){ 381 foreach ($files as $file){
  382 + if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
  383 + if ($file->getSize() > $this->cache['image_max']) {
  384 + $this->response('图片最大为500K',Code::SYSTEM_ERROR);
  385 + }
  386 + }else{
382 if ($file->getSize() > $max) { 387 if ($file->getSize() > $max) {
383 $this->response('图片最大为500K',Code::SYSTEM_ERROR); 388 $this->response('图片最大为500K',Code::SYSTEM_ERROR);
384 } 389 }
385 } 390 }
  391 + }
  392 + }else{
  393 + if(isset($this->cache['image_max']) && ($this->cache['image_max'] != 0)){
  394 + if ($files->getSize() > $this->cache['image_max']) {
  395 + $this->response('图片最大为500K',Code::SYSTEM_ERROR);
  396 + }
386 }else{ 397 }else{
387 if ($files->getSize() > $max) { 398 if ($files->getSize() > $max) {
388 $this->response('图片最大为500K',Code::SYSTEM_ERROR); 399 $this->response('图片最大为500K',Code::SYSTEM_ERROR);
389 } 400 }
390 } 401 }
  402 + }
391 if(!isset($this->param['upload_method'])){ 403 if(!isset($this->param['upload_method'])){
392 //根据项目上传标识区分上传到cos/本地 404 //根据项目上传标识区分上传到cos/本地
393 $projectModel = new Project(); 405 $projectModel = new Project();
@@ -292,7 +292,8 @@ class BlogLogic extends BaseLogic @@ -292,7 +292,8 @@ class BlogLogic extends BaseLogic
292 'operator_id' => $user_id, 292 'operator_id' => $user_id,
293 'create_id' => $user_id, 293 'create_id' => $user_id,
294 'status' => Blog::STATUS_ONE, 294 'status' => Blog::STATUS_ONE,
295 - 'url' => '' 295 + 'url' => '',
  296 + 'is_upgrade'=>1
296 ] 297 ]
297 ); 298 );
298 //更新路由 299 //更新路由
@@ -328,7 +328,8 @@ class NewsLogic extends BaseLogic @@ -328,7 +328,8 @@ class NewsLogic extends BaseLogic
328 'operator_id' => $user_id, 328 'operator_id' => $user_id,
329 'create_id' => $user_id, 329 'create_id' => $user_id,
330 'status' => News::STATUS_ONE, 330 'status' => News::STATUS_ONE,
331 - 'url' => '' 331 + 'url' => '',
  332 + 'is_upgrade'=>1
332 ] 333 ]
333 ); 334 );
334 //更新路由 335 //更新路由
@@ -637,7 +637,8 @@ class ProductLogic extends BaseLogic @@ -637,7 +637,8 @@ class ProductLogic extends BaseLogic
637 'content' => $content, 637 'content' => $content,
638 'seo_mate' => Arr::a2s($seo_mate), 638 'seo_mate' => Arr::a2s($seo_mate),
639 'created_uid' => $user_id, 639 'created_uid' => $user_id,
640 - 'status' => Product::STATUS_ON 640 + 'status' => Product::STATUS_ON,
  641 + 'is_upgrade'=>1
641 ] 642 ]
642 ); 643 );
643 //更新路由 644 //更新路由