作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -123,6 +123,9 @@ class UpdateSeoTdk extends Command @@ -123,6 +123,9 @@ class UpdateSeoTdk extends Command
123 if(empty($v['seo_description'])){ 123 if(empty($v['seo_description'])){
124 $data['seo_description'] = $this->ai_send('news_seo_description',$v['name']); 124 $data['seo_description'] = $this->ai_send('news_seo_description',$v['name']);
125 } 125 }
  126 + if(!$data){
  127 + continue;
  128 + }
126 DB::connection('custom_mysql')->table('gl_news')->where(['id'=>$v['id']])->update($data); 129 DB::connection('custom_mysql')->table('gl_news')->where(['id'=>$v['id']])->update($data);
127 } 130 }
128 } 131 }
@@ -151,6 +154,9 @@ class UpdateSeoTdk extends Command @@ -151,6 +154,9 @@ class UpdateSeoTdk extends Command
151 if(empty($v['seo_description'])){ 154 if(empty($v['seo_description'])){
152 $data['seo_description'] = $this->ai_send('blog_seo_description',$v['name']); 155 $data['seo_description'] = $this->ai_send('blog_seo_description',$v['name']);
153 } 156 }
  157 + if(!$data){
  158 + continue;
  159 + }
154 DB::connection('custom_mysql')->table('gl_blog')->where(['id'=>$v['id']])->update($data); 160 DB::connection('custom_mysql')->table('gl_blog')->where(['id'=>$v['id']])->update($data);
155 } 161 }
156 } 162 }
@@ -24,7 +24,7 @@ class NewsRequest extends FormRequest @@ -24,7 +24,7 @@ class NewsRequest extends FormRequest
24 public function rules() 24 public function rules()
25 { 25 {
26 return [ 26 return [
27 - 'name'=>'required|max:100', 27 + 'name'=>'required|max:200',
28 'url'=>'required', 28 'url'=>'required',
29 ]; 29 ];
30 } 30 }
@@ -33,7 +33,7 @@ class NewsRequest extends FormRequest @@ -33,7 +33,7 @@ class NewsRequest extends FormRequest
33 { 33 {
34 return [ 34 return [
35 'name.required'=>'请填写名称', 35 'name.required'=>'请填写名称',
36 - 'name.max'=>'名称最大100字', 36 + 'name.max'=>'名称最大200字',
37 'url.required'=>'新闻链接不能为空' 37 'url.required'=>'新闻链接不能为空'
38 ]; 38 ];
39 } 39 }