作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !732
@@ -321,6 +321,11 @@ class ProjectUpdate extends Command @@ -321,6 +321,11 @@ class ProjectUpdate extends Command
321 $attrs[] = ['key' => $k_attr, 'value' => $attr]; 321 $attrs[] = ['key' => $k_attr, 'value' => $attr];
322 } 322 }
323 } 323 }
  324 + //下载文件
  325 + $files = '';
  326 + if ($item['file'] ?? '') {
  327 + $files = json_encode(['url' => $this->source_download($item['file'], $project_id, $domain_arr['host'], $web_url_domain, $home_url, 1), 'text' => 'Download']);
  328 + }
324 //名称去掉特殊符号 329 //名称去掉特殊符号
325 $item['ttile'] = $this->special2str($item['ttile'] ?? ''); 330 $item['ttile'] = $this->special2str($item['ttile'] ?? '');
326 331
@@ -347,6 +352,7 @@ class ProjectUpdate extends Command @@ -347,6 +352,7 @@ class ProjectUpdate extends Command
347 'updated_at' => $item['post_date'] ?? date('Y-m-d H:i:s'), 352 'updated_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
348 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'), 353 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'),
349 'sort' => $item['sort'] ?? 0, 354 'sort' => $item['sort'] ?? 0,
  355 + 'files' => $files,
350 'is_upgrade' => 1, 356 'is_upgrade' => 1,
351 'six_read' => 1, 357 'six_read' => 1,
352 'route' => $route 358 'route' => $route
@@ -375,6 +381,7 @@ class ProjectUpdate extends Command @@ -375,6 +381,7 @@ class ProjectUpdate extends Command
375 ]), 381 ]),
376 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'), 382 'send_time' => $item['post_date'] ?? date('Y-m-d H:i:s'),
377 'sort' => $item['sort'] ?? 0, 383 'sort' => $item['sort'] ?? 0,
  384 + 'files' => $files,
378 ], ['id' => $id]); 385 ], ['id' => $id]);
379 } else { 386 } else {
380 //按6.0展示只更新分类 387 //按6.0展示只更新分类