合并分支 'master-server' 到 'master'
渠道设置修改 查看合并请求 !644
正在显示
3 个修改的文件
包含
13 行增加
和
10 行删除
| @@ -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 | } |
| @@ -637,12 +637,21 @@ class ProjectLogic extends BaseLogic | @@ -637,12 +637,21 @@ class ProjectLogic extends BaseLogic | ||
| 637 | public function channelSource($param){ | 637 | public function channelSource($param){ |
| 638 | switch ($param['type']){ | 638 | switch ($param['type']){ |
| 639 | case Project::TYPE_ONE: | 639 | case Project::TYPE_ONE: |
| 640 | - return Zone::pluck('title', 'id')->toArray(); | 640 | + $data = [0=>'所有']; |
| 641 | + $list = (new Zone())->list([],'id',['id','title'],'asc'); | ||
| 642 | + foreach ($list as $v){ | ||
| 643 | + $data[$v['id']] = $v['title']; | ||
| 644 | + } | ||
| 645 | + return $data; | ||
| 641 | case Project::TYPE_TWO: | 646 | case Project::TYPE_TWO: |
| 642 | if(isset($param['alias'])){ | 647 | if(isset($param['alias'])){ |
| 643 | return Channel::where('alias', 'like' ,'%'.$param['alias'].'%')->pluck('alias', 'id')->toArray(); | 648 | return Channel::where('alias', 'like' ,'%'.$param['alias'].'%')->pluck('alias', 'id')->toArray(); |
| 644 | } | 649 | } |
| 645 | - return Channel::where('zone_id', $param['zone_id']??0)->pluck('alias', 'id')->toArray(); | 650 | + $map = []; |
| 651 | + if($param['zone_id'] != 0){ | ||
| 652 | + $map['zone_id'] = $param['zone_id']; | ||
| 653 | + } | ||
| 654 | + return Channel::where($map)->pluck('alias', 'id')->toArray(); | ||
| 646 | case Project::TYPE_THREE: | 655 | case Project::TYPE_THREE: |
| 647 | return User::where('channel_id', $param['channel_id']??0)->pluck('name', 'id')->toArray(); | 656 | return User::where('channel_id', $param['channel_id']??0)->pluck('name', 'id')->toArray(); |
| 648 | } | 657 | } |
| @@ -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 | } |
-
请 注册 或 登录 后发表评论