0, 'title' => '全部']]; $channelList = Category::where('status', 'normal') ->field('id,pid,name,nickname,diyname') ->order('weigh desc,id desc') ->select(); foreach ($channelList as $index => $item) { $tabList[] = ['id' => $item['id'], 'title' => $item['name']]; } //配置信息 $upload = Config::get('upload'); $upload['cdnurl'] = $upload['cdnurl'] ? $upload['cdnurl'] : cdnurl('', true); $upload['uploadurl'] = $upload['uploadurl'] == 'ajax/upload' ? cdnurl('/ajax/upload', true) : $upload['cdnurl']; $config = [ 'upload' => $upload ]; $data = [ 'tabList' => $tabList, 'config' => $config ]; $this->success('', $data); } }