瀏覽代碼

公司大屏

linwu 1 年之前
父節點
當前提交
a7e452b23d

+ 72 - 9
app/admin/controller/Previous.php

@@ -4,6 +4,7 @@ namespace app\admin\controller;
 
 use app\admin\AdminBaseController;
 use app\common\model\PreviousModel;
+use app\common\model\PreviousYearModel;
 use app\common\validate\PreviousValidate;
 use think\exception\ValidateException;
 
@@ -15,20 +16,24 @@ class Previous extends AdminBaseController
      */
     public function index()
     {
+        $year_list = PreviousYearModel::order(['priority' => 'desc'])->select();
+
         return view('', [
+            'year_list'   => $year_list,
             'status_list' => PreviousModel::STATUS,
-            'month_list' => PreviousModel::MONTH,
+            'month_list'  => PreviousModel::MONTH,
         ]);
     }
 
     public function listPrevious()
     {
-        $map   = $this->dealEqualInput(['status','month']);
-        $list  = PreviousModel::where($map)
-            ->order(['priority' => 'desc','id'=>'desc'])
+        $map   = $this->dealEqualInput(['status', 'month']);
+        $list  = PreviousModel::with(['previous_year'])
+            ->where($map)
+            ->order(['priority' => 'desc', 'id' => 'desc'])
             ->limit(input('limit'))
             ->page(input('page'))
-            ->append(['status_text','month_text'])
+            ->append(['status_text', 'month_text'])
             ->select();
         $count = PreviousModel::where($map)->count();
         if ($count == 0) {
@@ -49,13 +54,15 @@ class Previous extends AdminBaseController
      */
     public function previousForm()
     {
-        $id      = input('id/d, 0');
-        $info = PreviousModel::find($id);
+        $id        = input('id/d', 0);
+        $info      = PreviousModel::find($id);
+        $year_list = PreviousYearModel::order(['priority' => 'desc'])->select();
 
         return view('', [
-            'info'     => $info,
+            'info'        => $info,
+            'year_list'   => $year_list,
             'status_list' => PreviousModel::STATUS,
-            'month_list' => PreviousModel::MONTH,
+            'month_list'  => PreviousModel::MONTH,
         ]);
     }
 
@@ -76,4 +83,60 @@ class Previous extends AdminBaseController
 
         ajax_return();
     }
+
+    /**
+     * 往期回顾年份
+     */
+    public function year()
+    {
+        return view('');
+    }
+
+    public function listYear()
+    {
+        $list  = PreviousYearModel::order(['priority' => 'desc'])
+            ->limit(input('limit'))
+            ->page(input('page'))
+            ->select();
+        $count = PreviousModel::count();
+        if ($count == 0) {
+            ajax_return(1, '未查询到数据');
+        }
+        list_return($list, $count);
+    }
+
+    public function yearForm()
+    {
+        $id   = input('id/d', 0);
+        $info = PreviousYearModel::find($id);
+
+        return view('', [
+            'info' => $info,
+        ]);
+    }
+
+    public function editYear()
+    {
+        $data = input('post.');
+
+        if (empty($data['id'])) {
+            PreviousYearModel::create($data);
+        } else {
+            PreviousYearModel::update($data, ['id' => $data['id']]);
+        }
+
+        ajax_return();
+    }
+
+    public function delYear()
+    {
+        $id    = input('id/d', 0);
+        $check = PreviousModel::where('year_id', $id)->find();
+        if (!empty($check)) {
+            ajax_return(1, '该年份下有往期回顾,无法删除,请先删除往期回顾!');
+        }
+
+        PreviousYearModel::destroy($id);
+        ajax_return();
+    }
 }

+ 1 - 1
app/admin/controller/Vote.php

@@ -128,7 +128,7 @@ class Vote extends AdminBaseController
 
     public function listApply()
     {
-        $map = $this->dealEqualInput([], ['vote_id']);
+        $map = $this->dealEqualInput(['vote_id']);
 
         $list  = VoteApplyModel::with(['user', 'vote'])->where($map)->limit(input('limit'))->page(input('page'))->select();
         $count = VoteApplyModel::where($map)->count();

+ 1 - 5
app/admin/view/article/cate_form.html

@@ -44,11 +44,7 @@
 </div>
 
 <script>
-    layui.config({
-        base: '/static/echoui/' //静态资源所在路径
-    }).extend({
-        index: 'lib/index' //主入口模块
-    }).use(['index', 'form'], function () {
+    layui.use(['index', 'form'], function () {
         const admin = layui.admin;
         const form = layui.form;
         form.render();

+ 19 - 5
app/admin/view/company/info.html

@@ -205,12 +205,12 @@
                                 <tr>
                                     <td colspan="2" onclick="copyMobileUrl('https://110.88.129.62:8443');">IP:https://110.88.129.62:8443</td>
                                     <td onclick="copyMobileUrl('jjrencai');">用户名:jjrencai</td>
-                                    <td onclick="copyMobileUrl('4g#4FXQTwY1M%Mbr');">密码:4g#4FXQTwY1M%Mbr</td>
+                                    <td onclick="copyMobileUrl('Mq5qdWPBg5SS#!Tk');">密码:Mq5qdWPBg5SS#!Tk</td>
                                 </tr>
                                 <tr>
                                     <td onclick="copyMobileUrl('https://172.21.134.92');">网址:https://172.21.134.92</td>
                                     <td onclick="copyMobileUrl('jjrencai');">用户名:jjrencai</td>
-                                    <td onclick="copyMobileUrl('uowN^H^W*Nc6TMdL');">密码:uowN^H^W*Nc6TMdL</td>
+                                    <td onclick="copyMobileUrl('DvNCeXtxMI!9Enib');">密码:DvNCeXtxMI!9Enib</td>
                                     <td onclick="copyMobileUrl('D:\\install\\Navicat Premium 15\\navicat.exe');">navicate:D:\install\Navicat Premium 15\navicat.exe</td>
                                 </tr>
                             </tbody>
@@ -225,7 +225,7 @@
                                 <tr>
                                     <td>服务器</td>
                                     <td onclick="copyMobileUrl('zmw');">用户名:zmw</td>
-                                    <td onclick="copyMobileUrl('Qzzwy@123');">密码:Qzzwy@123</td>
+                                    <td onclick="copyMobileUrl('!QAZ3edc@WSX');">密码:!QAZ3edc@WSX</td>
                                 </tr>
                                 <tr>
                                     <td>数据库</td>
@@ -389,8 +389,22 @@
                             <tr>
                                 <td onclick="copyMobileUrl('jbangjiashifu@jinjianghc.com');">帐号:jbangjiashifu@jinjianghc.com</td>
                                 <td onclick="copyMobileUrl('Jjhc2023#');">密码:Jjhc2023#</td>
-                                <td onclick="copyMobileUrl('wx7c3f5350fb154209');">APPID:wx7c3f5350fb154209</td>
-                                <td onclick="copyMobileUrl('4dafe85be26747c25fa524f55e8e483d');">APPSECRET:4dafe85be26747c25fa524f55e8e483d</td>
+                                <td onclick="copyMobileUrl('wx7819e070711f8e8b');">APPID:wx7819e070711f8e8b</td>
+                                <td onclick="copyMobileUrl('c3b41dbf00f2e98e7ce8b4f7cf1caab0');">APPSECRET:c3b41dbf00f2e98e7ce8b4f7cf1caab0</td>
+                            </tr>
+                            </tbody>
+                        </table>
+                        <table class="layui-table">
+                            <thead>
+                            <tr>
+                                <th colspan="3">晋帮家后台</th>
+                            </tr>
+                            </thead>
+                            <tbody>
+                            <tr>
+                                <td onclick="copyMobileUrl('https://jbangjia.jinjianghc.com/');">网址:https://jbangjia.jinjianghc.com/</td>
+                                <td onclick="copyMobileUrl('admin');">账号:admin</td>
+                                <td onclick="copyMobileUrl('Jjhc2023#');">密码:Jjhc2023#</td>
                             </tr>
                             </tbody>
                         </table>

+ 15 - 0
app/admin/view/previous/index.html

@@ -13,6 +13,17 @@
                         </select>
                     </div>
                 </div>
+                <div class="layui-inline">
+                    <label class="layui-form-label">年份</label>
+                    <div class="layui-input-block">
+                        <select name="month">
+                            <option value="">全部年份</option>
+                            {volist name="year_list" id="v"}
+                            <option value="{$v.id}">{$v.name}</option>
+                            {/volist}
+                        </select>
+                    </div>
+                </div>
                 <div class="layui-inline">
                     <label class="layui-form-label">月份</label>
                     <div class="layui-input-block">
@@ -46,6 +57,9 @@
                     <i class="layui-icon layui-icon-delete"></i>删除
                 </a>
             </script>
+            <script type="text/html" id="setYear">
+                {{d.previous_year.name}}
+            </script>
         </div>
     </div>
 </div>
@@ -65,6 +79,7 @@
                 [
                     {type: 'checkbox', fixed: 'left'},
                     {field: 'title', title: '标题'},
+                    {field: 'year', title: '年份', width: 80, toolbar: '#setYear'},
                     {field: 'month_text', title: '月份', width: 80},
                     {field: 'status_text', title: '状态', width: 80, align: 'center'},
                     {field: 'priority', title: '排序', width: 80},

+ 11 - 1
app/admin/view/previous/previous_form.html

@@ -14,12 +14,22 @@
                                        class="layui-input">
                             </div>
                         </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>年份</label>
+                            <div class="layui-input-block">
+                                <select name="month" lay-verify="required">
+                                    {volist name="year_list" id="year"}
+                                    <option value="{$year.id}" {:array_get($info,'year_id')==$year.id ? 'selected' : '' }>{$year.name}</option>
+                                    {/volist}
+                                </select>
+                            </div>
+                        </div>
                         <div class="layui-form-item">
                             <label class="layui-form-label"><span style="color:#f90c05;">*</span>月份</label>
                             <div class="layui-input-block">
                                 <select name="month" lay-verify="required">
                                     {volist name="month_list" id="month"}
-                                    <option value="{$key}">{$month}</option>
+                                    <option value="{$key}" {:array_get($info,'month')==$key ? 'selected' : '' }>{$month}</option>
                                     {/volist}
                                 </select>
                             </div>

+ 103 - 0
app/admin/view/previous/year.html

@@ -0,0 +1,103 @@
+<div class="layui-fluid">
+    <div class="layui-card">
+        <div class="layui-form layui-form-pane  layui-card-header layuiadmin-card-header-auto">
+        </div>
+        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+            <button class="layui-btn layuiadmin-btn" data-type="add">添加</button>
+        </div>
+
+        <div class="layui-card-body">
+            <table id="{$lay_table}" lay-filter="{$lay_table}"></table>
+            <script type="text/html" id="setTpl">
+                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit">
+                    <i class="layui-icon layui-icon-edit"></i>编辑
+                </a>
+                <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">
+                    <i class="layui-icon layui-icon-delete"></i>删除
+                </a>
+            </script>
+        </div>
+    </div>
+</div>
+
+<script>
+    layui.use(['index', 'admin', 'form', 'table'], function () {
+        const $ = layui.$;
+        const admin = layui.admin;
+        const form = layui.form;
+        const table = layui.table;
+        form.render();
+
+        table.render({
+            elem: '#{$lay_table}',
+            url: "{:url('previous/listYear')}",
+            cols: [
+                [
+                    {field: 'name', title: '年份'},
+                    {field: 'priority', title: '排序', width: 80},
+                    {title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#setTpl'}
+                ]
+            ],
+            page: true,
+            limit: 50,
+            cellMinWidth: 150,
+            text: '对不起,加载出现异常!'
+        });
+
+        form.on('submit({$lay_btn})', function (data) {
+            table.reload('{$lay_table}', {
+                where: data.field,
+                page: {
+                    curr: 1
+                }
+            });
+        });
+
+        //事件
+        const active = {
+            add: function () {
+                const index = layer.open({
+                    type: 2,
+                    title: '添加往期回顾年份',
+                    content: "{:url('previous/yearForm')}",
+                    maxmin: true,
+                    area: ['550px', '550px']
+                });
+                layer.full(index);
+            }
+        };
+
+        //监听工具条
+        table.on('tool({$lay_table})', function (obj) {
+            const data = obj.data;
+            if (obj.event === 'del') {
+                layer.confirm('确定删除吗?', function (index) {
+                    admin.req({
+                        url: "{:url('previous/delYear')}",
+                        data: {
+                            id: data.id
+                        },
+                        done: function (res) {
+                            layui.table.reload('{$lay_table}');
+                        }
+                    });
+                    layer.close(index);
+                });
+            } else if (obj.event === 'edit') {
+                const index = layer.open({
+                    type: 2,
+                    title: '编辑往期回顾年份',
+                    content: "{:url('previous/yearForm')}?id=" + data.id,
+                    maxmin: true,
+                    area: ['550px', '550px']
+                });
+                layer.full(index);
+            }
+        });
+
+        $('.layui-btn.layuiadmin-btn').on('click', function () {
+            const type = $(this).data('type');
+            active[type] ? active[type].call(this) : '';
+        });
+    });
+</script>

+ 61 - 0
app/admin/view/previous/year_form.html

@@ -0,0 +1,61 @@
+<div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+        <div class="layui-col-md12">
+            <div class="layui-card">
+                <div class="layui-card-header">往期回顾年份信息</div>
+                <div class="layui-card-body" pad15>
+                    <div class="layui-form layui-form-pane" lay-filter="{$lay_table}">
+                        <input type="hidden" name="id" value="{:array_get($info,'id')}">
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>年份</label>
+                            <div class="layui-input-block">
+                                <input type="text" name="name" value="{:array_get($info,'name')}" lay-verify="required"
+                                       placeholder="请输入分类名称" autocomplete="off"
+                                       class="layui-input">
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <label class="layui-form-label"><span style="color:#f90c05;">*</span>排序</label>
+                            <div class="layui-input-block">
+                                <input type="text" name="priority" value="{:array_get($info,'priority',255)}"
+                                       lay-verify="required" placeholder="请输入排序值(倒序,值越大越靠前)"
+                                       autocomplete="off" class="layui-input">
+                                <div class="layui-form-mid layui-word-aux">倒序,值越大越靠前</div>
+                            </div>
+                        </div>
+                        <div class="layui-form-item">
+                            <div class="layui-input-block">
+                                <input type="button" lay-submit lay-filter="{$lay_btn}" value="确认提交" class="layui-btn">
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    layui.use(['index', 'form'], function () {
+        const admin = layui.admin;
+        const form = layui.form;
+        form.render();
+
+        form.on('submit({$lay_btn})', function (obj) {
+            const index = parent.layer.getFrameIndex(window.name);
+            admin.req({
+                url: "{:url('previous/editYear')}",
+                type: 'post',
+                data: obj.field,
+                done: function (res) {
+                    layer.msg("提交成功", {
+                        icon: 1
+                    });
+                    parent.layui.table.reload('lay-previous-year-table'); //重载表格
+                    parent.layer.close(index);
+                }
+            });
+        });
+    });
+</script>

+ 5 - 0
app/common/model/PreviousModel.php

@@ -26,4 +26,9 @@ class PreviousModel extends BaseModel
     {
         return self::MONTH[$data['month']];
     }
+
+    public function previousYear()
+    {
+        return $this->hasOne(PreviousYearModel::class, 'id', 'year_id');
+    }
 }

+ 9 - 0
app/common/model/PreviousYearModel.php

@@ -0,0 +1,9 @@
+<?php
+
+namespace app\common\model;
+
+class PreviousYearModel extends BaseModel
+{
+    // 设置表名
+    protected $name = 'previous_year';
+}

+ 30 - 7
app/home/controller/Previous.php

@@ -3,6 +3,7 @@
 namespace app\home\controller;
 
 use app\common\model\PreviousModel;
+use app\common\model\PreviousYearModel;
 use app\common\model\ReservedModel;
 use app\home\HomeBaseController;
 
@@ -10,18 +11,40 @@ class Previous extends HomeBaseController
 {
     public function index()
     {
-        $same_month = date('n');
-        $month      = input('month/d', $same_month);
-        $previous   = PreviousModel::where('status', ReservedModel::STATUS_SHOW)
+        $year_id   = input('year_id/d');
+        $year_list = PreviousYearModel::order(['priority' => 'desc'])->select();
+        if (empty($year_id)) {
+            $year_id = $year_list[count($year_list) - 1]['id'];
+        }
+
+        return view('', [
+            'year_list' => $year_list,
+            'year_id'   => $year_id,
+        ]);
+    }
+
+    public function list()
+    {
+        $month   = input('month/d');
+        $year_id = input('year_id/d');
+        if (empty($month) || empty($year_id)) {
+            return redirect(url('index'));
+        }
+        $previous = PreviousModel::where('status', ReservedModel::STATUS_SHOW)
+            ->where('year_id', $year_id)
             ->where('month', $month)
             ->order(['priority' => 'desc', 'id' => 'desc'])
             ->select();
-        $previous = array_split($previous,3);
+        $previous = array_split($previous, 3);
+
+        $year_list = PreviousYearModel::order(['priority' => 'desc'])->select();
+
         return view('', [
-            'previous' => $previous,
-            'month_list' => PreviousModel::MONTH,
+            'previous'    => $previous,
+            'year_list'   => $year_list,
+            'year_id'     => $year_id,
             'month_index' => $month,
+            'month_list'  => PreviousModel::MONTH,
         ]);
     }
-
 }

+ 73 - 42
app/home/view/previous/index.html

@@ -8,8 +8,8 @@
     <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;}
-        .title-review {margin-top:10px;height:40px;background: #F6F6F6;border-radius: 20px;}
-        .title-review ul {display:flex;justify-content:space-around;height: 40px;align-items: center;}
+        .title-review {margin-top:10px;height:40px;background: #F6F6F6;border-radius: 20px;overflow:hidden;}
+        .title-review ul {display:flex;justify-content:flex-start;height: 40px;align-items: center;}
         .title-review ul li {height: 40px;line-height: 40px;width: 72px;text-align: center;}
         .title-review ul li.active {background:#F27F0C;}
         .title-review ul li a {color:#A2A2A2;font-weight:bold;}
@@ -17,16 +17,14 @@
         .review {width:870px;margin:0 auto;}
         .review .review-box {width:870px;height:470px;background:#F6F6F6;border:1px solid #FEFEFE;border-radius:20px;padding-top:9px;overflow-y:auto;margin-top:10px;}
         .review-box .review-item {display:flex;}
-        .review-box .flex-box {width: calc((100% - 10px) / 3);height:148px;margin-bottom: 5px;}
-        .review-box .img-box {width:224px;height:148px;margin:0 auto;}
-        .review-box .img-box .img {width:224px;height:116px;border-radius:20px;background-size:cover;background-position: center;}
+        .review-box .flex-box {width: calc((100% - 10px) / 4);height:148px;margin-bottom: 5px;}
+        .review-box .img-box {width:200px;height:148px;margin:0 auto;}
+        .review-box .img-box .img {width:200px;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;}
         .back-box {position:absolute;left:388px;bottom:-15px;width:114px;height:48px;background:white;border-radius:20px;box-shadow:0 5px 2px #8A9CB2;display:flex;justify-content:center;align-items:center;}
         .back-box .back-text {width:104px;height:38px;line-height:38px;background:#F27F0C;border-radius:20px;color:white;font-size:20px;font-weight:bold;text-align:center;}
-        .no-more {display:block;margin:150px auto 0 auto;}
         .jucai {   position: absolute;right: -20px;bottom: -27px;}
         .layui-layer-imgtit a {max-width:100% !important;}
-        .layui-layer-imgbar {display:block !important;}
     </style>
 </head>
 <body>
@@ -35,28 +33,78 @@
         <div class="review">
             <div class="title-review">
                 <ul>
-                    {foreach $month_list as $key=>$month}
-                        <li class="{eq name='key' value='$month_index'}active{/eq}"><a href="{:url('previous/index')}?month={$key}">{$month}</a></li>
+                    {foreach $year_list as $key=>$year}
+                        <li class="{eq name='year_id' value='$year.id'}active{/eq}"><a href="{:url('previous/index')}?year_id={$year.id}">{$year.name}</a></li>
                     {/foreach}
                 </ul>
             </div>
             <div class="review-box">
-                {empty name="previous"}
-                    <img src="__HIMAGES__/no_more.png" class="no-more">
-                {else/}
-                    {volist name="previous" id="item"}
-                    <div class="review-item">
-                        {volist name="item" id="vo"}
-                        <div class="flex-box">
-                            <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>
+                <div class="review-item">
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="1" style="background-image:url('__HIMAGES__/month/1.png')"></div>
                         </div>
-                        {/volist}
                     </div>
-                    {/volist}
-                {/empty}
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="2" style="background-image:url('__HIMAGES__/month/2.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="3" style="background-image:url('__HIMAGES__/month/3.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="4" style="background-image:url('__HIMAGES__/month/4.png')"></div>
+                        </div>
+                    </div>
+                </div>
+                <div class="review-item">
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="5" style="background-image:url('__HIMAGES__/month/5.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="6" style="background-image:url('__HIMAGES__/month/6.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="7" style="background-image:url('__HIMAGES__/month/7.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="8" style="background-image:url('__HIMAGES__/month/8.png')"></div>
+                        </div>
+                    </div>
+                </div>
+                <div class="review-item">
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="9" style="background-image:url('__HIMAGES__/month/9.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="10" style="background-image:url('__HIMAGES__/month/10.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="11" style="background-image:url('__HIMAGES__/month/11.png')"></div>
+                        </div>
+                    </div>
+                    <div class="flex-box">
+                        <div class="img-box">
+                            <div class="img" data-month="12" style="background-image:url('__HIMAGES__/month/12.png')"></div>
+                        </div>
+                    </div>
+                </div>
             </div>
         </div>
         <div class="back-box">
@@ -69,25 +117,8 @@
 <script src="__COMMON_JS__/layer/layer.js"></script>
 <script>
     $('.img').click(function(){
-        let url = $(this).data('url');
-        let title = $(this).data('title');
-        let json = {
-            "title": title, //相册标题
-            "id": 1, //相册id
-            "start": 0, //初始显示的图片序号,默认0
-            "data": [   //相册包含的图片,数组格式
-                {
-                    "alt": title,
-                    "pid": 2, //图片id
-                    "src": url, //原图地址
-                    "thumb": "" //缩略图地址
-                }
-            ]
-        };
-        layer.photos({
-            photos: json
-        });
-        $('.layui-layer-imgbar').show();
+        const month = $(this).data('month');
+        location.href = "{:url('previous/list')}?year_id={$year_id}&month=" + month;
     });
 </script>
 </body>

+ 94 - 0
app/home/view/previous/list.html

@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="zh-cn">
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width,initial-scale=1">
+    <title>晋江人力资本有限公司</title>
+    <link rel="stylesheet" href="__HCSS__/style.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;}
+        .title-review {margin-top:10px;height:40px;background: #F6F6F6;border-radius: 20px;}
+        .title-review ul {display:flex;justify-content:space-around;height: 40px;align-items: center;}
+        .title-review ul li {height: 40px;line-height: 40px;width: 72px;text-align: center;}
+        .title-review ul li.active {background:#F27F0C;}
+        .title-review ul li a {color:#A2A2A2;font-weight:bold;}
+        .title-review ul li.active a{color:white;}
+        .review {width:870px;margin:0 auto;}
+        .review .review-box {width:870px;height:470px;background:#F6F6F6;border:1px solid #FEFEFE;border-radius:20px;padding-top:9px;overflow-y:auto;margin-top:10px;}
+        .review-box .review-item {display:flex;}
+        .review-box .flex-box {width: calc((100% - 10px) / 3);height:148px;margin-bottom: 5px;}
+        .review-box .img-box {width:224px;height:148px;margin:0 auto;}
+        .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;}
+        .back-box {position:absolute;left:388px;bottom:-15px;width:114px;height:48px;background:white;border-radius:20px;box-shadow:0 5px 2px #8A9CB2;display:flex;justify-content:center;align-items:center;}
+        .back-box .back-text {width:104px;height:38px;line-height:38px;background:#F27F0C;border-radius:20px;color:white;font-size:20px;font-weight:bold;text-align:center;}
+        .no-more {display:block;margin:150px auto 0 auto;}
+        .jucai {   position: absolute;right: -20px;bottom: -27px;}
+        .layui-layer-imgtit a {max-width:100% !important;}
+        .layui-layer-imgbar {display:block !important;}
+    </style>
+</head>
+<body>
+<div class="container">
+    <div class="inner-box">
+        <div class="review">
+            <div class="title-review">
+                <ul>
+                    {foreach $month_list as $key=>$month}
+                        <li class="{eq name='key' value='$month_index'}active{/eq}"><a href="{:url('previous/list')}?year_id={$year_id}&month={$key}">{$month}</a></li>
+                    {/foreach}
+                </ul>
+            </div>
+            <div class="review-box">
+                {empty name="previous"}
+                    <img src="__HIMAGES__/no_more.png" class="no-more">
+                {else/}
+                    {volist name="previous" id="item"}
+                    <div class="review-item">
+                        {volist name="item" id="vo"}
+                        <div class="flex-box">
+                            <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>
+                        </div>
+                        {/volist}
+                    </div>
+                    {/volist}
+                {/empty}
+            </div>
+        </div>
+        <div class="back-box">
+            <a href="{:url('previous/index')}" class="back-text">返回</a>
+        </div>
+        <img src="__HIMAGES__/jucai.png" class="jucai">
+    </div>
+</div>
+<script src="__COMMON_JS__/jquery-1.12.4.min.js"></script>
+<script src="__COMMON_JS__/layer/layer.js"></script>
+<script>
+    $('.img').click(function(){
+        let url = $(this).data('url');
+        let title = $(this).data('title');
+        let json = {
+            "title": title, //相册标题
+            "id": 1, //相册id
+            "start": 0, //初始显示的图片序号,默认0
+            "data": [   //相册包含的图片,数组格式
+                {
+                    "alt": title,
+                    "pid": 2, //图片id
+                    "src": url, //原图地址
+                    "thumb": "" //缩略图地址
+                }
+            ]
+        };
+        layer.photos({
+            photos: json
+        });
+        $('.layui-layer-imgbar').show();
+    });
+</script>
+</body>
+</html>

二進制
public/static/home/images/month/1.png


二進制
public/static/home/images/month/10.png


二進制
public/static/home/images/month/11.png


二進制
public/static/home/images/month/12.png


二進制
public/static/home/images/month/2.png


二進制
public/static/home/images/month/3.png


二進制
public/static/home/images/month/4.png


二進制
public/static/home/images/month/5.png


二進制
public/static/home/images/month/6.png


二進制
public/static/home/images/month/7.png


二進制
public/static/home/images/month/8.png


二進制
public/static/home/images/month/9.png