__('提现中'),'2' => __('打款中'),'3' => __('已打款')]; } public function getStateTextAttr($value, $data) { $value = $value ? $value : $data['state']; $list = $this->getStateList(); return isset($list[$value]) ? $list[$value] : ''; } public function getFinishtimeTextAttr($value, $data) { $value = $value ? $value : $data['finishtime']; return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value; } protected function setFinishtimeAttr($value) { return $value && !is_numeric($value) ? strtotime($value) : $value; } /** * 连接主库 * @return $this */ public function setConnect() { $config = Config::get('database'); $config['admin_rw_separate'] = false; $this->connect($config); return $this; } }