linwu 3 долоо хоног өмнө
parent
commit
f68c8f395c

+ 9 - 2
app/home/controller/Index.php

@@ -14,13 +14,20 @@ class Index extends HomeBaseController
         $reserved = ReservedModel::where('status', ReservedModel::STATUS_SHOW)
             ->order(['priority' => 'desc', 'id' => 'desc'])
             ->select();
+
         $previous = PreviousModel::where('status', ReservedModel::STATUS_SHOW)
             ->order(['priority' => 'desc', 'id' => 'desc'])
-            ->limit(3)
+            ->limit(15)
             ->select();
+        $previous_list = [];
+        foreach ($previous as $k => $v) {
+            $item = floor($k / 3);
+            $previous_list[$item][] = $v;
+        }
+
         return view('', [
             'reserved' => $reserved,
-            'previous' => $previous,
+            'previous_list' => $previous_list,
         ]);
     }
 

+ 29 - 7
app/home/view/index/index.html

@@ -5,6 +5,7 @@
     <meta name="viewport" content="width=device-width,initial-scale=1">
     <title>晋江人力资本有限公司</title>
     <link rel="stylesheet" href="__HCSS__/style.css">
+    <link rel="stylesheet" href="/static/common/css/swiper.min.css">
     <style>
         .container {width:1255px;height:605px;background-image:url("__HIMAGES__/index.jpg");background-size:100% 100%;background-repeat:no-repeat;position:relative;}
         .inner-box {width:890px;height:546px;position:absolute;left:336px;top:32px;background:white;}
@@ -21,7 +22,7 @@
         .review-box .img-box .img {width:224px;height:116px;border-radius:20px;background-size:cover;background-position: center;}
         .review-box .img-box p {font-size:12px;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;line-clamp: 2;-webkit-box-orient: vertical;height:32px;line-height:16px;}
         .right {margin-right:30px;}
-        .booked-box {width:570px;height:322px;background:#F6F6F6;border:1px solid #FEFEFE;border-radius:20px;overflow:auto;}
+        .booked-box {width:570px;height:322px;background:#F6F6F6;border:1px solid #FEFEFE;border-radius:20px;overflow-x:hidden;overflow-y: scroll;}
         .booked-title {margin-top:20px;}
         .booked-box table {width:535px;margin-left:20px;font-size:14px;margin-top:10px;}
         .booked-box table td{padding-right:5px;}
@@ -53,12 +54,20 @@
                 </div>
             </div>
             <div class="review-box">
-                {volist name="previous" id="vo"}
-                <div class="img-box">
-                    <div class="img" data-url="{$vo.image}" data-title="{$vo.title}"  style="background-image:url('{$vo.image}')"></div>
-                    <p>{$vo.title}</p>
+                <div class="swiper-container" id="swiper1">
+                    <div class="swiper-wrapper">
+                        {volist name="previous_list" id="previous"}
+                        <div class="swiper-slide">
+                            {volist name="previous" id="vo"}
+                            <div class="img-box">
+                                <div class="img" data-url="{$vo.image}" data-title="{$vo.title}"  style="background-image:url('{$vo.image}')"></div>
+                                <p>{$vo.title}</p>
+                            </div>
+                            {/volist}
+                        </div>
+                        {/volist}
+                    </div>
                 </div>
-                {/volist}
             </div>
         </div>
         <div class="right fr">
@@ -73,7 +82,7 @@
                     </div>
                 </div>
                 <div class="booked-box">
-                    <table cellpadding="0" cellspacing="0">
+                    <table cellpadding="0" cellspacing="0" id="booked-box">
                         <tr class="thead">
                             <td style="width:111px;">时间</td>
                             <td style="width:253px">内容</td>
@@ -111,8 +120,10 @@
     </div>
 </div>
 <script src="__COMMON_JS__/jquery-1.12.4.min.js"></script>
+<script src="/static/common/js/swiper.min.js"></script>
 <script src="__COMMON_JS__/layer/layer.js"></script>
 <script>
+    var swiper1 = new Swiper('#swiper1',{autoplay: 5000});
     $('.img').click(function(){
         let url = $(this).data('url');
         let title = $(this).data('title');
@@ -134,6 +145,17 @@
         });
         $('.layui-layer-imgbar').show();
     });
+    const boxHeight = $('#booked-box').height();
+    const bookHeight = $('.booked-box').height();
+    const scrollheight = boxHeight - bookHeight + 20;
+    let boxTop = 0;
+    setInterval(function(){
+        if (boxTop >= scrollheight) {
+            boxTop = 0;
+        }
+        boxTop++;
+        $('.booked-box').scrollTop(boxTop);
+    },50)
 </script>
 </body>
 </html>

+ 2 - 1
composer.json

@@ -28,7 +28,8 @@
         "topthink/think-view": "^1.0",
         "topthink/think-captcha": "^3.0",
         "endroid/qr-code": "^4.3",
-        "phpoffice/phpexcel": "^1.8"
+        "phpoffice/phpexcel": "^1.8",
+        "firebase/php-jwt": "^6.4"
     },
     "require-dev": {
         "symfony/var-dumper": "^4.2",

+ 64 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "6c4f97b80a395eb539ee7d04739585a1",
+    "content-hash": "12420d354ec6472ef6cf098f5efb0a3c",
     "packages": [
         {
             "name": "bacon/bacon-qr-code",
@@ -200,6 +200,69 @@
             ],
             "time": "2021-09-17T07:50:43+00:00"
         },
+        {
+            "name": "firebase/php-jwt",
+            "version": "v6.4.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/firebase/php-jwt.git",
+                "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
+                "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1||^8.0"
+            },
+            "require-dev": {
+                "guzzlehttp/guzzle": "^6.5||^7.4",
+                "phpspec/prophecy-phpunit": "^1.1",
+                "phpunit/phpunit": "^7.5||^9.5",
+                "psr/cache": "^1.0||^2.0",
+                "psr/http-client": "^1.0",
+                "psr/http-factory": "^1.0"
+            },
+            "suggest": {
+                "ext-sodium": "Support EdDSA (Ed25519) signatures",
+                "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Firebase\\JWT\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Neuman Vong",
+                    "email": "neuman+pear@twilio.com",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Anant Narayanan",
+                    "email": "anant@php.net",
+                    "role": "Developer"
+                }
+            ],
+            "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
+            "homepage": "https://github.com/firebase/php-jwt",
+            "keywords": [
+                "jwt",
+                "php"
+            ],
+            "support": {
+                "issues": "https://github.com/firebase/php-jwt/issues",
+                "source": "https://github.com/firebase/php-jwt/tree/v6.4.0"
+            },
+            "time": "2023-02-09T21:01:23+00:00"
+        },
         {
             "name": "league/flysystem",
             "version": "1.1.10",

+ 1 - 0
vendor/composer/autoload_psr4.php

@@ -24,6 +24,7 @@ return array(
     'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'),
     'League\\Flysystem\\Cached\\' => array($vendorDir . '/league/flysystem-cached-adapter/src'),
     'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'),
+    'Firebase\\JWT\\' => array($vendorDir . '/firebase/php-jwt/src'),
     'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'),
     'DASPRiD\\Enum\\' => array($vendorDir . '/dasprid/enum/src'),
     'BaconQrCode\\' => array($vendorDir . '/bacon/bacon-qr-code/src'),

+ 8 - 0
vendor/composer/autoload_static.php

@@ -50,6 +50,10 @@ class ComposerStaticInit8fda6fe797a34d32a281406e65775056
             'League\\Flysystem\\Cached\\' => 24,
             'League\\Flysystem\\' => 17,
         ),
+        'F' => 
+        array (
+            'Firebase\\JWT\\' => 13,
+        ),
         'E' => 
         array (
             'Endroid\\QrCode\\' => 15,
@@ -141,6 +145,10 @@ class ComposerStaticInit8fda6fe797a34d32a281406e65775056
         array (
             0 => __DIR__ . '/..' . '/league/flysystem/src',
         ),
+        'Firebase\\JWT\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
+        ),
         'Endroid\\QrCode\\' => 
         array (
             0 => __DIR__ . '/..' . '/endroid/qr-code/src',

+ 66 - 0
vendor/composer/installed.json

@@ -203,6 +203,72 @@
             ],
             "install-path": "../endroid/qr-code"
         },
+        {
+            "name": "firebase/php-jwt",
+            "version": "v6.4.0",
+            "version_normalized": "6.4.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/firebase/php-jwt.git",
+                "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/firebase/php-jwt/zipball/4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
+                "reference": "4dd1e007f22a927ac77da5a3fbb067b42d3bc224",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1||^8.0"
+            },
+            "require-dev": {
+                "guzzlehttp/guzzle": "^6.5||^7.4",
+                "phpspec/prophecy-phpunit": "^1.1",
+                "phpunit/phpunit": "^7.5||^9.5",
+                "psr/cache": "^1.0||^2.0",
+                "psr/http-client": "^1.0",
+                "psr/http-factory": "^1.0"
+            },
+            "suggest": {
+                "ext-sodium": "Support EdDSA (Ed25519) signatures",
+                "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
+            },
+            "time": "2023-02-09T21:01:23+00:00",
+            "type": "library",
+            "installation-source": "dist",
+            "autoload": {
+                "psr-4": {
+                    "Firebase\\JWT\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-3-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Neuman Vong",
+                    "email": "neuman+pear@twilio.com",
+                    "role": "Developer"
+                },
+                {
+                    "name": "Anant Narayanan",
+                    "email": "anant@php.net",
+                    "role": "Developer"
+                }
+            ],
+            "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
+            "homepage": "https://github.com/firebase/php-jwt",
+            "keywords": [
+                "jwt",
+                "php"
+            ],
+            "support": {
+                "issues": "https://github.com/firebase/php-jwt/issues",
+                "source": "https://github.com/firebase/php-jwt/tree/v6.4.0"
+            },
+            "install-path": "../firebase/php-jwt"
+        },
         {
             "name": "league/flysystem",
             "version": "1.1.10",

+ 11 - 2
vendor/composer/installed.php

@@ -3,7 +3,7 @@
         'name' => 'topthink/think',
         'pretty_version' => 'dev-master',
         'version' => 'dev-master',
-        'reference' => 'd365eac53d1dc6a4672b78366f167ab237b09e88',
+        'reference' => 'bc180cac6193bd49bfbbe2951d8a3c8f377cd0f5',
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
@@ -37,6 +37,15 @@
             'aliases' => array(),
             'dev_requirement' => false,
         ),
+        'firebase/php-jwt' => array(
+            'pretty_version' => 'v6.4.0',
+            'version' => '6.4.0.0',
+            'reference' => '4dd1e007f22a927ac77da5a3fbb067b42d3bc224',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../firebase/php-jwt',
+            'aliases' => array(),
+            'dev_requirement' => false,
+        ),
         'league/flysystem' => array(
             'pretty_version' => '1.1.10',
             'version' => '1.1.10.0',
@@ -166,7 +175,7 @@
         'topthink/think' => array(
             'pretty_version' => 'dev-master',
             'version' => 'dev-master',
-            'reference' => 'd365eac53d1dc6a4672b78366f167ab237b09e88',
+            'reference' => 'bc180cac6193bd49bfbbe2951d8a3c8f377cd0f5',
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),

+ 1 - 1
vendor/services.php

@@ -1,5 +1,5 @@
 <?php 
-// This file is automatically generated at:2023-07-03 17:32:01
+// This file is automatically generated at:2025-06-23 16:58:45
 declare (strict_types = 1);
 return array (
   0 => 'think\\captcha\\CaptchaService',