| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\logic\advert;
- use plugin\saiadmin\basic\BaseLogic;
- use plugin\saiadmin\exception\ApiException;
- use plugin\saiadmin\utils\Helper;
- use app\v1\model\advert\AgentList;
- /**
- * 渠道管理逻辑层
- */
- class AgentListLogic extends BaseLogic
- {
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->model = new AgentList();
- }
- /**
- * 查询渠道列表Options
- */
- public function getAgentOptions()
- {
- $data = $this->model->field('id as value,name as label')->select()->toArray();
- $data = array_map(function ($item) {
- return [
- 'label' => $item['label'].'【' . $item['value'] . '】' ,
- 'value' => $item['value'],
- ];
- }, $data);
- return $data;
- }
- }
|