123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <?php
- namespace app\sys\controller;
- use app\model\Company;
- use app\model\CompanyBossOpen;
- use app\logics\Unionaccount;
- use think\facade\View;
- use think\Cache;
- class Live
- {
- public function dashbordbaseinfo_allbase(){
- $cid = input('cid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/dashbordbaseinfo/allbase?cid='.$cid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function dashboard_rankList(){
- $page = input('page');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/dashboard/rankList?page='.$page;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function api_vod_currentstreams(){
- $cmcode = input('cmcode');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/vod/currentstreams/?cmcode='.$cmcode;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- //////////////////////
- public function api_goods_liveindex(){
- $cmcode = input('cmcode');
- $ctoken = input('ctoken');
- //$cid = Cache::get('cid_by_ctoken_'.$ctoken); //3小时过期
- //$url = 'https://'.config('app.bosslive_domain').'/saasapi/goods/liveIndex/?cid='.$cid;
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/goods/liveIndex/?cmcode='.$cmcode.'&ctoken='.$ctoken;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function api_waistcoat_waistcoats(){
- $cmid = input('cmid');
- $page = input('page');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/waistcoat/waistcoats/?cmid='.$cmid.'&page='.$page;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function api_waistcoat_waistcoatfikeorders(){
- $cid = input('cid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/waistcoat/waistcoats/?cid='.$cid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function api_chat_logs_commentlist(){
- $ctoken = input('ctoken');
- $page = input('page');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/chat_logs/commentList/?ctoken='.$ctoken.'&page='.$page;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function api_chat_logs_wcommentlist(){
- $cid = input('cid');
- $page = input('page');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/chat_logs/wcommentList/?cid='.$cid.'&page='.$page;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function chat_deleteByUuid(){
- $uuid = input('uuid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/chat/deleteByUuid/?uuid='.$uuid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function chat_delete(){
- $id = input('id');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/chat/delete/?id='.$id;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return $data;
- }
- public function blacklist_add(){
- $uuid = input('uuid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/blacklist/add/?uuid='.$uuid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return json_decode($data,true);
- }
- public function blacklist_add_two(){
- $uuid = input('uuid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/blacklist/add/?uuid='.$uuid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return $data;
- }
- public function blacklist_del(){
- $uid = input('uid');
- // 获取分页相关参数
- $url = 'https://'.config('app.bosslive_domain').'/saasapi/blacklist/del/?uid='.$uid;
- $cmunionid = $this->getcmucode();
- $data = curlparam($url,$cmunionid);
- // 返回数据
- return $data;
- }
- private function getcmucode(){
- $request = request();
- $root_id = $request->employee->root_id;
- $companybossopen = CompanyBossOpen::where(['root_id'=>$root_id])->find();
- $cmunionid = $companybossopen->unionid;
- return $cmunionid;
- }
- }
|