diff --git a/app/index/controller/AboutUs.php b/app/index/controller/AboutUs.php new file mode 100644 index 00000000..5f3ce815 --- /dev/null +++ b/app/index/controller/AboutUs.php @@ -0,0 +1,73 @@ + $this->lang_id, + 'unique_label' => 'BANNER_67ff632a5f7aa' + ]) + ->type('image') + ->enabled(true) + ->visible(['id', 'title', 'title_txt_color', 'image', 'desc', 'desc_txt_color', 'link']) + ->order(['sort' => 'asc', 'id' => 'desc']) + ->select(); + View::assign('banners', $banners); + + return View::fetch('story'); + } + + /** + * 品牌里程 + */ + public function mileage() + { + $achievement = []; + $events = []; + $development = []; + + // 获取品牌里程banner + $banner = SysBannerModel::with(['items']) + ->uniqueLabel([ + 'BANNER_67ff786dc9c8d', + 'BANNER_67ff7ef1354cf', + 'BANNER_67ff7f37a0b67', + ]) + ->language($this->lang_id) + ->enabled(true) + ->select(); + if (!$banner->isEmpty()) { + $banner_map = []; + foreach ($banner as $v) { + $banner_map[$v->unique_label] = $v; + } + $achievement = $banner_map['BANNER_67ff786dc9c8d']->items->where('status', '=', 1)->toArray(); + $events = $banner_map['BANNER_67ff7ef1354cf']->items->where('status', '=', 1)->toArray(); + $development = $banner_map['BANNER_67ff7f37a0b67']->items->where('status', '=', 1)->toArray(); + // 排序(避免关联方法使用order排序bug) + array_multisort(array_column($achievement, 'sort'), SORT_ASC, array_column($achievement, 'id'), SORT_DESC, $achievement); + array_multisort(array_column($events, 'sort'), SORT_ASC, array_column($events, 'id'), SORT_DESC, $events); + array_multisort(array_column($development, 'sort'), SORT_ASC, array_column($development, 'id'), SORT_DESC, $development); + } + View::assign('achievement', $achievement); + View::assign('events', $events); + View::assign('development', $development); + + return View::fetch('mileage'); + } +} diff --git a/app/index/controller/Brand.php b/app/index/controller/Brand.php deleted file mode 100644 index 6cf7fd5d..00000000 --- a/app/index/controller/Brand.php +++ /dev/null @@ -1,43 +0,0 @@ - $this->lang_id, - 'unique_label' => 'BANNER_67ff632a5f7aa' - ]) - ->type('image') - ->enabled(true) - ->visible(['id', 'title', 'title_txt_color', 'image', 'desc', 'desc_txt_color', 'link']) - ->order(['sort' => 'asc', 'id' => 'desc']) - ->select(); - View::assign('banners', $banners); - - return View::fetch('story'); - } - - /** - * 品牌里程 - */ - public function mileage() - { - - return View::fetch('mileage'); - } -} diff --git a/app/index/lang/en-us.php b/app/index/lang/en-us.php index 27d361d4..b4d3c7dd 100644 --- a/app/index/lang/en-us.php +++ b/app/index/lang/en-us.php @@ -40,5 +40,10 @@ return [ 'search_placeholder' => 'Search model', 'no_data' => 'No Result!', 'no_video' => 'No Video!', - ] + ], + 'mileage' => [ + 'achievement' => 'Our Achievement', + 'events' => 'Brand Events', + 'development' => 'Tech Development', + ], ]; \ No newline at end of file diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php index f7c9a628..7d05af86 100644 --- a/app/index/lang/zh-cn.php +++ b/app/index/lang/zh-cn.php @@ -40,5 +40,10 @@ return [ 'search_placeholder' => '搜索型号', 'no_data' => '查询无结果!', 'no_video' => '查询无此视频!', - ] + ], + 'mileage' => [ + 'achievement' => 'ORICO荣耀', + 'events' => '品牌里程', + 'development' => '品牌活动', + ], ]; \ No newline at end of file diff --git a/app/index/route/route.php b/app/index/route/route.php index f349a2d7..335ac018 100644 --- a/app/index/route/route.php +++ b/app/index/route/route.php @@ -48,12 +48,12 @@ Route::group('faq', function() { Route::get('index', 'Faq/index'); }); -// 品牌 -Route::group('brand', function() { +// 关于我们 +Route::group('aboutus', function() { // 品牌故事 - Route::get('story', 'Brand/story'); + Route::get('story', 'AboutUs/story'); // 品牌里程 - Route::get('mileage', 'Brand/mileage'); + Route::get('mileage', 'AboutUs/mileage'); }); // 数据迁移 diff --git a/app/index/view/about_us/mileage.html b/app/index/view/about_us/mileage.html new file mode 100644 index 00000000..e8ada267 --- /dev/null +++ b/app/index/view/about_us/mileage.html @@ -0,0 +1,96 @@ +{extend name="public/base" /} +{block name="style"} + +{/block} +{block name="main"} +
+
+ +
+
{:lang('mileage.achievement')}
+ {notempty name="achievement"} +
+ {volist name="achievement" id="ac"} +
+
{$ac.desc|raw}
+
{$ac.title}
+
+ {/volist} +
+ {/notempty} +
+
+ {notempty name="events"} +
+
{:lang('mileage.events')}
+
+
+
    + {volist name="events" id="ev" key="k"} +
  • + +
  • + {/volist} +
+
+
+
+
    + {volist name="events" id="ev" key="k"} +
    +

    + {$ev.title} +

    +
  • {$ev.desc|raw}
  • +
    + {/volist} +
+
+
+
+
+ {/notempty} +
+
+ {notempty name="development"} +
+
{:lang('mileage.development')}
+ {volist name="development" id="de"} +
+
+ +
{$de.title}
+
{$de.desc|raw}
+
+
+ +
+
+ {/volist} +
+ {/notempty} +
+
+
+{/block} +{block name="script"} + +{/block} \ No newline at end of file diff --git a/app/index/view/brand/story.html b/app/index/view/about_us/story.html similarity index 100% rename from app/index/view/brand/story.html rename to app/index/view/about_us/story.html diff --git a/app/index/view/brand/mileage.html b/app/index/view/brand/mileage.html deleted file mode 100644 index e69de29b..00000000 diff --git a/public/static/index/css/achievement.css b/public/static/index/css/achievement.css index 82acd66d..e272dabd 100755 --- a/public/static/index/css/achievement.css +++ b/public/static/index/css/achievement.css @@ -1,7 +1,7 @@ .orico_Page_achievement { width: 100%; position: relative; - height: 100vh; + min-height: 100vh; overflow-y: auto; overflow-x: hidden; background: #f2f2f2; @@ -55,6 +55,9 @@ font-weight: bold; color: #000000; } +.orico_Page_achievement .achievementMain .achInfo .achNums .achive_shuju .title1 p { + font-family: inherit; +} .orico_Page_achievement .achievementMain .achInfo .achNums .achive_shuju .subtitle1 { margin-top: 1rem; font-size: 1.125rem; @@ -126,7 +129,7 @@ } .orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list { width: 98%; - background: url(../achievementimg/greyline.png) 50px 0 repeat-y; + background: url(/static/index/images/greyline.png) 50px 0 repeat-y; } .orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div { overflow: hidden; @@ -135,7 +138,7 @@ .orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div h3 { margin: 0 0 0 2.1875rem; padding-left: 2.5rem; - background: url(../achievementimg/greyyuandian.png) 3px 3px no-repeat; + background: url(/static/index/images/greyyuandian.png) 3px 3px no-repeat; height: 2.375rem; font-size: 1.25rem; font-family: Montserrat-Bold, Montserrat; @@ -144,31 +147,17 @@ line-height: 1.875rem; } .orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div .backgroundimg { - background: url(../achievementimg/yaundian.png) 3px 3px no-repeat !important; + background: url(/static/index/images/yaundian.png) 3px 3px no-repeat !important; } -.orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div li p { - width: 90%; - margin-left: 1.5rem; +.orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div li { display: inline-block; - padding-left: 0.625rem; + width: 100%; + font-family: Montserrat-Medium, Montserrat; line-height: 1.5625rem; font-size: 1rem; - margin-bottom: 0.625rem; - font-family: Montserrat-Medium, Montserrat; font-weight: 500; color: #707070; - line-height: 1.25rem; -} -.orico_Page_achievement .achievementMain .achTimes .timecontent .timelist .timeline-con .con_event_list .event_list div li p span { - font-family: Montserrat-Medium, Montserrat; - width: 100%; - text-align: left; - padding: 0 0.9375rem 0.625rem 0.9375rem; - background: #fff; - margin: 0; - margin-left: 1.875rem; - display: block; - float: left; + padding: 0 0 1.24rem 4.6875rem; } .orico_Page_achievement .achievementMain .tech { background: #fff; diff --git a/public/static/index/images/Achievement.png b/public/static/index/images/Achievement.png new file mode 100755 index 00000000..e7531628 Binary files /dev/null and b/public/static/index/images/Achievement.png differ diff --git a/public/static/index/images/greyline.png b/public/static/index/images/greyline.png new file mode 100755 index 00000000..08fd5038 Binary files /dev/null and b/public/static/index/images/greyline.png differ diff --git a/public/static/index/images/greyyuandian.png b/public/static/index/images/greyyuandian.png new file mode 100755 index 00000000..0300cf9e Binary files /dev/null and b/public/static/index/images/greyyuandian.png differ diff --git a/public/static/index/images/lichengbei.png b/public/static/index/images/lichengbei.png new file mode 100755 index 00000000..4a7d8b4a Binary files /dev/null and b/public/static/index/images/lichengbei.png differ diff --git a/public/static/index/images/yaundian.png b/public/static/index/images/yaundian.png new file mode 100755 index 00000000..740c12cc Binary files /dev/null and b/public/static/index/images/yaundian.png differ