getPlatformData(); if(!empty($this->platformData)) { foreach ($this->platformData as $v) { if ($v['id'] == $id) { return $field == '*' ? $v : $v[$field]; } } } return null; } /** * 平台数据 * @return mixed|\think\Collection * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function getPlatformData(){ if(empty($this->platformData)) $this->platformData = $this->order("seq desc")->select(); return $this->platformData; } }