get_lang('enum_member.account_point'), self::BALANCE => get_lang('enum_member.account_balance'), self::MONEY => get_lang('enum_member.account_money'), self::COMMISSION => get_lang('enum_member.account_commission'), ]; if (empty($type)) { return $data; } return $data[ $type ] ?? ''; } /** * 获取账户变动方式 * @param string $type * @return array|mixed|string */ public static function getFromType($type = '') { $type_util = new ConfigUtil(root_path() . str_replace('/', DIRECTORY_SEPARATOR, "app/enum/member/fromtypes")); $file_data = $type_util->loadFiles(); $types = []; foreach ($file_data as $data) { $types = empty($types) ? $data : array_merge2($types, $data); } if (empty($type)) { return $types; } return $types[ $type ] ?? ''; } }