Merge branch 'dev' of https://gitea.f2b211.com/jsasg/orico-official-website into dev
This commit is contained in:
@@ -34,12 +34,12 @@ class Banner
|
|||||||
$datas = [];
|
$datas = [];
|
||||||
if (!$banners->isEmpty()) {
|
if (!$banners->isEmpty()) {
|
||||||
$temp = [];
|
$temp = [];
|
||||||
$map = ['pc' => 'PC端', 'mobile' => '移动端'];
|
$map = ['pc' => ['id' => -1, 'name' => 'PC端'], 'mobile' => ['id' => -2, 'name' => '移动端']];
|
||||||
foreach ($banners as $banner) {
|
foreach ($banners as $banner) {
|
||||||
if (!isset($temp[$banner->at_platform])) {
|
if (!isset($temp[$banner->at_platform])) {
|
||||||
$temp[$banner->at_platform] = [
|
$temp[$banner->at_platform] = [
|
||||||
'id' => 0,
|
'id' => $map[$banner->at_platform]['id'] ?? 0,
|
||||||
'name' => $map[$banner->at_platform] ?? '未知平台',
|
'name' => $map[$banner->at_platform]['name'] ?? '未知平台',
|
||||||
'children' => []
|
'children' => []
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user