type = lcfirst(array_pop($path)); } else { $this->type = $type; } $this->footInfo = $this->dealData($obj, $this->type); $this->user = $user; $this->employee = $employee; $this->org = $org; } public function dealData($obj, $type) { if(!$obj) return []; $data = is_array($obj) ? $obj : $obj->toArray(); $typeColumn = [ 'wwbm' => ['name', 'remark', 'phone'], //微网报名 'activity' => ['id', 'title'], //活动 'materialCase' => ['id', 'title'], //案例 'materialEvidence' => ['id', 'title'], //口碑见证 'priceCalculation' => ['value', 'name', 'mobile', 'community', 'area', 'bedroom', 'style', 'type'], //装修报价 'styleTest' => ['value', 'style', 'id'], //风格测一测 'likeTest' => ['value', 'style', 'id'], //喜好测一测 'toolDecohelper' => ['id', 'title'], //装修知识 'video' => ['id', 'title'], //视频 'share' => ['name','mobile', 'data', 'remark'], //链接分享报名 'article' => ['id', 'title'], //图文素材 'building' => ['id', 'name','prompt'], //楼盘进度 'construction' => ['id', 'name'], //在施工地 'designer' => ['id', 'title', 'share_pipe_type', 'share_data_id','mobile'], //预约设计师 'card' => [], //名片 'quote' => ['area', 'room', 'hall', 'bathroom', 'phone'], //装修报价 'building_urge'=> ['id', 'name','phone'], //热装楼盘催更新 'CompanyStrength'=> ['id', 'title'], //公司实力 'companyStrength'=> ['id', 'title'], //公司实力 'askedfitup' => ['phone'],//热装楼盘询问装修 'lottery' => ['actid','type','title','luckname'],//大转盘砸金蛋 'materialCaseVr' => ['id','title'],//案例详情vr 'buildingVr' => ['id','name'],//热装楼盘详情vr 'constructionVr' => ['id','name'],//在施工地详情vr 'companyVr' => ['id','vr_show','name'],//原来VR展厅 'employeeCardVr' => [], //vr名片 'getDecorationDesign' => ['community', 'area', 'bedroom', 'mobile'], // 获取设计方案 'toolAll' => ['uid','name','type'], //谈单工具 'agents' => ['agent_name', 'agent_phone'], //经纪人分享 'spellgroup' => [], //装修拼团 'devcase' => ['id','name'], 'progressDetail' => ['id','name'],//楼盘进度详情 'activitySignUp' => ['phone','aid','uid'],//活动报名 'agentArticle' => ['id', 'title'], //经纪人分享文章 'agentShareContentCrm' => ['name', 'phone', 'community_name'], //经纪人分享的内容客户进行报名 'TrainClassList' => ['id'], //课程列表 'TrainClass' => ['id','title'], //课程详情 'TrainCourse' => ['id','title','class_title','class_id'], //课件详情 'housetype' => ['id','room','hall','bathroom'],//户型足迹 'buildingHousetype' => ['id','room','hall','bathroom'],//户型足迹 'groupVr' => ['id','title','prompt','phone'],//户型足迹 'groupVrVr' => ['id','title','prompt','phone'],//户型足迹 'housetypeVr' => ['id','room','hall','bathroom','prompt'],//户型足迹 ]; if (!isset($typeColumn[$type])) return []; $jData = []; foreach ($typeColumn[$type] as $c) { if (isset($data[$c])) $jData[$c] = $data[$c]; } return $jData; } }