mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-07-01 19:32:48 +08:00
docs: 为 category-api 和 apikey-article-api 添加项目笔记文件
- 添加 category-api 的 problems、decisions、learnings、issues 文档 - 添加 apikey-article-api 的 issues、decisions、learnings 文档 - 包含架构决策、问题记录和学习总结
This commit is contained in:
@@ -19,7 +19,19 @@ class ApiKey extends Common
|
||||
if (!empty($api_key)) {
|
||||
$api_key->api_key_preview = substr($api_key->getData('api_key'), 0, 8) . '...';
|
||||
$api_key->status_text = $api_key->status == 1 ? '启用' : '禁用';
|
||||
$api_key->create_time_text = date('Y-m-d H:i:s', $api_key->create_time);
|
||||
$create_time = $api_key->getData('create_time');
|
||||
$timestamp = null;
|
||||
|
||||
if (is_int($create_time) || (is_string($create_time) && ctype_digit($create_time))) {
|
||||
$timestamp = (int) $create_time;
|
||||
} elseif (is_string($create_time) && $create_time !== '') {
|
||||
$parsed_time = strtotime($create_time);
|
||||
if ($parsed_time !== false) {
|
||||
$timestamp = $parsed_time;
|
||||
}
|
||||
}
|
||||
|
||||
$api_key->create_time_text = $timestamp !== null ? date('Y-m-d H:i:s', $timestamp) : '-';
|
||||
}
|
||||
|
||||
View::assign('api_key', $api_key);
|
||||
|
||||
Reference in New Issue
Block a user