post(); if(!$data['id']){ $data['org_id'] = cur_org_id(); } if($data['type'] == 1){ $data['url'] = ''; }else{ $data['tid'] = 0; $data['content'] = ''; } return $this->updateInfo($data,'Screen',''); } // 大屏接口获取详情 public function getInfo($id,$orgId){ $info = Db::name('screen')->where('id',$id)->where('del',0)->find(); if($info){ $info['org_id'] = $orgId; $temp = Db::name('screen_template')->where('id',$info['tid'])->value('name'); $info['temp_name'] = $temp?$temp:''; $content = $info['content']?json_decode($info['content'],true):[]; foreach ($content as $k=>$v){ $module = Db::name('screen_module')->where('id',$v['mid'])->value('name'); $content[$k]['name'] = $module?$module:''; } $info['content'] = $content; $org = Db::name('org')->where('id',$info['org_id'])->value('name'); $info['org_name'] = $org?$org:''; } return $info; } }