作者 lyh

gx

@@ -88,10 +88,7 @@ class AyrReleaseController extends BaseController @@ -88,10 +88,7 @@ class AyrReleaseController extends BaseController
88 } 88 }
89 //发送请求发布社交文章 89 //发送请求发布社交文章
90 $res = $ayrShare->post_send_msg($param,$share_info['profile_key']); 90 $res = $ayrShare->post_send_msg($param,$share_info['profile_key']);
91 - //保存数据库  
92 - if($res){  
93 - $ayrReleaseLogic->release_add($res);  
94 - } 91 + $ayrReleaseLogic->release_add($res);
95 //保存返回的内容 92 //保存返回的内容
96 $this->response('success',Code::SUCCESS,json_decode($res)); 93 $this->response('success',Code::SUCCESS,json_decode($res));
97 } 94 }
@@ -636,6 +636,8 @@ class ProjectLogic extends BaseLogic @@ -636,6 +636,8 @@ class ProjectLogic extends BaseLogic
636 636
637 public function channelSource($param){ 637 public function channelSource($param){
638 switch ($param['type']){ 638 switch ($param['type']){
  639 + case Project::TYPE_ZERO:
  640 + return array_push(Zone::pluck('title', 'id')->toArray(),[5,'所有']);
639 case Project::TYPE_ONE: 641 case Project::TYPE_ONE:
640 return Zone::pluck('title', 'id')->toArray(); 642 return Zone::pluck('title', 'id')->toArray();
641 case Project::TYPE_TWO: 643 case Project::TYPE_TWO:
@@ -47,10 +47,7 @@ class AyrReleaseLogic extends BaseLogic @@ -47,10 +47,7 @@ class AyrReleaseLogic extends BaseLogic
47 $this->param['platforms'] = json_encode($this->param['platforms']); 47 $this->param['platforms'] = json_encode($this->param['platforms']);
48 $info = $this->model->read(['platforms'=>$this->param['platforms'],'operator_id'=>$this->param['operator_id'],'project_id'=>$this->param['project_id'],'title'=>$this->param['title']]); 48 $info = $this->model->read(['platforms'=>$this->param['platforms'],'operator_id'=>$this->param['operator_id'],'project_id'=>$this->param['project_id'],'title'=>$this->param['title']]);
49 if($info === false){ 49 if($info === false){
50 - $rs = $this->model->add($this->param);  
51 - if($rs === false){  
52 - $this->fail('error');  
53 - } 50 + $this->model->add($this->param);
54 } 51 }
55 return $this->success(); 52 return $this->success();
56 } 53 }