aliyunLive = \Api\AliyunLive::instance([ 'AccessKey' => SystemConfigService::get('accessKeyId'), 'AccessKeySecret' => SystemConfigService::get('accessKeySecret'), 'OssEndpoint' => SystemConfigService::get('aliyun_live_end_point'), 'OssBucket' => SystemConfigService::get('aliyun_live_oss_bucket'), 'appName' => SystemConfigService::get('aliyun_live_appName'), 'payKey' => SystemConfigService::get('aliyun_live_play_key'), 'key' => SystemConfigService::get('aliyun_live_push_key'), 'playLike' => SystemConfigService::get('aliyun_live_playLike'), 'rtmpLink' => SystemConfigService::get('aliyun_live_rtmpLink'), ]); } /** * 直播间管理 * */ public function index() { $this->assign([ 'special_list' => SpecialModel::where('type', SPECIAL_LIVE)->where(['is_del' => 0])->field(['id', 'title'])->select()->toArray(), 'type' => $this->request->param('type', 1), ]); return $this->fetch(); } /** * 直播专题列表 * @param int $subject_id * @return mixed */ public function special_live() { $special_type = $this->request->param("special_type"); if (!$special_type || !is_numeric($special_type)) return $this->failed('专题类型参数缺失'); $subjectlist = SpecialSubject::specialCategoryAll(); $this->assign([ 'type' => 1, 'special_type' => $special_type, 'special_title' => SPECIAL_TYPE[$special_type], 'subject_list' => $subjectlist, 'is_live' => 1, ]); return $this->fetch(); } /** * 获取专题直播列表 */ public function special_list() { $where = parent::getMore([ ['subject_id', 0], ['page', 1], ['limit', 20], ['store_name', ''], ['title', ''], ['start_time', ''], ['end_time', ''], ['order', ''], ['is_show', ''], ['special_type', 4], ['status', ''], ]); if (isset($where['special_type'])) { $where['type'] = $where['special_type']; } // $where['agent_id'] = $this->merchantId; $special_list = SpecialModel::getSpecialList($where); return Json::successlayui($special_list); } public function mer_live_reward() { $this->assign([ 'gold_name' => SystemConfigService::get("gold_name") ]); return $this->fetch(); } /** * 收益列表 */ public function mer_live_reward_list() { $where = parent::postMore([ ['page', 1], ['limit', 20], ['order', ''], ['live_id', 0], ]); $where['mer_id'] = $this->merchantId; return Json::successlayui(LiveReward::get_mer_live_reward_list($where)); } }