From 9910dd3e6d8f6ca15c1ccfd153f1c42ca15524f6 Mon Sep 17 00:00:00 2001 From: augushong Date: Sun, 19 Apr 2020 13:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E5=AE=98=E7=BD=91=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 30 ++ app/admin/controller/Nav.php | 14 +- app/admin/controller/Post.php | 2 +- app/admin/controller/System.php | 5 + app/common.php | 4 + app/index/controller/Category.php | 93 +++++ app/index/controller/Common.php | 25 ++ app/index/controller/Index.php | 6 +- app/model/Category.php | 44 +++ app/model/Nav.php | 23 +- app/model/Post.php | 33 ++ app/model/PostCategory.php | 14 +- app/model/PostTag.php | 14 +- config/view_type.php | 18 +- .../20200417060522_create_table_nav.php | 2 + .../20200418120827_create_table_category.php | 3 + public/favicon.ico | Bin 1150 -> 1150 bytes public/static/css/index.easy_blue.css | 247 +++++++++++++ public/static/images/ghs.png | Bin 0 -> 19256 bytes public/static/js/firm.js | 98 ++++++ view/admin/category/create.html | 12 +- view/admin/category/edit.html | 40 ++- view/admin/category/index.html | 1 + view/admin/common/left_system.html | 103 +++--- view/admin/nav/create.html | 14 +- view/admin/nav/edit.html | 26 +- view/admin/nav/index.html | 2 + view/admin/post/create.html | 4 +- view/admin/post/edit.html | 6 +- view/admin/post/index.html | 20 +- view/admin/system/easy_blue.html | 99 ++++++ view/admin/system/index.html | 333 ++++++++++++------ view/admin/system/theme.html | 4 +- view/common/tpl/error.html | 4 +- view/common/tpl/success.html | 4 +- .../category/easy_blue_read_product.html | 48 +++ view/index/common/_easy_blue_footer.html | 35 ++ view/index/common/_easy_blue_header.html | 23 ++ view/index/common/_easy_blue_require.html | 11 + view/index/common/_require.html | 25 ++ view/index/common/tpl_easy_blue.html | 22 ++ view/index/index/easy_blue_index.html | 143 ++++++++ 42 files changed, 1435 insertions(+), 219 deletions(-) create mode 100644 app/index/controller/Category.php create mode 100644 app/index/controller/Common.php create mode 100644 public/static/css/index.easy_blue.css create mode 100644 public/static/images/ghs.png create mode 100644 public/static/js/firm.js create mode 100644 view/admin/system/easy_blue.html create mode 100644 view/index/category/easy_blue_read_product.html create mode 100644 view/index/common/_easy_blue_footer.html create mode 100644 view/index/common/_easy_blue_header.html create mode 100644 view/index/common/_easy_blue_require.html create mode 100644 view/index/common/_require.html create mode 100644 view/index/common/tpl_easy_blue.html create mode 100644 view/index/index/easy_blue_index.html diff --git a/README.md b/README.md index f4da542..9d3b1c3 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,38 @@ php think reset_password - 后台日志 - 支持轮播图,导航,小程序导航(打开方式)等设置 - 实现CMS后台 +- 支持前台多主题 - 适配手机端,实现table转卡片样式 +#### 多主题用法 + +在index应用下,使用`$this->fetch($template,$vars)`,而不要用`View::fetch($template,$vars)`. + +多主题用法仅当`$template`为空字符串或者字符串有效,使用`跨应用`,`跨控制器`,`木板路径`,`数据内容`的写法无效. + +index应用下控制器有个`BaseController.php`,里面有个属性`$isUseTpls = true`,当关闭时不使用多主题. + +多主题规则,系统设置的`index_tpl_name`拼接`$template`; + +例如下: +假设是`Index`控制器,`index`方法,系统设置的`index_tpl_name`值为`easy_blue_`,模板命名规则和模板目录均为默认情况下. + +``` + $this->fetch(); + // 定位模板为:/view/index/index/easy_blue_index.html + + $this->fetch('index'); + // 定位模板为:/view/index/index/easy_blue_index.html + + $this->fetch('index_1'); + // 定位模板为:/view/index/index/easy_blue_index_1.html + + $this->fetch('index_product'); + // 定位模板为:/view/index/index/easy_blue_index_product.html + +``` + +> 配置文件下的模板命名规则和模板位置仍然按有效,默认在`/view`将方法名转下划线的写法.这些配置仍然有效; ### 完整安装 diff --git a/app/admin/controller/Nav.php b/app/admin/controller/Nav.php index c789c1e..7216cb6 100644 --- a/app/admin/controller/Nav.php +++ b/app/admin/controller/Nav.php @@ -54,9 +54,9 @@ class Nav extends Common return $this->success('添加成功', url('index',[ 'type'=>$request->param('type',1), - 'show_img'=>$request->param('show_img'), - 'show_target'=>$request->param('show_target'), - 'show_xcx'=>$request->param('show_xcx'), + 'show_img'=>$request->param('show_img',0), + 'show_target'=>$request->param('show_target',0), + 'show_xcx'=>$request->param('show_xcx',0), ])); } @@ -104,10 +104,10 @@ class Nav extends Common $model_nav->save($post_data); return $this->success('保存成功', url('index',[ - 'type'=>$model_nav->getData('type'), - 'show_img'=>$request->param('show_img'), - 'show_target'=>$request->param('show_target'), - 'show_xcx'=>$request->param('show_xcx'), + 'type'=>$model_nav->getData('type',1), + 'show_img'=>$request->param('show_img',0), + 'show_target'=>$request->param('show_target',0), + 'show_xcx'=>$request->param('show_xcx',0), ])); } diff --git a/app/admin/controller/Post.php b/app/admin/controller/Post.php index 4ee8b3c..13709b7 100644 --- a/app/admin/controller/Post.php +++ b/app/admin/controller/Post.php @@ -23,7 +23,7 @@ class Post extends Common { // - $list = ModelPost::order('id desc')->paginate(); + $list = ModelPost::with(['categorys.category','tags.tag'])->order('id desc')->paginate(); View::assign('list', $list); diff --git a/app/admin/controller/System.php b/app/admin/controller/System.php index 1e4f063..811186b 100644 --- a/app/admin/controller/System.php +++ b/app/admin/controller/System.php @@ -38,6 +38,11 @@ class System extends Common return View::fetch(); } + public function easyBlue() + { + + return View::fetch(); + } public function update() { diff --git a/app/common.php b/app/common.php index 71ccf39..eff1af6 100644 --- a/app/common.php +++ b/app/common.php @@ -54,6 +54,10 @@ function get_system_config($name = '', $default = '') function get_source_link($url) { + + if(empty($url)){ + $url = '/static/images/avatar.jpeg'; + } if (strpos($url, '/') === 0) { return $url; } diff --git a/app/index/controller/Category.php b/app/index/controller/Category.php new file mode 100644 index 0000000..57fdaad --- /dev/null +++ b/app/index/controller/Category.php @@ -0,0 +1,93 @@ +find($id); + + $this->assign('category',$model_category); + + return $this->fetch('read'.$model_category->tpl_name); + } + + /** + * 显示编辑资源表单页. + * + * @param int $id + * @return \think\Response + */ + public function edit($id) + { + // + } + + /** + * 保存更新的资源 + * + * @param \think\Request $request + * @param int $id + * @return \think\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * 删除指定资源 + * + * @param int $id + * @return \think\Response + */ + public function delete($id) + { + // + } +} diff --git a/app/index/controller/Common.php b/app/index/controller/Common.php new file mode 100644 index 0000000..a25ff0a --- /dev/null +++ b/app/index/controller/Common.php @@ -0,0 +1,25 @@ +order('sort asc')->where('status',1)->select(); + View::assign('list_header_nav',$list_header_nav); + $list_nav_slide = Nav::where('type',3)->order('sort asc')->where('status',1)->select(); + View::assign('list_nav_slide',$list_nav_slide); + $list_nav_index_block_1 = Nav::where('type',6)->order('sort asc')->where('status',1)->select(); + View::assign('list_nav_index_block_1',$list_nav_index_block_1); + $list_nav_index_block_2 = Nav::where('type',7)->order('sort asc')->where('status',1)->select(); + View::assign('list_nav_index_block_2',$list_nav_index_block_2); + $list_nav_friend_url = Nav::where('type',2)->order('sort asc')->where('status',1)->select(); + View::assign('list_nav_friend_url',$list_nav_friend_url); + } +} diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 089b0a9..bbc9c1d 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -5,7 +5,7 @@ namespace app\index\controller; use think\facade\View; use think\Request; -class Index extends BaseController +class Index extends Common { /** * 显示资源列表 @@ -16,9 +16,7 @@ class Index extends BaseController { // - dump($this->request->action()); - - return $this->fetch(''); + return $this->fetch(); } /** diff --git a/app/model/Category.php b/app/model/Category.php index 0719cf0..e2e4341 100644 --- a/app/model/Category.php +++ b/app/model/Category.php @@ -20,4 +20,48 @@ class Category extends Model // return $model_list; return array2level($model_list,0,0); } + + public function getTitleImgAttr($value) + { + + return get_source_link($value); + } + + public function posts() + { + return $this->hasMany(PostCategory::class,'category_id'); + } + + /** + * 返回的对应的post的模型 + * + * @return void + */ + public function getPostsModelListAttr() + { + $list_post_category = $this->getAttr('posts'); + + $list_post = []; + + foreach ($list_post_category as $list_post_category) { + array_push($list_post,$list_post_category->post); + } + + return $list_post; + } + + /** + * 返回的对应post的数据,性能比模型要高. + * + * @return void + */ + public function getPostsListAttr() + { + $list_post_category = $this->getAttr('posts'); + + $list_post = array_column($list_post_category->append(['post'])->toArray(),'post'); + + return $list_post; + } + } diff --git a/app/model/Nav.php b/app/model/Nav.php index 44b1171..65cdfd2 100644 --- a/app/model/Nav.php +++ b/app/model/Nav.php @@ -1,5 +1,6 @@ '不显示', + 1=>'显示' + ]; + // + public function getImgAttr($value) + { + return get_source_link($value); + } + + public function getStatusNameAttr() + { + return self::$statusName[$this->getData('status')]; + } } diff --git a/app/model/Post.php b/app/model/Post.php index c3b8752..8499871 100644 --- a/app/model/Post.php +++ b/app/model/Post.php @@ -33,6 +33,39 @@ class Post extends Model return $this->hasMany(PostTag::class,'post_id'); } + public function getCategorysListAttr() + { + $list_post_categorys = $this->getAttr('categorys'); + + $list = array_column($list_post_categorys->append(['category'])->toArray(),'category'); + + $list = array2level($list,0,0); + + return $list; + } + + public function getTagsListAttr() + { + $list_post_tags = $this->getAttr('tags'); + + $list = array_column($list_post_tags->append(['tag'])->toArray(),'tag'); + + $list = array2level($list); + + return $list; + } + + public function getDescShortAttr() + { + $desc = $this->getData('desc'); + + if(strlen($desc) > 100){ + $desc = mb_substr($desc,0,100).'...'; + } + + return $desc; + } + public function getStatusNameAttr() { return self::$stausNameList[$this->getData('status')]; diff --git a/app/model/PostCategory.php b/app/model/PostCategory.php index f71020a..0ef4897 100644 --- a/app/model/PostCategory.php +++ b/app/model/PostCategory.php @@ -1,5 +1,6 @@ belongsTo(Post::class, 'post_id'); + } + + public function category() + { + return $this->belongsTo(Category::class,'category_id'); + } } diff --git a/app/model/PostTag.php b/app/model/PostTag.php index 924da58..23a519f 100644 --- a/app/model/PostTag.php +++ b/app/model/PostTag.php @@ -1,5 +1,6 @@ belongsTo(Tag::class,'tag_id'); + } + + public function post() + { + return $this->belongsTo(Post::class, 'post_id'); + } } diff --git a/config/view_type.php b/config/view_type.php index 98d7510..0712bc9 100644 --- a/config/view_type.php +++ b/config/view_type.php @@ -1,14 +1,14 @@ [ - '' => '普通', + 'category' => [ + '' => '普通:', - '_product' => '产品', - '_case' => '案例', - '_about' => '关于', - ], - 'post' => [ - '' => '普通', - ] + '_product' => '产品:_product', + '_case' => '案例:_case', + '_about' => '关于:_about', + ], + 'post' => [ + '' => '普通:', + ] ]; diff --git a/database/migrations/20200417060522_create_table_nav.php b/database/migrations/20200417060522_create_table_nav.php index 24bd696..97e737f 100644 --- a/database/migrations/20200417060522_create_table_nav.php +++ b/database/migrations/20200417060522_create_table_nav.php @@ -44,9 +44,11 @@ class CreateTableNav extends Migrator $table->addColumn(Column::make('xcx_type','integer')->setLimit(10)->setComment('小程序打开方式,1:小程序导航页面,2:普通页面,3:web-view,4:其他小程序,5:电话')); $table->addColumn(Column::make('value','string')->setLimit(100)->setComment('对象值,有可能是网页链接,小程序导航页面路径,小程序普通页面路径,电话')); $table->addColumn(Column::make('xcx_appid','string')->setLimit(30)->setComment('小程序appid,目标是其他小程序是有效')); + $table->addColumn(ColumnFormat::integerTypeStatus('status')->setComment('0:下架,1:显示')); $table->addIndex('delete_time'); $table->addIndex('type'); $table->addIndex('sort'); + $table->addIndex('status'); $table->create(); } } diff --git a/database/migrations/20200418120827_create_table_category.php b/database/migrations/20200418120827_create_table_category.php index f781b68..c915229 100644 --- a/database/migrations/20200418120827_create_table_category.php +++ b/database/migrations/20200418120827_create_table_category.php @@ -40,7 +40,10 @@ class CreateTableCategory extends Migrator ->addColumn(ColumnFormat::stringShort('tpl_name')->setComment('模板名称')) ->addColumn(ColumnFormat::stringUrl('title_img')->setComment('附图')) ->addColumn(ColumnFormat::stringLong('desc')->setComment('副标题描述')) + ->addColumn(ColumnFormat::integerTypeStatus('status')->setComment('0:不显示,1:显示')) ->addIndex('pid') + ->addIndex('status') + ->addIndex('delete_time') ->create(); } } diff --git a/public/favicon.ico b/public/favicon.ico index e71815a6618c6ef19c78d27840b8995fb2521499..5b84eddb921fd5caffe35fc639a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-%JuQ#*owco@x{a zD-|ENtov7tOFzK5r}KRMSHhkEb!7aa$$nhqBKuHtV!cJ5I+?Si!w-Hm{`)ye div{padding-bottom: 40px; border-bottom: 1px dashed #eaeaea; position: relative;} +.main-news .content .news-img{display: inline-block; width: 30%; vertical-align: top;} +.main-news .content .news-img img{max-width: 90%;} +.main-news .content .news-panel{display: inline-block; width: 70%; vertical-align: top; padding-left: 5px; box-sizing: border-box;} +.main-news .content .news-panel strong a{display: block; color: #555; font-size: 18px; line-height: 26px; overflow: hidden; text-overflow:ellipsis; white-space: nowrap;} +.main-news .content .news-panel p.detail{color: #777; line-height: 24px;} +.main-news .content .news-panel p.read-push{color: #AAA; padding-top: 5px;} +.main-news #newsPage .layui-laypage{display: block; text-align: center; margin-top: 70px;} +.main-news #newsPage .layui-laypage a,.main-news #newsPage .layui-laypage span{font-size: 18px; line-height: 40px; height: 40px; margin-right: 20px; border-radius: 3px; color: #e3e3e3;} +/*动态详情页*/ +.main-newsdate{margin-top: 80px; text-align: center;} +.main-newsdate .news{text-align: left; line-height: 104px;} +.main-newsdate h1{padding-top: 6px;} +.main-newsdate .pushtime{color: #686868; font-size: 18px; line-height: 82px;} +.main-newsdate .introTop{padding-bottom: 28px; font-size: 18px; line-height: 20px; text-align: left;} +.main-newsdate .introBott{font-size: 18px; line-height: 42px; text-align: justify; padding: 40px 0 102px 0;} +.main-newsdate img{max-width: 100%;} + + +/** 案例 */ +.banner.case{background: url(../img/nav_img2.jpg) no-repeat center top; background-size: cover;} +.main-case{padding: 30px 0 75px;} +.main-case .content{width: 48%; text-align: center; padding-top: 120px; padding-bottom: 20px; border-bottom: 2px solid #c9c9c9;} +.main-case .content.even{margin-left: 2%;} +.main-case .content .case-img{border: 1px solid #e2e2e2; overflow: hidden;} +.main-case .content .case-img img{width: 100%; transition: 2s;} +.main-case .content .case-img img:hover{transform: scale(1.2,1.2); transition: 2s;} +.main-case .content p.lable{padding-top: 13px; font-size: 30px; line-height: 76px;} +.main-case .content p{font-size: 18px; line-height: 32px; color: #505050;} +.main-case #casePage .layui-laypage{display: block; text-align: center; margin-top: 100px;} +.main-case #casePage .layui-laypage a,.main-case #casePage .layui-laypage span{font-size: 18px; line-height: 40px; height: 40px; margin-right: 20px; border-radius: 3px; color: #e3e3e3;} + + +/** 关于 */ +.banner.about{background: url(../img/nav_img4.jpg) no-repeat center top; background-size: cover;} +.main-about{padding-bottom: 130px;} +.main-about ul.aboutab{padding: 100px 0; text-align: center;} +.main-about ul.aboutab li{display: inline-block; padding: 0 22px; margin-left: 15px; font-size: 20px; line-height: 46px; color: #b5b5b5; border: 1px solid #e2e2e2; border-radius: 3px; cursor: pointer;} +.main-about ul.aboutab li:first-child{margin-left: 0;} +.main-about ul.aboutab li.layui-this +,.main-about ul.aboutab li:hover{color: #2ab5a3; border-color: #afddd7; transition: 0.3s;} +.main-about .tabJob, .main-about .tabCour{display: none;} +/*公司简介*/ +.main-about .tabIntro{padding-bottom: 15px;} +.main-about .tabIntro .content{vertical-align: middle;} +.main-about .tabIntro .content .img{width: 50%;} +.main-about .tabIntro .content .img img{width: 100%;} +.main-about .tabIntro .content .panel{width: 50%;} +.main-about .tabIntro .content p{padding: 0 20px; line-height: 24px; text-align: justify;} +.main-about .tabIntro .p_hidden{padding: 0 20px; display: none;} +/*招贤纳士*/ +.main-about .tabJob .content{padding: 0 0 40px 20px; border: 1px solid #e2e2e2; border-top: 4px solid #65d0c5; margin-top: 90px;} +.main-about .tabJob .content:first-child{margin-top: 10px;} +.main-about .tabJob .content p{font-size: 18px; line-height: 40px;} +.main-about .tabJob .content p.title{font-size: 24px; color: #545454; line-height: 60px;} +.main-about .tabJob .content ol{padding-left: 20px; list-style-type: none; counter-reset: sectioncounter;} +.main-about .tabJob .content ol li{color: #8d8d8d; font-size: 16px; line-height: 30px;} +.main-about .tabJob .content ol li:before {content: counter(sectioncounter) "、"; counter-increment: sectioncounter;} +/*发展历程*/ +.main-about .tabCour p.title{font-size: 28px; line-height: 28px; text-align: center;} +.main-about .tabCour .timeline{position: relative; margin-top: 75px;} +.main-about .tabCour .timeline:before{position: absolute; top: 0; bottom: 0; content: ""; width: 2px; background-color: #e2e2e2; left: 50px;} +.main-about .tabCour .timeline li{position: relative; padding-top: 70px;} +.main-about .tabCour .timeline li:first-child{padding-top: 0;} +.main-about .tabCour .timeline li .cour-img{position: absolute; left: 0; width: 100px; border-radius: 50%;} +.main-about .tabCour .timeline li .cour-img img{width: 100%;} +.main-about .tabCour .timeline li .cour-panel{padding-top: 20px; padding-left: 120px; text-align: left;} +.main-about .tabCour .timeline li .cour-panel p.label{font-size: 18px; color: #000;} +.main-about .tabCour .timeline li .cour-panel p{color: #949494; line-height: 30px;} + + +@media screen and (max-width: 480px){ + .main-service .content .content-right{padding: 10px 10px 0 10px;} + .main-service .content .content-right p{line-height: 24px;} + .main-news .content .news-panel p.read-push{font-size: 12px;} + .main-case .content{padding-top: 60px;} + .main-case .content p.lable{padding-top: 10px; font-size: 18px; line-height: 48px;} + .main-case .content p{font-size: 12px; line-height: 20px; color: #505050;} + .main-about ul.aboutab{padding: 70px 0;} + .main-about ul.aboutab li{padding: 0 15px; font-size: 16px; box-sizing: border-box;} + .main-about .tabIntro .content .img{width: 100%;} + .main-about .tabIntro .content .panel{width: 100%;} + .main-about .tabIntro .content .panel.p_block{display: none;} + .main-about .tabIntro .p_hidden{display: block;} + .main-news #newsPage .layui-laypage a,.main-news #newsPage .layui-laypage span + ,.main-case #casePage .layui-laypage a,.main-case #casePage .layui-laypage span{padding: 0 12px; font-size: 14px; line-height: 30px; height: 30px; margin-right: 4px;} +} +/*小屏幕*/ +@media screen and (min-width: 768px){ + .nav{max-height: 80px;} + .nav.index{background: rgba(255, 255, 255 ,0.3);} + .nav .nav-list button{display: none;} + .nav .layui-nav{width: auto; position: absolute; top: 0; padding: 0 5px; border-radius: 0; margin: 0;} + .nav .layui-nav .layui-nav-item{display: inline-block; margin:0 53px; line-height: 80px;} + .main-product p.title + ,.main-service p.title{font-size: 36px; line-height: 216px;} + .main.product .content .content-img{text-align: left;} + .main-news .content .news-panel strong a{font-size: 20px; line-height: 30px;} + .main-news .content .news-panel p.read-push{padding-top: 0; position: absolute; bottom: 40px;} + .main-newsdate .pushtime{line-height: 142px;} + .main-case .content{width: 45%;} + .main-case .content.even{margin-left: 9%;} + .main-about ul.aboutab li{padding: 0 32px; font-size: 24px; margin-left: 30px; line-height: 50px;} + .main-about .tabIntro .content p{padding: 0 30px; font-size: 18px; line-height: 30px;} + .main-about .tabJob .content p{font-size: 24px; line-height: 50px;} + .main-about .tabJob .content p.title{font-size: 30px; line-height: 90px;} + .main-about .tabJob .content ol li{font-size: 20px; line-height: 60px;} + .main-about .tabCour .timeline:before{left: 50%;} + .main-about .tabCour .timeline li{min-height: 195px; padding-top: 95px;} + .main-about .tabCour .timeline li .cour-img{left: 50%; margin-left: -97.5px; width: 195px;} + .main-about .tabCour .timeline li .cour-panel{padding-top: 55px; padding-left: 0;} + .main-about .tabCour .timeline li.odd .cour-panel{text-align: right;} +} +@media screen and (min-width: 768px) and (max-width: 992px){ + .main.product .content div.right{padding-left: 20px;} + .nav .layui-nav .layui-nav-item{margin:0 33px;} + .main-service .content .content-right{padding: 10px 10px 0 15px;} + .main-service .content .content-right span{margin-bottom: 20px;} + .main-service .content .content-right p{line-height: 28px;} + .main.product .content .label{line-height: 40px; margin-top: 0;} + .main.product .content .detail{padding-bottom: 10px;} +} +/*大屏幕*/ +@media screen and (min-width: 992px){ + .main.product .content{padding: 100px 0;} + .main.product .content div.right{padding-left: 0;} + .main-news .content .news-img{width: 20%;} + .main-news .content .news-panel{width: 80%;} + .main-case .content{width: 31%;} + .main-case .content.even{margin-left: 0;} + .main-case .content.center{margin-right: 3%; margin-left: 3%;} + .main-about .tabIntro .content p{padding: 0 50px; font-size: 20px; line-height: 40px;} +} +/*超大屏幕*/ +@media screen and (min-width: 1200px) { + .main-news .content .news-img{width: 35%;} + .main-news .content .news-panel{width: 65%;} + .main-news .content:nth-child(odd){padding-right: 20px;} + .main-news .content:nth-child(even){padding-left: 20px;} + .main-about .tabCour .timeline li .cour-panel{padding-left: 50px;} + .main-about .tabCour .timeline li.odd .cour-panel{padding-left: 0; padding-right: 50px;} +} +@media screen and (min-width: 1300px) { + .layui-container{width: 1200px; padding: 0;} + .main-about .tabJob .content:last-child{margin-bottom: 180px;} + .nav .nav-logo{position: absolute; top: 0; left: 0;} + .nav .nav-logo img{ + max-height: 100%; + } + .layui-col-space80{margin: -40px;} + .layui-col-space80>*{padding: 40px;} +} diff --git a/public/static/images/ghs.png b/public/static/images/ghs.png new file mode 100644 index 0000000000000000000000000000000000000000..9f763946dd6606addeab24e40e2369124d53a048 GIT binary patch literal 19256 zcmeI4c{G&a_rPDYSRz?cRHh**jbW@aG4@bIvPT-TFwB@~W-OyD?Wzv>B_s{Rld(O-|_qor#_kBLkeeV0rob%2J%k9R3{F3|t z00^3z7+NvUVlyw^Ma=h*6RQQ8CqA-?0~G)SL}y-HKwQEK0N^*r8yHwxx|3)msym4c zGBq#&ktrk`o`3}azm~+EzV=b$%aQHl*rm4m&BNDY2nPVL41>2y*dbLo5_Jg5x422i0+8_A>U(Yr%K>1Rhwc|hyQVY6b(I8g z1LQ_US&_n%Gm*+2%rNj(k;LhZUs~+T33kyRV#pNJ8xk4foK3A(D&AUo>^XyWe)cdW-8O z41Fk1{o*-H0wdRsw0|i)&Ak8+-d;D<;?mXC#6zy+y5?QtnYjySu?5`QC!AGU`H~&^ zANx<7qH9j+u1QLYs+S*2-* zruU+}e6p=VyQ>%ID|?N1%Y3Ok5;PsUq5ie%b*D|@Cr9j0t?AQ$&3A^Qd&KsRs{a#~U#0uXjnh0(_WAgW{{ zOjm&mcodWV1^^1*t#G;&En!x{3jl`62R2^QTfF417^74u;qL0fQVDLe2muY_~&Dr*XMcZfJ0=p#!k+Os0*-ipGbd<*od zctufb5yzLghBkw1c_m^)7l2VFs*%Czpq}GmJHX{tlyvS)eUAud6PfoAiWoe^N%wPj zYZVA~a_VHEv2yf*oEYw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T@?8@3G$HIFr zCwUNo++W{my$G6IbsMUG$9Qc`CdOA>-puI&Wmqfg*1cx;!x(RoD=DdRUA)2k!YaiG zMN+=HWap&cYpLanKl}R?X&u+ucVMtrmV!7+O*yI-o|dp-*cZNNL)7}>+q&x=$_fqc zRWabVxDO_X3f^stE>Ar4Wa^_`tKZ1PvQWqPlvgSqc0DlcOT^jq6I>X-!EVInMRKw6 z3!LJwp^461HaCijqH5mMO-3(Qd|&-a9{pyoTxhFPWZrP;MW}q)Mq22H`fNDkx%+V6 z;_SVnPt^!6#&sT-F5X&}Kenpy?fNiVi?4&%RN5=9e6ox~O&b^(jv^M=9K5`hdUtJ6 zwm_4QLFT;=tucEe9Ym)2T#FX<90=Havu0c;{ID=UbNm`W=$Sh3jQg3X9WucZfs&D?-Eu+@Lke}9aJ|NSbNy((&o`0*Er=e{`d^2D6Y($o+8 z&(#h|f-dFpG8V0nJc&y!PcCXpx4E2hbzlqh?Z{bTTh2OH&p7!^vFlJznHIYppWYp5 zdlp#~Va9cJjmV;nsN@bsN05F?BjV8mBiVJ_k%#xC>C4JRef3#;Wo1*H{;@`g=hl<% z8i>A|heqs103%Lk@{07bBdr~)XsW#%skOpUf1X6x@c_#dhPKRf^c literal 0 HcmV?d00001 diff --git a/public/static/js/firm.js b/public/static/js/firm.js new file mode 100644 index 0000000..6259e61 --- /dev/null +++ b/public/static/js/firm.js @@ -0,0 +1,98 @@ +/** + + @Name: layuiNetCompany - 大气风格的网络公司企业模版 + @Author: xuxingyu + @Copyright: layui.com + + */ + +layui.define(['jquery', 'element', 'carousel', 'laypage'], function(exports){ + var $ = layui.jquery + ,element = layui.element + ,carousel = layui.carousel + ,laypage = layui.laypage; + + //轮播渲染 + carousel.render({ + elem: '#banner' + ,width: '100%' + ,height: '898px' + ,arrow: 'always' + }); + + //滚动监听 + $(window).scroll(function() { + var scr=$(document).scrollTop(); + scr > 0 ? $(".nav").addClass('scroll') : $(".nav").removeClass('scroll'); + }); + + //轮播文字 + $(function(){ + $('.banner').children('.title').addClass('active'); + }) + + //导航切换 + var btn = $('.nav').find('.nav-list').children('button') + ,spa = btn.children('span') + ,ul = $('.nav').find('.nav-list').children('.layui-nav'); + btn.on('click', function(){ + if(!$(spa[0]).hasClass('spa1')){ + spa[0].className = 'spa1'; + spa[1].style.display = 'none'; + spa[2].className = 'spa3'; + $('.nav')[0].style.height = 90 + ul[0].offsetHeight + 'px'; + }else{ + spa[0].className = ''; + spa[1].style.display = 'block'; + spa[2].className = ''; + $('.nav')[0].style.height = 80 + 'px'; + } + }); + + //关于内容 + $('.main-about').find('.aboutab').children('li').each(function(index){ + $(this).on('click', function(){ + $(this).addClass('layui-this').siblings().removeClass('layui-this'); + $('.aboutab').siblings().fadeOut("fast"); + $('.aboutab').siblings().eq(index).fadeIn(""); + }); + }); + + //动态分页 + laypage.render({ + elem: 'newsPage' + ,count: 50 + ,theme: '#2db5a3' + ,layout: ['page', 'next'] + }); + + //案例分页 + laypage.render({ + elem: 'casePage' + ,count: 50 + ,theme: '#2db5a3' + ,layout: ['page', 'next'] + }); + + //新闻字段截取 + $(function(){ + $(".main-news").find(".content").each(function(){ + var span = $(this).find(".detail").children("span") + ,spanTxt = span.html(); + if(document.body.clientWidth > 463){ + span.html(spanTxt); + }else{ + span.html(span.html().substring(0, 42)+ '...') + }; + $(window).resize(function(){ + if(document.body.clientWidth > 463){ + span.html(spanTxt); + }else{ + span.html(span.html().substring(0, 42)+ '...') + }; + }); + }); + }); + + exports('firm', {}); +}); \ No newline at end of file diff --git a/view/admin/category/create.html b/view/admin/category/create.html index 0eb944b..2b8fa67 100644 --- a/view/admin/category/create.html +++ b/view/admin/category/create.html @@ -77,13 +77,19 @@
模板
- +
+
状态
+
+ + +
+
diff --git a/view/admin/category/edit.html b/view/admin/category/edit.html index f3e338e..bee4000 100644 --- a/view/admin/category/edit.html +++ b/view/admin/category/edit.html @@ -60,18 +60,18 @@
副标题/描述
- +
附图
- +
上传
- +
@@ -79,12 +79,19 @@
模板
+
+
状态
+
+ + +
+
@@ -102,12 +109,33 @@ + + + + +
+ {include file="common/_header"} + + {include file="common/left_system"} + +
+ +
+
+ + 首页 + 系统设置 + +
+
+
+
+ 系统管理 +
+
+
+
首页块1标题前半部分
+
+ +
+
+
+
首页块1标题后半部分
+
+ +
+
+
+
首页块2标题前半部分
+
+ +
+
+
+
首页块2标题后半部分
+
+ +
+
+
+
首页底部查看链接跳转
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ + + {include file="common/_footer"} + + +
` + + + \ No newline at end of file diff --git a/view/admin/system/index.html b/view/admin/system/index.html index 1683cb5..c913939 100644 --- a/view/admin/system/index.html +++ b/view/admin/system/index.html @@ -2,130 +2,243 @@ - - - - 系统管理 - {include file="common/_require"} + + + + 系统管理 + {include file="common/_require"} - + -
- {include file="common/_header"} +
+ {include file="common/_header"} - {include file="common/left_system"} + {include file="common/left_system"} -
+
-
-
- - 首页 - 系统设置 - -
-
-
-
- 系统管理 -
-
-
-
网站名称
-
- -
-
-
-
网站描述
-
- -
-
-
-
网站logo
-
-
- -
-
- -
- -
-
-
-
备案号
-
- -
-
-
-
主域名
-
- -
-
-
-
资源域名
-
- -
-
-
-
统计代码
-
- -
-
-
- -
-
-
-
- -
-
-
+
+ +
+
+
+ 系统管理 +
+
+
+
网站名称
+
+ +
+
+
+
网站描述
+
+ +
+
+
+
网站logo
+
+
+ +
+
+ +
+ +
+
+
+
备案号
+
+ +
+
+
+
公安备案号
+
+ +
+
+
+
公安备案跳转链接
+
+ +
+
+
+
版权描述
+
+ +
+
+
+
联系电话
+
+ +
+
+
+
工作时间
+
+ +
+
+
+
联系邮箱
+
+ +
+
+
+
二维码
+
+
+
上传二维码
+
+
+ +
+ +
+
+
+
站点fovicon
+
+
+
上传fovicon
+
+
+ +
+ +
+
+
+
主域名
+
+ +
+
+
+
资源域名
+
+ +
+
+
+
统计代码
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
- {include file="common/_footer"} + {include file="common/_footer"} - -
` + var uploadSiteLogo = upload.render({ + elem: '.upload-site-logo', + url: '{:url("api/Files/save")}', + data: { + type: 1, + dir: 'site_logo' + }, + accept: 'images', + done: function (result) { + if (result.code == 0) { + layer.msg('上传成功'); + $('input[name="site_logo"]').val(result.data.save_name); + $('.site-logo').attr('src', result.data.src); + } else { + layer.msg(result.msg) + } + } + }) + var uploadSiteLogo = upload.render({ + elem: '.upload-site-qrcode', + url: '{:url("api/Files/save")}', + data: { + type: 1, + dir: 'site_logo' + }, + accept: 'images', + done: function (result) { + if (result.code == 0) { + layer.msg('上传成功'); + $('input[name="site_qrcode"]').val(result.data.save_name); + $('.site-qrcode').attr('src', result.data.src); + } else { + layer.msg(result.msg) + } + } + }) + var uploadSiteLogo = upload.render({ + elem: '.upload-site-fovicon', + url: '{:url("api/Files/save")}', + data: { + type: 1, + dir: 'site_logo' + }, + accept: 'images', + acceptMime:'image/x-icon', + exts:'ico', + done: function (result) { + if (result.code == 0) { + layer.msg('上传成功'); + $('input[name="site_favicon"]').val(result.data.save_name); + $('.site-fovicon').attr('src', result.data.src); + } else { + layer.msg(result.msg) + } + } + }) + + }) + +
` \ No newline at end of file diff --git a/view/admin/system/theme.html b/view/admin/system/theme.html index 294a102..1e39b32 100644 --- a/view/admin/system/theme.html +++ b/view/admin/system/theme.html @@ -40,10 +40,10 @@
选择主题
- +
- +
diff --git a/view/common/tpl/error.html b/view/common/tpl/error.html index 8c82f92..023c7f0 100644 --- a/view/common/tpl/error.html +++ b/view/common/tpl/error.html @@ -8,12 +8,12 @@

{$msg}

-

3秒后跳转 立即跳转

+

3秒后跳转 立即跳转

\ No newline at end of file diff --git a/view/index/common/_require.html b/view/index/common/_require.html new file mode 100644 index 0000000..b6a15ba --- /dev/null +++ b/view/index/common/_require.html @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + +{:get_system_config('site_tongji')} diff --git a/view/index/common/tpl_easy_blue.html b/view/index/common/tpl_easy_blue.html new file mode 100644 index 0000000..56dbcc5 --- /dev/null +++ b/view/index/common/tpl_easy_blue.html @@ -0,0 +1,22 @@ + + + + + + {:get_system_config('site_name')}-首页 + + {include file='common/_easy_blue_require'/} + + + {include file='common/_easy_blue_header'/} +
+ +
+ {include file='common/_easy_blue_footer'/} + + + + \ No newline at end of file diff --git a/view/index/index/easy_blue_index.html b/view/index/index/easy_blue_index.html new file mode 100644 index 0000000..9a51e14 --- /dev/null +++ b/view/index/index/easy_blue_index.html @@ -0,0 +1,143 @@ + + + + + + {:get_system_config('site_name')}-首页 + + {include file='common/_easy_blue_require'/} + + + + + +
+ +
+ +
+
+

{:get_system_config('easy_index_block_1_title_1')}{:get_system_config('easy_index_block_1_title_2')}

+
+ {volist name='list_nav_index_block_1' id='nav'} + +
+
+
+
+

{$nav.title}

+

{$nav.desc}

+
+ 查看产品 > +
+
+ + {/volist} +
+
+
+
+
+

{:get_system_config('easy_index_block_2_title_1')}{:get_system_config('easy_index_block_2_title_2')}

+
+ {volist name='list_nav_index_block_2' id='nav'} + +
+
+
+
+

{$nav.title}

+ +

{$nav.desc}

+
+
+
+ {/volist} + +
+ +
+ {if !empty(get_system_config('easy_index_bottom_jump_url')) } + 查看更多 + {/if} +
+
+
+ + + + + + + \ No newline at end of file