From 7af1255408dff2642935f2d3e31c624ae56f3b0e Mon Sep 17 00:00:00 2001 From: zwesy Date: Thu, 3 Dec 2020 13:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E8=B5=B0=E8=BF=9B?= =?UTF-8?q?=E8=B6=85=E5=AE=87=E9=A1=B5=E9=9D=A2=E7=9B=B8=E5=85=B3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=BB=91=E5=AE=9A=E5=92=8C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common.php | 11 ++ app/controller/Index.php | 6 +- app/controller/Page.php | 72 ++++++++-- app/controller/manager/History.php | 18 +-- app/model/Article.php | 32 +++++ app/model/Block.php | 37 +++++ app/model/Category.php | 56 +++++--- app/model/History.php | 15 +- app/model/HistoryInfo.php | 4 +- app/model/Model.php | 3 + app/widget/manager/Crumbs.php | 1 - public/static/css/style.css | 205 ++++++++++++++++++++++++++-- public/static/js/script.js | 19 +++ view/manager/category/add.html | 41 +++--- view/manager/category/edit.html | 41 +++--- view/manager/history/add_info.html | 6 +- view/manager/history/edit_info.html | 6 +- view/manager/layout.html | 23 ++-- view/page/about.html | 165 ++++++++++++++++++++++ 19 files changed, 652 insertions(+), 109 deletions(-) create mode 100644 view/page/about.html diff --git a/app/common.php b/app/common.php index a495550..5a2ed6d 100644 --- a/app/common.php +++ b/app/common.php @@ -364,4 +364,15 @@ if(!function_exists('arrayHtmlFilter')){ } return $arr; } +} + +if(!function_exists('getImgSrc')) { + function getImgSrc($item, $defaultImg) + { + $imgSrc = $defaultImg; + if(!empty($item['src']) && file_exists('.'.$item['src'])) { + $imgSrc = $item['src']; + } + return $imgSrc; + } } \ No newline at end of file diff --git a/app/controller/Index.php b/app/controller/Index.php index fe34779..85c7965 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -17,13 +17,13 @@ class Index extends Base // 轮播图 $this->data['slides'] = Slide::getList(); // 网络营销栏目ID - $this->data['marketingCId'] = Category::$CIdList['marketing_network']; + $this->data['marketingCId'] = Category::$CIdList['marketing']; // 关联产品中心 $this->data['products'] = Article::getLatestByCategory(Category::$CIdList['products'], 4);; // 关联企业新闻 - $this->data['newsEnterprises'] = Article::getLatestByCategory(Category::$CIdList['news_enterprise'], 4); + $this->data['newsEnterprises'] = Article::getLatestByCategory(Category::$CIdList['news_children']['enterprise'], 4); // 关联行业资讯 - $this->data['newsIndustries'] = Article::getLatestByCategory(Category::$CIdList['news_industry'], 4);; + $this->data['newsIndustries'] = Article::getLatestByCategory(Category::$CIdList['news_children']['industry'], 4);; return $this->view(); } } \ No newline at end of file diff --git a/app/controller/Page.php b/app/controller/Page.php index 03a57c0..b721913 100644 --- a/app/controller/Page.php +++ b/app/controller/Page.php @@ -1,17 +1,10 @@ error('页面错误'); } - $childCategory = Category::getChildrenByParentId($categoryId); + $this->data['categoryId'] = $categoryId; $this->data['category'] = $category; - $this->data['childCategory'] = $childCategory; $this->data['blocks'] = Block::getByCategoryId($categoryId); + $this->templateDetailAssign($category); + return $this->view($category['template_detail']); } + + private function templateDetailAssign($category) + { + $template = $category['template_detail'] ?? ''; + $TopCId = Category::firstGradeById($category['id']); + if($TopCId == $category['id']) { + $topCategory = $category; + } else { + $topCategory = Category::getById($TopCId); + } + $childCategory = Category::getChildrenByParentId($category['id']); + + $this->data['topCategory'] = $topCategory; + $this->data['childCategory'] = $childCategory; + switch ($template) { + case 'about' : + $this->assignAbout($topCategory, $category, $childCategory); + break; + default : + } + } + + // 走进超宇 + private function assignAbout($topCategory, $category, $childCategory) + { + if(empty($childCategory)) { + $childCategory = Category::getChildrenByParentId($topCategory['id']); + } + $honorTopCId = Category::$CIdList['honors_manage'] ?? 0; + $historyCId = Category::$CIdList['history_manage'] ?? 0; + $historyCate = Category::getById($historyCId); + $honors = []; + $blockCateIds = []; + $blocks = []; + if($honorTopCId) { + $honors = Category::getChildrenByParentId($honorTopCId); + foreach ($honors as &$honor) { + $honor['items'] = Article::getListByCategoryIds([$honor['id']], 20); + } + unset($honor); + } + foreach ($childCategory as $cate) { + if($cate['model_id'] == Model::PAGE) { + $blockCateIds[] = $cate['id']; + } + } + $blockList = Block::getByCategoryIds($blockCateIds); + $aboutChildrenFlip = array_flip(Category::$CIdList['about_children']); + foreach ($childCategory as $cate) { + $blocks[$aboutChildrenFlip[$cate['id']]] = $blockList[$cate['id']] ?? []; + } + + $this->data['blocks'] = $blocks; + $this->data['honors'] = $honors; + $this->data['historyList'] = History::getByCategoryId($historyCId, true, $historyCate['number'] ?? -1); + //dump($this->data['honors']); + //dump($this->data['historyList']); + } } \ No newline at end of file diff --git a/app/controller/manager/History.php b/app/controller/manager/History.php index e55e595..3914312 100644 --- a/app/controller/manager/History.php +++ b/app/controller/manager/History.php @@ -85,12 +85,12 @@ class History extends Base if(empty($item)){ return $this->json(3, '该历程信息不存在'); } - if($sort == 'up'){ - $where = "category_id='{$item['category_id']}' and sort < {$item['sort']}"; - $order = "sort desc"; - }else{ + if($sort == 'up'){ // sort 变大 $where = "category_id='{$item['category_id']}' and sort > {$item['sort']}"; $order = "sort asc"; + }else{ // sort 变小 + $where = "category_id='{$item['category_id']}' and sort < {$item['sort']}"; + $order = "sort desc"; } $forSortItems = MHistory::getListByWhereAndOrder($where, $order, $num); if(!empty($forSortItems)){ @@ -201,7 +201,7 @@ class History extends Base } return $this->json(); } else { - $imgSize = ''; + $imgSize = '425像素 X 280像素'; $category = MCategory::getById($history['category_id']); if(count($category) > 0 && $category['img_width'] && $category['img_height']){ $imgSize = $category['img_width'] . '像素 X ' . $category['img_height'] . '像素'; @@ -247,7 +247,7 @@ class History extends Base return $this->json(); } else { $history = MHistory::getById($item['history_id']); - $imgSize = ''; + $imgSize = '425像素 X 280像素'; if(count($history) > 0) { $category = MCategory::getById($history['category_id']); if(count($category) > 0 && $category['img_width'] && $category['img_height']){ @@ -278,11 +278,11 @@ class History extends Base return $this->json(3, '该历程事例信息不存在'); } if($sort == 'up'){ - $where = "history_id='{$item['history_id']}' and sort < {$item['sort']}"; - $order = "sort desc"; - }else{ $where = "history_id='{$item['history_id']}' and sort > {$item['sort']}"; $order = "sort asc"; + }else{ + $where = "history_id='{$item['history_id']}' and sort < {$item['sort']}"; + $order = "sort desc"; } $forSortItems = MHistoryInfo::getListByWhereAndOrder($where, $order, $num); if(!empty($forSortItems)){ diff --git a/app/model/Article.php b/app/model/Article.php index f86a20d..d5d52cc 100644 --- a/app/model/Article.php +++ b/app/model/Article.php @@ -152,4 +152,36 @@ class Article extends Base } return $data; } + + // 查询栏目下的文章 + public static function getListByCategoryIds($categoryIds, $per = 20, $keyword = '', $param = [], $status = -1, $order = []) + { + $whereMap = []; + if(is_array($categoryIds) && count($categoryIds) > 0) { + $whereMap[] = ['category_id', 'in', $categoryIds]; + } + if(!empty($keyword)){ + $whereMap[] = ['title', 'like', '%'.$keyword.'%']; + } + if (is_array($param) && count($param) > 0) { + foreach ($param as $vo) { + if(in_array($vo, ['top','hot','recommend'], true)) { + $whereMap[] = ["{$vo}", '=', 1]; + } + } + } + if(is_numeric($status) && $status != -1){ + $whereMap[] = ['status', '=', $status]; + } + if(empty($order)) { + $order = ['sort'=>'desc']; + } + return self::when(count($whereMap) > 0, function($query) use ($whereMap) { + $query->where($whereMap); + }) + ->order($order) + ->limit($per) + ->select() + ->toArray(); + } } diff --git a/app/model/Block.php b/app/model/Block.php index dc7b277..5b94572 100644 --- a/app/model/Block.php +++ b/app/model/Block.php @@ -125,4 +125,41 @@ class Block extends Base } return $items; } + + // 按块元素的栏目分类和关键字进行分组 + public static function convertGroupByCategory(array $items) + { + $data = []; + foreach($items as $item){ + $data[$item['category_id']][$item['keyword']] = $item; + } + return $data; + } + + // 按块元素的关键字进行分组 + public static function convertGroupByKeyword(array $items) + { + $data = []; + foreach($items as $item){ + $data[$item['keyword']] = $item; + } + return $data; + } + + //根据栏目ID获取块列表 + public static function getByCategoryIds($categoryIds) + { + if(!is_array($categoryIds) || empty($categoryIds)){ + return []; + } + $items = self::whereIn('category_id', $categoryIds) + ->order('category_id', 'asc') + ->order('sort', 'asc') + ->select() + ->toArray(); + if(empty($items)){ + return []; + } + return self::convertGroupByCategory($items); + } } diff --git a/app/model/Category.php b/app/model/Category.php index 3df9adc..5f71e5e 100644 --- a/app/model/Category.php +++ b/app/model/Category.php @@ -4,13 +4,28 @@ namespace app\model; class Category extends Base { public static $CIdList = [ - 'marketing_network' => 15, // 网络营销(主栏目) - 'marketing_network_child' => 16, // 网络营销(子栏目) - 'marketing_achievement' => 17, // 主要业绩 - 'products' => 2, // 产品中心 - 'news_enterprise' => 20, // 企业新闻 - 'news_industry' => 21, // 行业资讯 - 'news_dynamic' => 21, // 新闻动态 + 'about' => 1, // 走进超宇 + 'about_children' => [ + 'company' => 3, // 企业简介 + 'honor' => 8, // 资质荣誉 + 'structure' => 9, // 组织架构 + 'history' => 10, // 发展历程 + 'video' => 11, // 企业视频 + ], + 'honors_manage' => 26, // 荣誉资质管理 + 'history_manage' => 29, // 发展历程管理 + 'products' => 2, // 产品中心 + 'marketing' => 15, // 网络营销(主) + 'marketing_children' => [ + 'marketing_network' => 16, // 网络营销 + 'achievement' => 17, // 主要业绩 + ], + 'news' => 18, //新闻(主) + 'news_children' => [ + 'enterprise' => 20, // 企业新闻 + 'industry' => 21, // 行业资讯 + 'dynamics' => 22, // 新闻动态 + ], ]; //获取首页栏目ID @@ -64,6 +79,7 @@ class Category extends Base ->leftJoin('model m','c.model_id=m.id') ->field('c.*, m.manager, m.template') ->where('c.state', 1) + ->where('c.is_menu', 1) ->order('is_index desc, sort asc') ->select() ->toArray(); @@ -128,20 +144,22 @@ class Category extends Base { $crumbs = []; $category = self::getById($currentId); - if($category['parent_id'] == 0){ - $crumbs[] = $category; - }else{ - $categoryIds = explode(',', trim($category['path'], ',')); - $categories = self::alias('c') - ->leftJoin('model m', 'c.model_id = m.id') - ->where('c.id', 'in', $categoryIds) - ->column('c.*,m.template', 'c.id'); - foreach($categoryIds as $id){ - if(isset($categories[$id])){ - $crumbs[] = $categories[$id]; + if($category) { + if($category['parent_id'] == 0){ + $crumbs[] = $category; + }else{ + $categoryIds = explode(',', trim($category['path'], ',')); + $categories = self::alias('c') + ->leftJoin('model m', 'c.model_id = m.id') + ->where('c.id', 'in', $categoryIds) + ->column('c.*,m.template', 'c.id'); + foreach($categoryIds as $id){ + if(isset($categories[$id])){ + $crumbs[] = $categories[$id]; + } } + $crumbs[] = $category; } - $crumbs[] = $category; } return $crumbs; } diff --git a/app/model/History.php b/app/model/History.php index c1c9dfc..70bc3af 100644 --- a/app/model/History.php +++ b/app/model/History.php @@ -14,7 +14,7 @@ class History extends Base $paginate = [ 'list_rows' => $per ]; - $items = self::where('category_id', $categoryId)->order('sort', 'asc')->paginate($paginate, $isSample); + $items = self::where('category_id', $categoryId)->order('sort', 'desc')->paginate($paginate, $isSample); if(!$items->isEmpty()) { $ids = $items->column('id'); $infoList = HistoryInfo::getByHistoryIds($ids); @@ -25,19 +25,24 @@ class History extends Base return $items; } - public static function getByCategoryId($categoryId, $onlyVisible = false) + public static function getByCategoryId($categoryId, $onlyVisible = false, $defaultNum = -1) { $items = self::where('category_id', $categoryId) ->when($onlyVisible, function($query){ $query->where('visible', 1); }) - ->order('sort', 'asc') + ->order('sort', 'desc') ->select(); if(!$items->isEmpty()) { $ids = $items->column('id'); - $infoList = HistoryInfo::getByHistoryIds($ids, $onlyVisible); + $infoList = []; + if ($defaultNum != 0) { + $infoList = HistoryInfo::getByHistoryIds($ids, $onlyVisible); + } foreach ($items as $k => $item) { - $items[$k]['info'] = $infoList[$item['id']] ?? []; + $infos = $infoList[$item['id']] ?? []; + $infoData = $defaultNum > 0 ? array_slice($infos, 0, $defaultNum, false) : $infos; + $items[$k]['info'] = $infoData; } } return $items->toArray(); diff --git a/app/model/HistoryInfo.php b/app/model/HistoryInfo.php index 8c467d2..31b9563 100644 --- a/app/model/HistoryInfo.php +++ b/app/model/HistoryInfo.php @@ -18,7 +18,7 @@ class HistoryInfo extends Base ->when($onlyVisible, function ($query) { $query->where('visible', 1); }) - ->order(['history_id'=>'asc','sort'=>'asc']) + ->order(['history_id'=>'desc','sort'=>'desc']) ->select() ->toArray(); $data = []; @@ -47,6 +47,6 @@ class HistoryInfo extends Base if($historyId <= 0) { return []; } - return self::where('history_id', $historyId)->order(['sort'=>'asc'])->select()->toArray(); + return self::where('history_id', $historyId)->order(['sort'=>'desc'])->select()->toArray(); } } \ No newline at end of file diff --git a/app/model/Model.php b/app/model/Model.php index 7bc8c1e..2bbfdd9 100644 --- a/app/model/Model.php +++ b/app/model/Model.php @@ -3,6 +3,9 @@ namespace app\model; class Model extends Base { + const ARTICLE = 31; + const PAGE = 33; + //获取模型列表 public static function getList() { diff --git a/app/widget/manager/Crumbs.php b/app/widget/manager/Crumbs.php index d0607cc..81a69d9 100644 --- a/app/widget/manager/Crumbs.php +++ b/app/widget/manager/Crumbs.php @@ -31,7 +31,6 @@ class Crumbs $cateCrumbs = Category::getCatesCrumbs($categoryId); } } - $data = [ 'rule' => $rule, 'parent' => $parent, diff --git a/public/static/css/style.css b/public/static/css/style.css index b098e27..e0af9db 100644 --- a/public/static/css/style.css +++ b/public/static/css/style.css @@ -1,7 +1,7 @@ @charset "utf-8"; /* CSS Document */ /*公用代码*/ -body,html{background:none repeat scroll 0 0;font:100% arial,verdana;} +body,html{background:none repeat scroll 0 0;font:100% "Microsoft YaHei New","Microsoft Yahei","微软雅黑","Hiragino Sans GB","冬青黑体","Arial","Helvetica","SimHei","黑体","STXihei","华文细黑",sans-serif;} body{overflow-x:hidden;color:#333;} blockquote,body,button,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;text-shadow:none;} label input{vertical-align:middle;text-shadow:none;} @@ -49,8 +49,7 @@ input,select,textarea{outline:medium none; resize: none;} /*nav*/ /**/ -.nav{ width: 72%;} -.nav ul li{ float: left; position: relative; margin-left: 20px; transition: all .6s;} +.nav ul li{ float: left; position: relative; margin-left: 1.25rem; transition: all .6s;} .nav ul li span a{ float: left; font-size: 1.125rem; line-height: 5.9375rem; padding: 0 16px; position: relative; text-decoration: none; color: #fff;} .nav ul li span a::before{ content: ''; width: 0; height: 4px; position: absolute; left: 0; bottom: 0; background: #F9BE3E; transition: all .6s; opacity: 0;} .nav ul li:hover span a{ color: #fff !important;} @@ -90,14 +89,16 @@ input,select,textarea{outline:medium none; resize: none;} .all-center-box{ width: 100%; float: left;} .head-box{ position: absolute; left: 0; top: 4rem; z-index: 99; color: #fff; transition: all .6s;} +.head-box .w-1500{ transition: all .6s;} .head-box .center-block{ background: #00418f; box-shadow: 0 0 0.625rem rgba(0,0,0,0.1);} .head-box .center-block .logo{ width: 14.375rem; height: 5.9375rem; text-align: center; background: #fff;} .head-box .center-block .logo img{ height: 3.625rem;} .head-box .center-block .language{ font-size: 1.125rem; padding:0 2.5rem;} -.head-box .center-block .language a{ color: #fff;} -.head-box .center-block .language a.active{ font-weight: bold;} +.head-box .center-block .language a{ color: #fff; margin: 0 0.25rem;} +.head-box .center-block .language a.active{ font-weight: bold; color: #F9BE3E;} .head-box .center-block .language a:hover{ color: #F9BE3E;} -.head-box.active{ top: 2rem;} +.head-box.active{ position: fixed; top: 0;} +.head-box.active .w-1500{ width: 100%;} .banner-box{ height: 100vh;} @@ -159,11 +160,13 @@ input,select,textarea{outline:medium none; resize: none;} .foot-box a{ color: #fff;} .foot-box .top-box .fl img{ height: 67px;} .foot-box .top-box .fr a{ float: left; margin-left: 3.125rem; font-size: 1.125rem;} +.foot-box .top-box .fr a:hover{ color: #F9BE3E;} .foot-box .lower-box{ display: flex; justify-content: space-between; margin-top: 3.75rem; font-size: 1rem; line-height: 1.6;} .foot-box .lower-box .column-between p i{ font-size: 0.75rem; line-height: 1.4; display: inline-block;} .foot-box .lower-box .column-between p span{ font-size: 0.875rem;} .foot-box .lower-box .ewm{ text-align: center;} .foot-box .lower-box .ewm img{ width: 134px;} +.foot-box .lower-box .ewm p{ margin-top: 0.3125rem;} .page-banner{ height: 40.625rem; position: relative; background-position: center; background-size: cover; position: relative; z-index: 2;} .page-banner .info{ width: 100%; position: absolute; left: 0; bottom: 2.5rem; color: #fff; padding-bottom: ;} @@ -200,13 +203,144 @@ input,select,textarea{outline:medium none; resize: none;} .about-box3{ padding: 3.75rem 0; background: #F5F5F5;} .about-box3 .box-info{ margin-top: -5rem;} +.swiper-btn .swiper-button-next,.swiper-btn .swiper-button-prev{ outline: none;} + .about-box4{ padding: 3.75rem 0;} +.about-box4 .top-box{ text-align: center; margin-top: 6.25rem; position: relative;} +.about-box4 .top-box::after{ content: ''; width: 100%; height: 1px; background: #B3B3B3; position: absolute; left: 0; bottom: 0.95rem;} +.about-box4 .top-box .swiper-container .swiper-slide{ color: #B3B3B3; font-size: 1.4rem; cursor: pointer;} +.about-box4 .top-box .swiper-container .swiper-slide p span{ font-size: 3.125rem; font-weight: bold;} +.about-box4 .top-box .swiper-container .swiper-slide i{ width: 1.3rem; height: 1.3rem; display: inline-block; border-radius: 100%; border: 0.375rem solid #B3B3B3; background: #fff; margin: 0.625rem 0 0;} +.about-box4 .top-box .swiper-container .swiper-slide.swiper-slide-active{ color: #01418E;} +.about-box4 .top-box .swiper-container .swiper-slide.swiper-slide-active i{ border-color: #01418E;} +.about-box4 .lower-box{ padding: 2.5rem 30%;} +.about-box4 .lower-box .center-block{ line-height: 1.6; font-size: 1rem; color: #888;} +.about-box4 .swiper-btn{ width: 14.375rem; position: relative; float: left; left: 50%; transform: translate(-50%,0);} +.about-box4 .swiper-btn .swiper-button-next{ float: right; right: 0;} +.about-box4 .swiper-btn .swiper-button-prev{ float: left; left: 0;} +.about-box4 .swiper-btn .swiper-button-next,.about-box4 .swiper-btn .swiper-button-prev{ position: relative; width: 4.25rem; height: 4.25rem; background: #f8f9fb; border-radius: 100%; transition: all .6s; margin-top: 0; top: 0;} +.about-box4 .swiper-btn .swiper-button-next::after,.about-box4 .swiper-btn .swiper-button-prev::after{ color: #c9c9c8; transition: all .6s; font-size: 2.4rem;} +.about-box4 .swiper-btn .swiper-button-next:hover,.about-box4 .swiper-btn .swiper-button-prev:hover{ background: #00418f;} +.about-box4 .swiper-btn .swiper-button-next:hover::after,.about-box4 .swiper-btn .swiper-button-prev:hover::after{ color: #fff;} +.about-box4 .lower-box .lower-box-item{margin-bottom: 20px;} +.about-box4 .lower-box .lower-box-item:last-child{margin-bottom: 0px;} +.about-box5{ padding: 3.75rem 0;} +.about-box5 .video-box{ height: 65vh; min-height: 40.625rem; position: relative; background: #000000;} +.about-box5 .video-box video{ width: 100%; height: 100%;} +.about-box5 .video-box i{ width: 100%; height: 100%; background-size: cover; background-position: center; position: absolute; left: 0; top: 0; z-index: 2; cursor: pointer;} +.about-box5 .video-box i::after{ content: ''; width: 100%; height: 100%; background: url(../image/icon_play.png) no-repeat center rgba(0,0,0,0.1); position: absolute; left: 0; top: 0; background-size: 9.375rem;} +.service-box1{ padding: 10rem 0 0;} +.service-box1 .box-info{ padding: 2.5rem 0 3rem;} +.service-box2{ background-color: #f5f5f5;} +.service-box3{ padding: 10rem 0;} +.service-box3 .box-info{ background: url(../image/ser3_bg.png) no-repeat left bottom;} +.service-box3 .box-info .pull-right{ width: 67%; margin-top: -5rem; padding: 1.875rem; position: relative;} +.service-box3 .box-info .pull-right ul li{ padding-top: 13.75rem; position: relative;} +.service-box3 .box-info .pull-right ul li::after{ content: ''; width: 2px; height: 10rem; background: #d3d3d3; position: absolute; left: 1.875rem; top: 1.8rem;} +.service-box3 .box-info .pull-right ul li:first-child{ padding-top: 0;} +.service-box3 .box-info .pull-right ul li:first-child::after{ display: none;} +.service-box3 .box-info .pull-right ul li .imgs{ width: 36%;} +.service-box3 .box-info .pull-right ul li .info{ width: 100%; padding-left: 5.625rem; font-size: 15px; color: #999; line-height: 1.8;} +.service-box3 .box-info .pull-right ul li .info strong{ color: #555;} +.service-box3 .box-info .pull-right ul li .info i{ font-size: 36px; color: #00418f; font-weight: bold;} +.service-box3 .box-info .pull-right::before{ content: ''; width: 3.125rem; height: 3.125rem; border-top: 0.25rem solid #ccc; border-left: 0.25rem solid #ccc; position: absolute; left: 0; top: 0;} +.service-box3 .box-info .pull-right::after{ content: ''; width: 3.125rem; height: 3.125rem; border-bottom: 0.25rem solid #ccc; border-right: 0.25rem solid #ccc; position: absolute; right: 0; bottom: 0;} +.marketing-box1{ padding: 10rem 0 0;} +.marketing-box1 .box-info{ padding-bottom: 4.5rem;} +.marketing-box1 .box-info .pull-left{ background: url(../image/icon_1.png) no-repeat 0 0; background-size: 1.4375rem; padding:0.3rem 0 0 2.5rem;} +.marketing-box1 .box-info .pull-left span{ display: block; color: #222;} +.marketing-box1 .box-info .pull-left p{ color: #999; white-space: nowrap; margin-top: 0.625rem;} +.marketing-box2{ padding: 5.625rem 0;} +.marketing-box2 .center-block ul li{ width: 100%; float: left; border: 0.125rem solid #D9D9D9; margin-top: 1.875rem; transition: all .6s;} +.marketing-box2 .center-block ul li .top-box{ padding: 1.875rem; line-height: 2.5rem; cursor: pointer;} +.marketing-box2 .center-block ul li .top-box .pull-left{ font-weight: bold;} +.marketing-box2 .center-block ul li .top-box .pull-left i{ width: 5rem; float: left; font-size: 1rem; color: #00418f;} +.marketing-box2 .center-block ul li .top-box .pull-left span{ font-size: 1.25rem;} +.marketing-box2 .center-block ul li .top-box .pull-right{ font-size: 1rem; padding-right: 3.4375rem; position: relative; color: #999;} +.marketing-box2 .center-block ul li .top-box .pull-right::after{ content: ''; width: 2.5rem; height: 2.5rem; background: url(../image/icon_jt3.png) no-repeat center; background-size: 100%; position: absolute; right: 0; top: 0; transition: all .6s;} +.marketing-box2 .center-block ul li .lower-box{ padding: 0 1.875rem 1.875rem; display: none;} +.marketing-box2 .center-block ul li .lower-box .table{ margin: auto;} +.marketing-box2 .center-block ul li .lower-box .table td,.marketing-box2 .center-block ul li .lower-box .table th{ vertical-align: middle; border-width: 0.125rem; text-align: center;} +.marketing-box2 .center-block ul li .lower-box .table th{ padding: 1.5rem 8px;} +.marketing-box2 .center-block ul li.active{ box-shadow: 5px 5px 10px rgba(0,0,0,0.2);} +.marketing-box2 .center-block ul li.active .top-box .pull-right::after{ transform: rotate(90deg);} +.news-box1{ padding: 10rem 0 6rem;} +.news-box1 .center-block ul li{ width: 100%; float: left;} +.news-box1 .center-block ul li a{ width: 100%; float: left; margin-top: 3.125rem; border: 0.125rem solid #d7d7d7; background: #fff; padding: 2.5rem;} +.news-box1 .center-block ul li a .pull-left{ white-space: nowrap; font-size: 1.25rem; color: #00418f; font-weight: bold; padding-right: 2.5rem;} +.news-box1 .center-block ul li a .pull-right{ width: 100%;} +.news-box1 .center-block ul li a .pull-right .imgs{ width: 29%; float: left; height: 10rem; overflow: hidden;} +.news-box1 .center-block ul li a .pull-right .imgs img{ width: 100%; height: 100%; object-fit: cover; transition: all .6s;} +.news-box1 .center-block ul li a .pull-right .info{ width: 71%; float: left; padding-left: 2.8125rem;} +.news-box1 .center-block ul li a .pull-right .info span{ display: block; font-size: 1.25rem; font-weight: bold; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1;} +.news-box1 .center-block ul li a .pull-right .info p{ color: #999; line-height: 1.6; font-size: 0.9375rem; height: 4.5rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin: 1.125rem 0;} +.news-box1 .center-block ul li a .pull-right .info i{ float: right; font-size: 0.875rem; color: #999;} +.news-box1 .center-block ul li a:hover{ border-color: #fff; box-shadow: 5px 5px 10px rgba(0,0,0,0.2);} +.news-box1 .center-block ul li a:hover .pull-right .imgs img{ transform: scale(1.1);} +.news-box1 .more a{ float: right; font-size: 1rem; padding-right: 3.4375rem; line-height: 2.5rem; margin-top: 2.5rem; position: relative; color: #999;} +.news-box1 .more a::after{ content: ''; width: 2.5rem; height: 2.5rem; background: url(../image/icon_jt3.png) no-repeat center; background-size: 100%; position: absolute; right: 0; top: 0; transition: all .6s;} +.news-box1 .more a:hover{ color: #00418f;} +.news-box1 .more a:hover::after{ background-image: url(../image/icon_jt3_1.png);} +.news-box2{ background: #f5f5f5; padding: 6rem 0;} +.news-box3{ padding: 6rem 0;} +.news-box3 .pull-right{ width: 50%; margin-top: 0.625rem;} +.news-box3 .pull-right ul li{ width: 100%; float: left;} +.news-box3 .pull-right ul li a{ width: 100%; float: left; line-height: 20px; margin-bottom: 1.5625rem; font-size: 1rem;} +.news-box3 .pull-right ul li a span{ width: 70%; float: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} +.news-box3 .pull-right ul li a i{ float: right;} + +.news-info{ padding: 10rem 0 6rem;} +.news-info .top-box{ border-bottom: 1px solid #9E9E9E; padding-bottom: 1.875rem;} +.news-info .top-box span{ display: block; font-size: 1.75rem; font-weight: bold;} +.news-info .top-box p{ font-size: 1.3rem; color: #999; margin-top: 0.625rem;} +.news-info .cen-box{ padding: 1.875rem 0; line-height: 1.8; font-size: 1rem;} +.news-info .lower-box{ font-size: 1.125rem; margin-top: 0.625rem; color: #999;} +.news-info .lower-box a{ color: #999;} +.news-info .lower-box a:hover{ color: #578df3;} +.news-info .lower-box a.btns{ display: inline-block; background: #00418f; color: #fff; padding: 0 2.85rem; line-height: 2rem; font-size: 1rem; margin-top: 0.8rem;} + +.contact-box1{ padding: 10rem 0 3.75rem;} +.contact-box1 .between-top{ padding-bottom: 7rem;} +.contact-box1 .between-top .box-info{ width: 21rem;} +.contact-box1 .between-top .box-info p{ margin-top: 3.4375rem; font-size: 0.875rem; line-height: 1.6;} +.contact-box1 .between-top .box-info p span{ color: #00418f;} +.contact-box1 .between-top .box-info p:first-child{ margin-top: 5px;} +.contact-box1 .between-top .ewm{ text-align: center; font-size: 0.875rem;} +.contact-box1 .between-top .column-between:first-child img{ width: 13.125rem;} + +.contact-box2 .all-title-box2{ border-top: 2px solid #A8A8A8; padding-top: 3rem;} +.contact-box2 .marketing-box2 .center-block ul li .top-box .pull-left i{ width: 10rem; font-size: 1.25rem;} +.contact-box2 .marketing-box2 .center-block ul li .lower-box{ display: flex !important; height: 11rem !important; overflow: hidden;} +.contact-box2 .marketing-box2 .center-block ul li .lower-box .pull-left{ width: 10rem; font-size: 0.875rem; line-height: 2;} +.contact-box2 .marketing-box2 .center-block ul li .lower-box .pull-right{ width: 85%; font-size: 0.875rem; color: #777; line-height: 1.8;} +.contact-box2 .marketing-box2 .center-block ul li .lower-box .pull-right strong{ color: #222;} +.contact-box2 .marketing-box2 .center-block ul li.active .lower-box{ height: auto !important;} +.marketing-box2 .center-block ul li.active .lower-box{ display: block;} + +.contact-box3{ background: #F5F5F5; padding: 6rem 0;} +.contact-box3 .box-info{ width: 100%; float: left; color: #888; font-size: 0.875rem; line-height: 1.8; margin: 2.5rem 0;} +.contact-box3 .center-block .text{ width: 48%; float: left; height: 35px; border: none; border-bottom: 1px solid #c2c2c2; background: none; font-size: 0.875rem; margin-top: 1.25rem;} +.contact-box3 .center-block .text:nth-child(2n){ float: right;} +.contact-box3 .center-block textarea{ width: 100%; float: left; height: 110px; border: none; border-bottom: 1px solid #c2c2c2; background: none; font-size: 0.875rem; margin-top: 1.25rem;} +.contact-box3 .center-block .btns{ width: 100%; float: left; text-align: center;} +.contact-box3 .center-block .btns input{ width: 10rem; line-height: 2.25rem; background: #00418f; border:none; color: #fff; font-size: 1rem; margin-top: 1.875rem;} + +.product-box{ padding: 8rem 0 5rem;} +.product-box .center-block ul{ margin: 0 -1.25rem;} +.product-box .center-block ul li{ width: 25%; float: left; padding: 0 1.25rem; margin-top: 2.5rem;} +.product-box .center-block ul li a{ width: 100%; float: left;} +.product-box .center-block ul li a span{ width: 100%; float: left; height: 14rem; overflow: hidden;} +.product-box .center-block ul li a span img{ width: 100%; height: 100%; object-fit: cover; transition: all .6s;} +.product-box .center-block ul li a p{ width: 100%; float: left; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 0.625rem;} +.product-box .center-block ul li a:hover span img{ transform: scale(1.1);} + +.pager{ margin: 3rem 0 0;} @@ -302,7 +436,7 @@ input,select,textarea{outline:medium none; resize: none;} .about-box2{ padding: 1.5625rem 0;} .about-box2 .top-box .fr span{ margin-left: 1rem;} - .about-box2 .lower-box{ padding: 0; margin-top: 1.5625rem; background: none;} + .about-box2 .lower-box{ padding: 0; margin-top: 1.5625rem; background: none; min-height: 35rem;} .about-box2 .lower-box .pull-left{ width: 100%;} .about-box2 .lower-box .pull-left ul li{ padding: 1.25rem;} .about-box2 .lower-box .pull-right{ width: 100%; position: relative; height: 12.5rem; margin-top: 1.5625rem;} @@ -311,19 +445,72 @@ input,select,textarea{outline:medium none; resize: none;} .about-box3{ padding: 1.5625rem 0;} .about-box3 .box-info{ margin-top: 1.25rem;} + .about-box4{ padding: 1.5625rem 0;} + .about-box4 .top-box{ margin-top: 2rem;} + .about-box4 .top-box .swiper-container .swiper-slide{ font-size: 1.2rem;} + .about-box4 .top-box .swiper-container .swiper-slide p span{ font-size: 2.5rem;} + .about-box4 .lower-box{ padding: 2.5rem 0;} + .about-box5{ padding: 1.5625rem 0;} + .about-box5 .video-box{ min-height: initial; height: 20rem;} + .about-box5 .video-box i::after{ background-size: 6rem;} + .service-box1{ padding: 2rem 0 0;} + .service-box1 .box-info{ padding: 1.5rem 0;} + .service-box3{ padding: 2rem 0;} + .service-box3 .box-info{ background: none;} + .service-box3 .box-info .pull-right{ width: 100%; margin-top: 1.5rem; padding: 1rem;} + .service-box3 .box-info .pull-right ul li{ padding-top: 6rem;} + .service-box3 .box-info .pull-right ul li::after{ height: 3rem; top: 1rem;} + .service-box3 .box-info .pull-right ul li .info{ padding-left: 2rem; font-size: 0.875rem;} + .service-box3 .box-info .pull-right ul li .info i{ font-size: 1.875rem;} + .marketing-box1{ padding: 2rem 0 0;} + .marketing-box1 .box-info{ display: block; padding-bottom: 2rem;} + .marketing-box1 .box-info .pull-left,.marketing-box1 .box-info .pull-right{ width: 100%; margin-top: 1.5rem;} + .marketing-box2{ padding: 2rem 0;} + .marketing-box2 .center-block ul li{ margin-top: 1rem; padding: 0 1rem;} + .marketing-box2 .center-block ul li .top-box{ padding: 1rem 0;} + .marketing-box2 .center-block ul li .top-box .pull-left i{ width: 3rem;} + .marketing-box2 .center-block ul li .lower-box{ padding: 0 0 1rem; overflow: auto;} + .marketing-box2 .center-block ul li .lower-box .table td,.marketing-box2 .center-block ul li .lower-box .table th{ white-space: nowrap; padding: 1rem;} + .news-box1{ padding: 2rem 0;} + .news-box1 .center-block ul li a{ margin-top: 1.5rem; padding: 1rem;} + .news-box1 .center-block ul li a .pull-left{ position: absolute;} + .news-box1 .center-block ul li a .pull-right{} + .news-box1 .center-block ul li a .pull-right .imgs{ width: 45%;} + .news-box1 .center-block ul li a .pull-right .info{ width: 55%; padding-left: 10px;} + .news-box1 .center-block ul li a .pull-right .info p{ margin: 1rem 0; height: 55px; font-size: 12px;} + .news-box3{ padding: 2rem 0;} + .news-box3 .w-1200{ display: block;} + .news-box3 .pull-right{ width: 100%; margin-top: 0.5rem;} + .news-box3 .pull-right ul li a{ margin: 1rem 0 0;} + .news-info{ padding: 2rem 0;} + .news-info .top-box{ padding-bottom: 1rem;} + .news-info .cen-box{ padding: 1rem 0;} + .contact-box1{ padding: 2rem 0;} + .contact-box1 .between-top{ display: block; padding-bottom: 0;} + .contact-box1 .between-top .column-between:first-child img{ display: none;} + .contact-box1 .between-top .box-info{ width: 100%;} + .contact-box1 .between-top .box-info p{ margin-top: 0.9375rem !important;} + .contact-box1 .between-top .ewm{ display: none;} + .contact-box2 .marketing-box2 .center-block ul li .top-box .pull-left i{ width: 8.35rem;} + .contact-box3{ padding: 2rem 0;} + .contact-box3 .box-info{ margin: 1rem 0;} + .contact-box3 .center-block .text{ margin-top: 0.5rem;} - - + .product-box{ padding: 1rem 0 2rem;} + .product-box .center-block ul{ margin: auto;} + .product-box .center-block ul li{ width: 48%; padding: 0; margin-top: 1.5rem;} + .product-box .center-block ul li:nth-child(2n){ float: right;} + .product-box .center-block ul li a span{ height: 12rem;} diff --git a/public/static/js/script.js b/public/static/js/script.js index 4f05f54..88c16af 100644 --- a/public/static/js/script.js +++ b/public/static/js/script.js @@ -64,6 +64,25 @@ $(function() { }) }) + $('.marketing-box2 .center-block ul li').each(function(){ + var that = $(this) + that.find('.top-box').click(function(){ + if(that.attr('class') != 'active'){ + that.addClass('active') + that.find('.top-box .pull-right').text('收起') + that.find('.lower-box').stop(true,false).slideDown() + }else{ + that.removeClass('active') + that.find('.top-box .pull-right').text('展开') + that.find('.lower-box').stop(true,false).slideUp() + } + }) + }) + + $('.about-box5 .video-box').click(function(){ + $(this).find('i').fadeOut() + $(this).find('video').get(0).play() + }) $('.ewm_tc').click(function() { diff --git a/view/manager/category/add.html b/view/manager/category/add.html index 2cc47cc..d399a7f 100644 --- a/view/manager/category/add.html +++ b/view/manager/category/add.html @@ -62,6 +62,13 @@ +
+ +
+ + +
+
@@ -77,7 +84,23 @@
- + +
+
+
+
+ +
宽:
+
+ +
+
px
+
X
+
高:
+
+ +
+
px
@@ -96,22 +119,6 @@
px
-
-
- -
宽:
-
- -
-
px
-
X
-
高:
-
- -
-
px
-
-
diff --git a/view/manager/category/edit.html b/view/manager/category/edit.html index 220643e..5eed532 100644 --- a/view/manager/category/edit.html +++ b/view/manager/category/edit.html @@ -76,6 +76,13 @@ if(!empty($item['width']) && is_int($item['width']) && $item['width'] > 0 && !em
+
+ +
+ + +
+
@@ -92,7 +99,23 @@ if(!empty($item['width']) && is_int($item['width']) && $item['width'] > 0 && !em
- + +
+
+
+
+ +
宽:
+
+ +
+
px
+
X
+
高:
+
+ +
+
px
@@ -111,22 +134,6 @@ if(!empty($item['width']) && is_int($item['width']) && $item['width'] > 0 && !em
px
-
-
- -
宽:
-
- -
-
px
-
X
-
高:
-
- -
-
px
-
-
diff --git a/view/manager/history/add_info.html b/view/manager/history/add_info.html index 57c182d..246481a 100644 --- a/view/manager/history/add_info.html +++ b/view/manager/history/add_info.html @@ -8,10 +8,10 @@
- + +

注:事例概述请勿超过200个字符

-
注:事例概述请勿超过200个字符
@@ -23,7 +23,7 @@
- {:widget('manager.upload/multi',['imgSize' => '425px X 280px'])} + {:widget('manager.upload/multi',['imgSize' => $imgSize])}
diff --git a/view/manager/history/edit_info.html b/view/manager/history/edit_info.html index f44f303..59bbf2b 100644 --- a/view/manager/history/edit_info.html +++ b/view/manager/history/edit_info.html @@ -8,10 +8,10 @@
- + +

注:事例概述请勿超过200个字符

-
注:事例概述请勿超过200个字符
@@ -23,7 +23,7 @@
- {:widget('manager.upload/multi',['imgs'=>empty($item['imgs'])?[]:$item['imgs'],'imgSize' => '425px X 280px'])} + {:widget('manager.upload/multi',['imgs'=>empty($item['imgs'])?[]:$item['imgs'],'imgSize' => $imgSize])}
diff --git a/view/manager/layout.html b/view/manager/layout.html index eb470ed..13897a1 100644 --- a/view/manager/layout.html +++ b/view/manager/layout.html @@ -1,9 +1,15 @@ -{php} -$jsVersion = '0.0.1'; -$cssVersion = '0.0.1'; -{/php} +{php} + $jsVersion = '0.0.1'; + $cssVersion = '0.0.1'; + if(!isset($categoryId)) { + $categoryId = $category['id'] ?? 0; + } + if(!isset($_token) || empty($_token)) { + $_token = session('_token') ?? ''; + } +{/php} @@ -11,11 +17,6 @@ $cssVersion = '0.0.1'; - {php} - if(!isset($_token) || empty($_token)) { - $_token = session('_token') ?? ''; - } - {/php} @@ -35,7 +36,7 @@ $cssVersion = '0.0.1';
- • {:widget('manager.crumbs/index')} + • {:widget('manager.crumbs/index' , ['category_id' => $categoryId])}
@@ -48,7 +49,7 @@ $cssVersion = '0.0.1'; 退出登录
- {:widget('manager.menu/left',['category_id' => $category['id']??0])} + {:widget('manager.menu/left',['category_id' => $categoryId])}
diff --git a/view/page/about.html b/view/page/about.html new file mode 100644 index 0000000..6fbe981 --- /dev/null +++ b/view/page/about.html @@ -0,0 +1,165 @@ +{layout name="layout"} + +
+
+
+ {$topCategory.title} +

{:nl2br($topCategory.description ?? '')}

+
+
+
+ +
+
+
+
+
+
{$blocks['company']['title']['value'] ?? ''}

{$blocks['company']['subtitle']['value'] ?? ''}

+
{:nl2br($blocks['company']['description']['value'] ?? '')}
+
+
+
+ +
+
+
+
{$blocks['honor']['title']['value'] ?? ''}

{$blocks['honor']['subtitle']['value'] ?? ''}

+
+ {if isset($honors) && count($honors) > 0} + {foreach $honors as $k => $honor} + {$honor.title} + {/foreach} + {/if} +
+
+ {if isset($honors) && count($honors) > 0} + {foreach $honors as $k => $honor} +
+
+
    + {foreach $honor.items as $item} +
  • + {/foreach} +
+
+
+
    + {foreach $honor.items as $item} +
  • {$item.title}
  • + {/foreach} +
+
+
+ {/foreach} + {/if} +
+
+ +
+
+
{$blocks['structure']['title']['value'] ?? ''}

{$blocks['structure']['subtitle']['value'] ?? ''}

+
+ +
+
+
+ +
+
+
{$blocks['history']['title']['value'] ?? ''}

{$blocks['history']['subtitle']['value'] ?? ''}

+
+
+
+ {if isset($historyList) && count($historyList) > 0} + {foreach $historyList as $history} +

{$history.title}

+ {/foreach} + {/if} +
+
+
+
+ {if isset($historyList) && count($historyList) > 0} + {foreach $historyList as $history} +
+ {foreach $history['info'] as $k => $info} +

{if $k > 0}


{/if}{:nl2br($info['title'] ?? '')}

+ {/foreach} +
+ {/foreach} + {/if} +
+ 2007年,
+ 超宇公司加大投资与融资力度,
+ 同时配备一流齐全的数控设备和各类工装模具及检验设备等,以确保产品达到高标准、精细化、零缺陷的标准。 +
+
+ 2008年,
+ 超宇公司加大投资与融资力度,
+ 同时配备一流齐全的数控设备和各类工装模具及检验设备等,以确保产品达到高标准、精细化、零缺陷的标准。 +
+
+ 2009年,
+ 超宇公司加大投资与融资力度,
+ 同时配备一流齐全的数控设备和各类工装模具及检验设备等,以确保产品达到高标准、精细化、零缺陷的标准。 +
+
+ 2010年,
+ 超宇公司加大投资与融资力度,
+ 同时配备一流齐全的数控设备和各类工装模具及检验设备等,以确保产品达到高标准、精细化、零缺陷的标准。 +
+
+ 2011年,
+ 超宇公司加大投资与融资力度,
+ 同时配备一流齐全的数控设备和各类工装模具及检验设备等,以确保产品达到高标准、精细化、零缺陷的标准。 +
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+ + \ No newline at end of file