完成首页

main
liutk 2024-06-17 17:06:06 +08:00
parent 21a291f1a6
commit de6765c50e
57 changed files with 8770 additions and 162 deletions

4
.gitignore vendored
View File

@ -17,3 +17,7 @@ yarn-error.log
/.fleet
/.idea
/.vscode
.user.ini
.htaccess
/index.html
/404.html

View File

@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use App\Models\Article;
class ArticleController extends Controller
{
public function index()
{
$banners = Ad::where('address', 'index-top')->show()->sort()->get();
$examples = Article::where('category', 'examples')->show()->recommend()->sort()->limit(10)->get();
$news = Article::where('category', 'news')->show()->recommend()->sort()->get();
return view('index',compact('banners', 'examples', 'news'));
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use App\Models\Article;
use App\Models\Ad;
class IndexController extends Controller
{
public function index()
{
$banners = Ad::where('address', 'index-top')->show()->sort()->get();
$examples = Article::where('category', 'examples')->show()->recommend()->sort()->limit(10)->get();
$news = Article::where('category', 'news')->show()->recommend()->sort()->get();
return view('index',compact('banners', 'examples', 'news'));
}
}

View File

@ -62,18 +62,8 @@ class Ad extends Model
];
}
public static function typeMapLabel()
{
return [
self::TYPE_IN => "<span class='label label-info'>入住缴费</span>",
self::TYPE_CONTINUE => "<span class='label label-warning'>续住缴费</span>",
self::TYPE_EXIT => "<span class='label label-danger'>离开结算</span>",
'*'=>'其他:${live_in}'
];
}
public function scopeShow(){
$q->where('is_enable', true)->where('published_at', '>=', now());
public function scopeShow($q){
$q->where('is_enable', true)->where('published_at', '<=', now());
}
public function scopeSort($q)

View File

@ -6,7 +6,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use EloquentFilter\Filterable;
use App\Casts\Storage;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
class Article extends Model
{
@ -18,7 +19,7 @@ class Article extends Model
return $date->format('Y-m-d H:i:s');
}
protected $appends = ['tags'];
protected $appends = ['tags', 'cover_url'];
protected $casts = [
'created_at' => 'datetime:Y-m-d H:i:s',
@ -42,8 +43,18 @@ class Article extends Model
'appendixes',
];
public function scopeShow(){
$q->where('is_enable', true)->where('published_at', '>=', now());
protected function coverUrl():Attribute {
return Attribute::make(
get: fn($value) => $this->cover ? (Str::startsWith($this->cover, ['http://', 'https://']) ? $this->cover : Storage::url($this->cover)) : null,
);
}
public function scopeRecommend($q){
$q->where('is_recommend', true);
}
public function scopeShow($q){
$q->where('is_enable', true)->where('published_at', '<=', now());
}
public function scopeSort($q)

View File

@ -3,6 +3,8 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;
use App\Models\Article;
class AppServiceProvider extends ServiceProvider
{
@ -21,5 +23,6 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
\Schema::defaultStringLength(191);
View::share('services', Article::where('category', 'services')->show()->recommend()->sort()->get());
}
}

View File

@ -63,6 +63,23 @@ return [
]) : [],
],
'old_mysql' => [
'driver' => 'mysql',
'url' => env('OLD_DATABASE_URL'),
'host' => env('OLD_DB_HOST', '127.0.0.1'),
'port' => env('OLD_DB_PORT', '3306'),
'database' => env('OLD_DB_DATABASE', 'forge'),
'username' => env('OLD_DB_USERNAME', 'forge'),
'password' => env('OLD_DB_PASSWORD', ''),
'unix_socket' => env('OLD_DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),

View File

@ -0,0 +1,56 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Throwable;
class ArticleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//老文章分类表
$oldArticles = DB::connection('old_mysql')->table('cases')->get();
$categoryArr = [
0=> 'examples',
1=> 'services',
2=> 'news',
];
foreach($oldArticles as $article){
$_article = [
'id' => $article -> id,
'category' => $categoryArr[$article -> type ?? 0],
'title' => $article->title,
'cover' => $article->img,
'content' => $article->content,
'published_at' => now(),
'sort' => $article -> sort ?? 0,
'is_recommend' => $article->recommend,
'is_enable' => 1,
'created_at' => now(),
'updated_at' => now(),
];
$articles[] = $_article;
}
if(count($articles) > 0){
DB::table('articles')->truncate();
try {
DB::begintransaction();
DB::table('articles')->insert($articles);
DB::commit();
} catch (Throwable $th) {
DB::rollBack();
report($th);
}
}
}
}

View File

@ -18,7 +18,7 @@ class KeywordSeeder extends Seeder
Keyword::truncate();
$list = [
['key' => 'article_category', 'name' => '文章分类', 'list' => [
'examples'=>'案例', 'services' =>'服务', 'news'=> '咨询动态'
]],
['key' => 'article_tag', 'name' => '文章标签', 'list' => [//标签value填写色号指定标签颜色
@ -34,11 +34,16 @@ class KeywordSeeder extends Seeder
if (isset($item['list'])) {
$keywords = [];
foreach ($item['list'] as $index => $name) {
if(is_string($index)){
$_key = $index;
}else{
$_key = $type->key. ($index + 1);
}
$template = [
'key' => $type->key . ($index + 1),
'key' => $_key,
'parent_key' => $type->key,
'lv' => $type->lv + 1,
'sort' => $index + 1
];
if (is_array($name)) {
$template = array_merge($template, $name);

View File

@ -1,6 +1,7 @@
<?php
return [
'id' => '序号',
'remember_me' => '记住我',
'login' => '登 录',
'logout' => '退出登录',

2
public/js/jquery.1.8.2.min.js vendored 100644

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,800 @@
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td,section,article,aside,header,footer,nav,dialog,figure,hgroup {
margin: 0;
padding: 0
}
input,select,textarea {
font-size: 100%
}
table {
border-collapse: collapse;
border-spacing: 0
}
fieldset,img {
border: 0
}
caption,th {
text-align: left
}
h1,h2,h3,h4,h5,h6 {
font-size: 100%;
font-weight: 500
}
ul,ol,li {
list-style: none
}
em,i {
font-style: normal
}
del {
text-decoration: line-through
}
address,caption,cite,code,dfn,em,th,var {
font-style: normal;
font-weight: 500
}
img {
border: 0;
max-width: 100%
}
input,img {
vertical-align: middle
}
input:focus,a:focus {
outline: none
}
a {
color: #333;
text-decoration: none;
-webkit-tap-highlight-color: rgba(0,0,0,0)
}
a:active {
opacity: .7
}
* {
outline: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-box-sizing: border-box;
box-sizing: border-box
}
html {
-webkit-text-size-adjust: none;
-ms-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0,0,0,0);
background: #f4f4f4;
color: #333;
font-family: "Helvetica Neue",Helvetica,Tahoma,sans-serif
}
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
html {
line-height: 1.3;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%
}
body {
margin: 0
}
article,aside,footer,header,nav,section {
display: block
}
h1 {
font-size: 2em;
margin: 0.67em 0
}
figcaption,figure,main {
display: block
}
figure {
margin: 1em 40px
}
hr {
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 0;
overflow: visible
}
pre {
font-family: monospace, monospace;
font-size: 1em
}
a {
background-color: transparent;
-webkit-text-decoration-skip: objects
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted
}
b,strong {
font-weight: inherit
}
b,strong {
font-weight: bolder
}
code,kbd,samp {
font-family: monospace, monospace;
font-size: 1em
}
dfn {
font-style: italic
}
mark {
background-color: #ff0;
color: #000
}
small {
font-size: 80%
}
sub,sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline
}
sub {
bottom: -0.25em
}
sup {
top: -0.5em
}
audio,video {
display: inline-block
}
audio:not([controls]) {
display: none;
height: 0
}
img {
border-style: none
}
svg:not(:root) {
overflow: hidden
}
button,input,optgroup,select,textarea {
font-family: sans-serif;
font-size: 100%;
line-height: 1.15;
margin: 0
}
button,input {
overflow: visible
}
button,select {
text-transform: none
}
button,html [type="button"],[type="reset"],[type="submit"] {
-webkit-appearance: button
}
button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0
}
button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText
}
fieldset {
padding: 0.35em 0.75em 0.625em
}
legend {
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal
}
progress {
display: inline-block;
vertical-align: baseline
}
textarea {
overflow: auto
}
[type="checkbox"],[type="radio"] {
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0
}
[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button {
height: auto
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px
}
[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration {
-webkit-appearance: none
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit
}
details,menu {
display: block
}
summary {
display: list-item
}
canvas {
display: inline-block
}
template {
display: none
}
[hidden] {
display: none
}
.bdr-btm,.bdr-top {
position: relative
}
.bdr-top::before {
content: ' ';
position: absolute;
width: 100%;
left: 0;
top: 0;
border-top: 1px solid #ddd;
color: #ddd;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5)
}
.bdr-btm::after {
content: ' ';
position: absolute;
width: 100%;
left: 0;
bottom: 0;
border-top: 1px solid #ddd;
color: #ddd;
-webkit-transform: scaleY(0.5);
-ms-transform: scaleY(0.5);
transform: scaleY(0.5)
}
.fl {
float: left
}
.fr {
float: right
}
.clearfix:before,.clearfix:after {
display: table;
content: ''
}
.clearfix:after {
clear: both;
zoom:1}
html,body {
height: 100%
}
body {
min-width: 1200px
}
body a:hover {
cursor: pointer;
text-decoration: none
}
.publicHead {
width: 100%;
height: 40px;
-webkit-box-shadow: inset 0px -1px 0px 0px rgba(4,0,0,0.1);
box-shadow: inset 0px -1px 0px 0px rgba(4,0,0,0.1)
}
.publicHead .headCont {
width: 1200px;
height: 40px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center
}
.publicHead .contLeft {
font-size: 12px;
color: #9897a3
}
.publicHead .contLeft a {
color: #70b582;
padding: 0 10px
}
.publicHead .contRight {
font-size: 12px;
color: #9897a3
}
.publicHead .contRight a {
padding-left: 21px
}
.publicHead .contRight .active {
color: #70b582
}
.logo {
height: 120px;
width: 1200px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center
}
.logo .right img {
float: left
}
.logo .lian {
display: inline-block;
margin-left: 13px
}
.logo .all {
font-size: 12px;
letter-spacing: 7px;
color: #b3c49e
}
.logo .phone {
font-size: 16px;
color: #94c04f
}
.nav {
background-color: #117b33;
clear: both
}
.nav .navCont {
width: 1200px;
height: 60px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex
}
.nav .navCont .item {
width: 200px;
height: 60px;
font-size: 14px;
text-align: center;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
position: relative
}
.nav .navCont .item a {
display: inline-block;
width: 100%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
position: relative;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center
}
.nav .navCont .item .items {
width: 200px;
height: 24px;
display: inline-block;
border-right: 1px solid #0b4c1f;
color: white;
-webkit-box-shadow: 1px 0 #178b3c;
box-shadow: 1px 0 #178b3c;
cursor: pointer
}
.nav .navCont .item .wo {
border-right: none;
-webkit-box-shadow: none;
box-shadow: none
}
.nav .navCont .active {
width: 200px;
background-color: #8abb4c
}
.nav .navCont .itemCont {
display: none;
position: absolute;
top: 60px;
left: 0;
background: #8abb4c;
width: 200px;
z-index: 999
}
.nav .navCont .itemCont li {
height: 33px;
line-height: 33px
}
.nav .navCont .itemCont li:last-child {
margin-bottom: 20px
}
.nav .navCont .itemCont li a {
color: white
}
.search {
height: 60px;
width: 100%;
-webkit-box-shadow: inset 0px -1px 0px 0px rgba(4,0,0,0.1);
box-shadow: inset 0px -1px 0px 0px rgba(4,0,0,0.1)
}
.search .searchCont {
width: 1200px;
margin: auto;
height: 60px;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between
}
.search .searchLeft span {
font-size: 14px;
color: #666666
}
.search .searchLeft .active {
color: #8abb4c
}
.search .searchLeft span:nth-child(n+2) {
padding-right: 10px
}
.search .searchRight {
position: relative
}
.search .searchRight #searchValue {
width: 180px;
height: 32px;
background-color: #f0f0f0;
-webkit-border-radius: 16px;
border-radius: 16px;
border: none;
padding-left: 12px
}
.search .searchRight ::-webkit-input-placeholder {
font-size: 12px;
color: #cccccc
}
.search .searchRight .btnSearch {
background: url("../images/btn_search.png") no-repeat;
width: 32px;
height: 32px;
border: none;
position: absolute;
top: 0;
right: 0
}
.pic {
display: block;
width: 1200px;
height: 326px;
margin: auto
}
.publicCont {
width: 1200px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
margin-top: 10px
}
.publicCont .publicContLeft {
width: 280px
}
.publicCont .publicContLeft .contLeftTop {
width: 280px;
padding-bottom: 35px;
background-color: #ffffff;
-webkit-box-shadow: 0px 2px 16px 0px rgba(64,64,71,0.15);
box-shadow: 0px 2px 16px 0px rgba(64,64,71,0.15);
overflow: hidden
}
.publicCont .publicContLeft .contLeftTop .top {
width: 280px;
height: 60px;
background-color: #60bd90;
text-align: center;
line-height: 60px;
font-size: 18px;
letter-spacing: 1px;
color: #ffffff
}
.publicCont .publicContLeft .contLeftTop p {
font-size: 14px;
letter-spacing: 1px;
color: #60626f;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
padding-left: 54px;
width: 275px;
height: 17px;
margin-top: 35px
}
.publicCont .publicContLeft .contLeftBottom {
width: 280px;
background-color: #ffffff;
-webkit-box-shadow: 0px 2px 16px 0px rgba(64,64,71,0.15);
box-shadow: 0px 2px 16px 0px rgba(64,64,71,0.15);
margin-top: 10px;
overflow: hidden;
padding-bottom: 30px
}
.publicCont .publicContLeft .contLeftBottom .top {
width: 280px;
height: 60px;
background-color: #60bd90;
text-align: center;
line-height: 60px;
font-size: 18px;
letter-spacing: 1px;
color: #ffffff
}
.publicCont .publicContLeft .contLeftBottom .item {
text-align: center;
margin-top: 20px
}
.publicCont .publicContLeft .contLeftBottom .item img {
width: 200px;
height: 200px
}
.publicCont .publicContLeft .contLeftBottom .item p {
font-size: 12px;
letter-spacing: 1px;
color: #666666;
padding: 10px 0
}
.pagination {
clear: both;
width: 120px;
font-size: 12px;
margin: auto;
padding-top: 40px;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
white-space: nowrap
}
.pagination li {
display: inline-block;
color: #706c76;
padding-right: 15px;
cursor: pointer
}
.pagination li.active a {
color: #4fbf64
}
.publicFooter {
margin-top: 100px;
width: 100%;
height: 40px;
background: #f3f3f3
}
.publicFooter .publicFooterCont {
width: 1200px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
font-size: 12px;
color: #6e7078;
height: 40px;
font-family: MicrosoftYaHei
}
.publicFooter .publicFooterCont a {
color: #6e7078
}
.publicBottom {
width: 100%;
height: 60px;
background-color: #4f624c
}
.publicBottom .publicBottomCont {
width: 1200px;
height: 60px;
margin: auto;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
font-size: 12px;
color: #ffffff
}
.publicBottom .publicBottomCont span {
padding-right: 15px
}
.publicCont {
display: block
}
.publicCont .publicContLeft {
float: left;
margin-bottom: 100px
}
.publicCont .publicContRight {
float: left;
margin-left: 10px
}
.publicFooter {
clear: both;
margin: 0
}
.publicFooterCont {
clear: both
}

12
public/web/css/swiper.min.css vendored 100644

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,16 @@
$(".item a").click(function(){
$(".item").removeClass("active");
$(this).parent().addClass("active");
})
$(".item").mouseover(function(){
$(".item").removeClass("active");
$(this).addClass("active");
$(this).find(".itemCont").show();
})
$(".item").mouseleave(function(){
$(this).find(".itemCont").hide();
})
$(".list li").click(function(){
$(".list li").removeClass("active");
$(this).addClass("active");
})

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,121 @@
@extends('layouts.main')
@section('style')
<link rel="stylesheet" href="/web/css/home.css">
<link rel="stylesheet" href="/web/css/swiper.min.css">
@endsection
@section('content')
<div class="swiper-container">
<div class="swiper-wrapper">
@foreach($banners as $banner)
<div class="swiper-slide">
<img src="{{$banner->resource}}">
</div>
@endforeach
</div>
<div class="swiper-pagination"></div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</div>
<div class="project">
<!-- <div class="title">项目<span>分类</span></div> -->
<img src="/web/images/title.png" alt="">
<a href="#0" class="go">
<img src="/web/images/baseicons9.png" alt="">
</a>
<div class="list">
@foreach($services as $k => $service)
@if($k < 6)
<div class="item">
<!-- cases/index?id= -->
<a href="{{url('articles/'.$service->id.'/info')}}">{{$service->title}} ></a>
</div>
@endif
@endforeach
</div>
<div class="pic">
@foreach($services as $k => $service)
<div class="items">
<img src="{{$service->cover_url}}" alt="">
<div class="moreAll">
<span>{{$service->title}}</span>
<!-- cases/index?id= -->
<a href="{{url('articles/'.$service->id.'/info')}}" class="more">更多</a>
</div>
</div>
@endforeach
</div>
</div>
<div class="succ">
<div class="suCont">
<img src="/web/images/title2.png" alt="">
<!-- cases/cases -->
<a href="/" class="go"><img src="/web/images/baseicons9.png" alt=""></a>
@foreach($examples as $i => $example)
<div class="suContItems">
<!-- cases/index?id= -->
<a href="{{url('articles/'.$example->id.'/info')}}">
<img src="{{$example->cover_url}}" alt="">
<div class="show">
<h1>-{{$i+1}}-</h1>
<p>{{$example->title}}</p>
</div>
</a>
</div>
@endforeach
</div>
</div>
<img src="/web/images/advantage.png" class="we" alt="">
<div class="about">
<div class="aboutCont">
<img src="/web/images/title3.png" alt="">
<a href="#0" class="go"><img src="/web/images/baseicons9.png" alt=""></a>
<div class="com">
<div class="jieshao">
<img src="/web/images/pic10.png" alt="">
<div class="right">
<p class="title">公司介绍</p>
<div class="cont">
15165163165
</div>
<!-- cases/company -->
<a href="/">更多</a>
</div>
</div>
<div class="dongtai">
<p class="title">公司动态</p>
@foreach($news as $item)
<!-- cases/index?id= -->
<a href="{{url('articles/'.$item->id.'/info')}}" class="cont">· {{$item->title}}</a>
@endforeach
</div>
</div>
</div>
</div>
<div class="lianxi">
<img src="/web/images/title4.png" alt="">
<!-- cases/contactus -->
<a href="/" class="go"><img src="/web/images/baseicons9.png" alt=""></a>
<img class="pic11" src="/web/images/pic11.png" alt="">
<p class="hezuo">合作共赢</p>
<p class="text">富琳全体员工竭诚以待</p>
<a href="/" class="link">联系我们</a>
</div>
<!-- <div id="form">
<p class="liuyan">给我们留言</p>
<form action="" name="myform" id="sumbit" method="post">
<textarea name="word" id="" placeholder="请在此输入留言内容,我们会尽快与您联系。(必填)"></textarea>
<input type="text" name="name" placeholder="姓名">
<input type="text" name="phone" placeholder="电话">
<input type="text" id="email" name="email" placeholder="邮箱">
<button type="submit" class="submit" onclick="check(this.form);return false;">提交</button>
</form>
</div> -->
@endsection
@section('script')
<script src="{{asset('/web/js/swiper.js')}}"></script>
@endsection

View File

@ -0,0 +1 @@
<link rel="stylesheet" href="{{asset('web/css/public.css')}}">

View File

@ -0,0 +1,89 @@
<script src="{{asset('js/jquery.1.8.2.min.js')}}"></script>
<script src="{{asset('/web/js/public.js')}}"></script>
<script>
var swiper = new Swiper('.swiper-container', {
loop: true,
loopedSlides: 3,
autoplay: {
delay: 10000,
stopOnLastSlide: false,
disableOnInteraction: true,
},
pagination: {
el: '.swiper-pagination',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
$("#returnTop").click(function () {
$(document).click = null;
$('html , body').animate({
scrollTop: 0
}, 'slow');
})
function addFavorite2() {
var url = window.location;
var title = document.title;
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("360se") > -1) {
alert("由于360浏览器功能限制请按 Ctrl+D 手动收藏!");
} else if (ua.indexOf("msie 8") > -1) {
window.external.AddToFavoritesBar(url, title); //IE8
} else if (document.all) {
try {
window.external.addFavorite(url, title);
} catch (e) {
alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
}
} else if (window.sidebar) {
window.sidebar.addPanel(title, url, "");
} else {
alert('您的浏览器不支持,请按 Ctrl+D 手动收藏!');
}
}
function check(form) {
if (form.word.value == '') {
alert("请输入留言!");
return false;
}
if (form.name.value == '') {
alert("请输入姓名!");
return false;
}
if (form.email.value == '') {
alert("请输入邮箱!");
return false;
}
if (form.phone.value == '') {
alert("请输入电话!");
return false;
}
var isPhone = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
if(!isPhone.test(form.phone.value)){
alert("电话号码格式不正确");
return false;
}
var reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
if(!reg.test(form.email.value)){
alert("邮箱格式不正确");
return false;
}
$.get("/",
{'username':form.name.value ,'word':form.word.value ,'phone':form.phone.value , 'email':form.email.value} ,
function(res){
if(res){
alert('留言成功');
} else{
alert('留言失败');
}
},'json'
);
}
// $(".btnSearch").click(function(){
// console.log($("#searchValue").val())
// $.ajax
// })
</script>

View File

@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<title>广西富琳清洁服务有限公司</title>
<meta charset="utf-8">
@include('layouts.css')
@yield('style')
<meta http-equiv="X-UA-Compatible" content="IE=10,IE=9,IE=8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
</head>
<body class="home blog">
<!-- 公共头部 -->
<div class="publicHead">
<div class="headCont">
<div class="contLeft">
请百度搜索
<a href="#0">广西富琳清洁服务有限公司</a>官方网站关键词找到我们!
</div>
<div class="contRight">
<a href=# rel="sidebar" onclick="javascript:addFavorite2()">收藏本站</a>
</div>
</div>
</div>
<div class="logo">
<img src="/web/images/logo.png" alt="">
<div class="right">
<img src="/web/images/icon_phone.png" alt="">
<div class="lian">
<p class="all">全国咨询热线</p>
<p class="phone">aaaaaa</p>
</div>
</div>
</div>
<!-- 公共NAV -->
<div class="nav">
<div class="navCont">
<div class="item active">
<a href="/"><span class="items">网站首页<span></a>
</div>
<div class="item ">
<a href="#0"><span class="items">服务项目<span></a>
<ul class="itemCont">
@foreach($services as $service)
<li><a href="/">{{$service->title}}</a></li>
@endforeach
</ul>
</div>
<div class="item ">
<a href="/"><span class="items">案列展示</span></a>
</div>
<div class="item ">
<a href="/"><span class="items">公司介绍<span></a>
</div>
<div class="item ">
<a href="/"><span class="items">资讯动态<span></a>
</div>
<div class="item ">
<a href="/"><span class="items" style="border-right:none">联系我们<span></a>
</div>
</div>
</div>
<!-- 公共搜索 -->
<div class="search">
<div class="searchCont">
<div class="searchLeft">
<span class="active">热点搜索词:</span>
</div>
<div class="searchRight">
<form action="/" method="get">
<input type="text" name="search" id="searchValue" placeholder="请输入搜索关键字!">
<button type="submit" class="btnSearch"></button>
</form>
</div>
</div>
</div>
@yield('content')
<!-- <div class="publicFooter">
<div class="publicFooterCont">
<span>友情链接:</span>
<a href="/" target="/" > | </a>
</div>
</div> -->
<div class="publicBottom">
<div class="publicBottomCont">
<span>广西富琳清洁服务有限公司</span>
<span><a style='color:#fff' href="/">版权所有</p></a></span>
<span><a style='color:#fff' href="/">免责声明</p></a></span>
<span><a style='color:#fff' target="_blank" href="//beian.miit.gov.cn/" >桂ICP备18008179号-2</a></span>
</div>
</div>
</body>
@include('layouts.js')
@yield('script')
</html>

File diff suppressed because one or more lines are too long

View File

@ -13,6 +13,5 @@ use Illuminate\Support\Facades\Route;
|
*/
Route::get('/', function () {
return view('welcome');
});
Route::get('/', [App\Http\Controllers\IndexController::class, 'index']);
Route::get('/articles/{id}/info', [App\Http\Controllers\ArticleController::class, 'index']);

0
storage/app/.gitignore vendored 100644 → 100755
View File

0
storage/app/public/.gitignore vendored 100644 → 100755
View File

0
storage/framework/.gitignore vendored 100644 → 100755
View File

0
storage/framework/cache/.gitignore vendored 100644 → 100755
View File

0
storage/framework/cache/data/.gitignore vendored 100644 → 100755
View File

0
storage/framework/sessions/.gitignore vendored 100644 → 100755
View File

0
storage/framework/testing/.gitignore vendored 100644 → 100755
View File

0
storage/framework/views/.gitignore vendored 100644 → 100755
View File

0
storage/logs/.gitignore vendored 100644 → 100755
View File