Blame view

天文台pc/daocheng-api/app/common/KioskDefaults.php 4.62 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
  <?php
  declare(strict_types=1);
  
  namespace app\common;
  
  /**
   * 展台默认配置(库表为空时写入 kiosk_kv 等)。
   * 天文知识库不在此注入演示数据,条目仅通过管理端同步或 API 写入。
   */
  class KioskDefaults
  {
      public const KEY_HOME_BG     = 'home_backgrounds';
      public const KEY_WELCOME     = 'welcome';
      public const KEY_GUIDE       = 'guide';
  
      public static function homeBackgrounds(): array
      {
          return [
              '/backgrounds/daocheng-radio-array.png',
              '/backgrounds/daocheng-campus-aerial.png',
          ];
      }
  
      public static function welcome(): array
      {
          return [
              'zh-CN' => '欢迎来到稻城天文台信息查询',
              'en'    => 'Welcome to the Daocheng Observatory Information Query',
              'bo'    => 'འདབ་ཆུ་གནམ་གཟིགས་ལྟེ་གནས་ཀྱི་ཆ་འཕྲིན་འཚོལ་ཞིབ་ལ་ཕེབས་པར་དགའ་བསུ་ཞུ།',
          ];
      }
  
      /** GuideOverrides 形状 */
      public static function guide(): array
      {
          return [];
      }
  
      /** @return list<array<string, mixed>> 空数组:不在安装时写入演示知识条目 */
      public static function knowledge(): array
      {
          return [];
      }
  
      public static function observatoryHistory(): array
      {
          return [
              ['kind' => '图集', 'title' => '稻城台址建设与首光纪实', 'summary' => '记录望远镜安装、调试与首次科学成像的历史影像与说明文字。', 'date_str' => '2024-11', 'thumb' => 'https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?auto=format&fit=crop&w=640&q=80'],
              ['kind' => '文献', 'title' => '高原天文观测环境白皮书', 'summary' => '台址气象、视宁度与设备运维要点,供公众与科研人员查阅。', 'date_str' => '2025-03', 'thumb' => 'https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=640&q=80'],
              ['kind' => '图集', 'title' => '深空天体公众开放夜精选', 'summary' => '历次开放观测活动中拍摄的星云、星团等代表性科普图片与配文。', 'date_str' => '2025-08', 'thumb' => 'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?auto=format&fit=crop&w=640&q=80'],
              ['kind' => '图集', 'title' => '射电阵列与光学望远镜协同', 'summary' => '多波段联合观测示意图、现场工作照及技术解读。', 'date_str' => '2026-01', 'thumb' => 'https://images.unsplash.com/photo-1464802686167-b939a6910659?auto=format&fit=crop&w=640&q=80'],
          ];
      }
  
      public static function realtimeImages(): array
      {
          return [
              ['name' => 'M42 猎户座大星云', 'time_str' => '2026-03-27 20:15:32', 'telescope' => '2.5米主镜', 'exposure' => '300秒', 'image_url' => 'https://images.unsplash.com/photo-1628632642012-290ae1f4b1ac?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1200'],
              ['name' => 'NGC 7293 螺旋星云', 'time_str' => '2026-03-27 21:30:45', 'telescope' => '1.8米副镜', 'exposure' => '450秒', 'image_url' => 'https://images.unsplash.com/photo-1631594274394-279ab758c1ed?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1200'],
              ['name' => '木星及其卫星系统', 'time_str' => '2026-03-27 22:05:18', 'telescope' => '0.5米行星镜', 'exposure' => '0.1秒', 'image_url' => 'https://images.unsplash.com/photo-1615653058464-841639bb85ba?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&w=1200'],
          ];
      }
  
      public static function observationStatus(): array
      {
          return [
              'weather_label' => '晴朗',
              'seeing'        => '0.8" (优秀)',
              'transparency'  => '95%',
              'moon_phase'    => '下弦月 45%',
          ];
      }
  
      public static function observationDaily(): array
      {
          return [
              ['record_date' => '2026-03-27', 'observations' => 45, 'quality' => '优秀', 'weather' => '晴朗'],
              ['record_date' => '2026-03-26', 'observations' => 38, 'quality' => '良好', 'weather' => '多云'],
              ['record_date' => '2026-03-25', 'observations' => 52, 'quality' => '优秀', 'weather' => '晴朗'],
              ['record_date' => '2026-03-24', 'observations' => 28, 'quality' => '一般', 'weather' => '薄云'],
              ['record_date' => '2026-03-23', 'observations' => 0, 'quality' => '-', 'weather' => '阴天'],
              ['record_date' => '2026-03-22', 'observations' => 41, 'quality' => '良好', 'weather' => '晴朗'],
              ['record_date' => '2026-03-21', 'observations' => 63, 'quality' => '优秀', 'weather' => '晴朗'],
          ];
      }
  }