belongsTo('CustomUrlCollect', 'id')->setEagerlyType(0); // } public function getMessageTypeList() { return ['0' => __('Message_type 0'),'1' => __('Message_type 1')]; } public function getTypeList() { return ['0' => __('Type 0'),'1' => __('Type 1'),'2' => __('Type 2'),'3' => __('Type 3'),'4' => __('Type 4'),'5' => __('Type 5'),'6' => __('Type 6'),'7' => __('自动签到'),'8' => __('常用链接')]; } public function getOfficialAccountTypeList() { return ['0' => __('Official_account_type 0'),'1' => __('Official_account_type 1')]; } public function getPushTypeList() { return ['0' => __('Push_type 0'),'1' => __('Push_type 1')]; } public function getMessageTypeTextAttr($value, $data) { $value = $value ? $value : $data['message_type']; $list = $this->getMessageTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : $data['type']; $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getOfficialAccountTypeTextAttr($value, $data) { $value = $value ? $value : $data['official_account_type']; $list = $this->getOfficialAccountTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getPushTypeTextAttr($value, $data) { $value = $value ? $value : $data['push_type']; $list = $this->getPushTypeList(); return isset($list[$value]) ? $list[$value] : ''; } }