大事记调整
parent
530e2ca961
commit
cf99120dba
|
@ -45,14 +45,27 @@
|
|||
-->
|
||||
{if !(in_array($category['id'],[4,5,7,9,10]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">副标题</label>
|
||||
{php}
|
||||
$subtitle = '副标题';
|
||||
$titleNotice = '';
|
||||
$titleValue = '';
|
||||
switch ($category['id']) {
|
||||
case 37:
|
||||
$subtitle = '月份';
|
||||
$titleValue = 1;
|
||||
$titleNotice = '月份必填 不填则默认为1月';
|
||||
break;
|
||||
}
|
||||
{/php}
|
||||
<label class="layui-form-label">{$subtitle ??''}</label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" type="text" name="item[sub_title]" maxlength="60" />
|
||||
<input class="layui-input" type="text" name="item[sub_title]" value="{$titleValue??''}" maxlength="60" />
|
||||
<div class="layui-form-mid layui-word-aux">{$titleNotice}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !(in_array($category['id'],[5]))}
|
||||
{if !(in_array($category['id'],[5,37]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">封面图</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -61,7 +74,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{if !(in_array($category['id'],[5,42]))}
|
||||
{if !(in_array($category['id'],[5,37,42]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">手机封面图</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -78,14 +91,27 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{if in_array($category['id'], [39,9,10,23,24,25])}
|
||||
{if in_array($category['id'], [39,9,10,23,24,25,37])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">组图</label>
|
||||
{php}
|
||||
$imgName = 'PC组图';
|
||||
$pcImgSize = '';
|
||||
|
||||
switch ($category['id']) {
|
||||
case 37:
|
||||
$imgName = '大事记';
|
||||
$pcImgSize = '645*385';
|
||||
break;
|
||||
}
|
||||
{/php}
|
||||
<label class="layui-form-label">{$imgName}</label>
|
||||
<div class="layui-input-block">
|
||||
{:widget('manager.upload/multi',['append' => '_imgs','imgs' => $item.imgs??'', 'num' => $item.num??10, 'imgSize' => $pcImgSize, $item['id']??''])}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if in_array($category['id'], [39,9,10,23,24,25])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">组图-手机端</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -94,7 +120,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{if in_array($category['id'], [24])}
|
||||
{if in_array($category['id'], [9,10,23,24,42])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">资源优势PC组图</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -154,20 +180,17 @@
|
|||
-->
|
||||
|
||||
{if !isset($allowSummary) || $allowSummary}
|
||||
{if !(in_array($category['id'],[4,5,9,10,6,35,36,42]))}
|
||||
{if !(in_array($category['id'],[4,5,9,10,6,35,36,37,42]))}
|
||||
<div class="layui-form-itemBox2 between">
|
||||
<div class="layui-form-item">
|
||||
{if $category['id'] == 37}
|
||||
<label class="layui-form-label">大事记列表</label>
|
||||
{elseif $category['id'] == 38}
|
||||
{if $category['id'] == 38}
|
||||
<label class="layui-form-label">荣誉列表</label>
|
||||
{else /}
|
||||
<label class="layui-form-label">摘要</label>
|
||||
{/if}
|
||||
<div class="layui-input-block">
|
||||
<textarea name="item[summary]" class="layui-textarea" {if in_array($category['id'],[37,38])}rows="10"{/if}></textarea>
|
||||
<div class="layui-form-mid layui-word-aux">注:建议200字以内{if $category['id'] == 37} 大事记月份后需使用空格分割 如:1月
|
||||
中正物业正式入驻鑫苑小区、光明A区、巴音孟克商业综合体办公楼。{/if}</div>
|
||||
<textarea name="item[summary]" class="layui-textarea" {if in_array($category['id'],[38])}rows="10"{/if}></textarea>
|
||||
<div class="layui-form-mid layui-word-aux">注:建议200字以内</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,10 +5,19 @@
|
|||
<hr style="margin: 20px 0;">
|
||||
<div class="layui-form-itemBox3 between">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">标题<em>*</em></label>
|
||||
{php}
|
||||
$title = '标题';
|
||||
$titleNotice = '注:建议60个字符长度以内';
|
||||
switch ($category['id']) {
|
||||
case 37:
|
||||
$title = '年份';
|
||||
break;
|
||||
}
|
||||
{/php}
|
||||
<label class="layui-form-label">{$title}<em>*</em></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" class="layui-input" name="item[title]" value="{$item.title??''}" maxlength="60"/>
|
||||
<div class="layui-form-mid layui-word-aux">注:建议60个字符长度以内</div>
|
||||
<div class="layui-form-mid layui-word-aux">{$titleNotice}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -49,14 +58,27 @@
|
|||
-->
|
||||
{if !(in_array($category['id'],[4,5,7]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">副标题</label>
|
||||
{php}
|
||||
$subtitle = '副标题';
|
||||
$titleNotice = '';
|
||||
$titleValue = $item['sub_title'];
|
||||
switch ($category['id']) {
|
||||
case 37:
|
||||
$subtitle = '月份';
|
||||
$titleNotice = '月份必填 不填则默认为1月';
|
||||
$titleValue = $item['sub_title'] ?: 1;
|
||||
break;
|
||||
}
|
||||
{/php}
|
||||
<label class="layui-form-label">{$subtitle ??''}</label>
|
||||
<div class="layui-input-block">
|
||||
<input class="layui-input" type="text" name="item[sub_title]" value="{$item.sub_title??''}" maxlength="60" />
|
||||
<input class="layui-input" type="text" name="item[sub_title]" value="{$titleValue}" maxlength="60" />
|
||||
<div class="layui-form-mid layui-word-aux">{$titleNotice}</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !(in_array($category['id'],[5]))}
|
||||
{if !(in_array($category['id'],[5,37]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">封面图</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -72,7 +94,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{if !(in_array($category['id'],[5,42]))}
|
||||
{if !(in_array($category['id'],[5,37,42]))}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">手机封面图</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -89,14 +111,28 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{if in_array($category['id'], [39,9,10,23,24,25])}
|
||||
{if in_array($category['id'], [39,9,10,23,24,25,37])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">PC组图</label>
|
||||
{php}
|
||||
$imgName = 'PC组图';
|
||||
$pcImgSize = '';
|
||||
|
||||
switch ($category['id']) {
|
||||
case 37:
|
||||
$imgName = '大事记';
|
||||
$pcImgSize = '645*385';
|
||||
break;
|
||||
}
|
||||
{/php}
|
||||
<label class="layui-form-label">{$imgName}</label>
|
||||
|
||||
<div class="layui-input-block">
|
||||
{:widget('manager.upload/multi',['append' => '_imgs', 'imgs' => $item.imgs??'', 'num' => $item.num??10, 'imgSize' => $pcImgSize, $item['id']??''])}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if in_array($category['id'], [39,9,10,23,24,25])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">组图-手机端</label>
|
||||
<div class="layui-input-block">
|
||||
|
@ -105,7 +141,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{if in_array($category['id'], [24])}
|
||||
{if in_array($category['id'], [9,10,23,24,42])}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">资源优势PC组图</label>
|
||||
<div class="layui-input-block">
|
||||
|
|
|
@ -56,14 +56,17 @@ use app\model\Category as VCategory;
|
|||
<table class="layui-table layui-form layui-table-nobrder" id="check_box">
|
||||
<colgroup>
|
||||
<col width="15px" >
|
||||
{if $category.id!=5}
|
||||
{if !in_array($category.id, [5, 37])}
|
||||
<col width="75px">
|
||||
{/if}
|
||||
{if $category.id!=42}
|
||||
{if !in_array($category.id, [42, 37])}
|
||||
<col width="75px">
|
||||
{/if}
|
||||
<col >
|
||||
<!-- <col width="75px">-->
|
||||
{if in_array($category.id, [37])}
|
||||
<col width="">
|
||||
{/if}
|
||||
<col width="145px">
|
||||
<col width="75px">
|
||||
{if !empty($attributeList)}
|
||||
|
@ -75,13 +78,19 @@ use app\model\Category as VCategory;
|
|||
</colgroup>
|
||||
<thead>
|
||||
<td><input type="checkbox" lay-skin="primary" lay-filter="parents-table" title=""/></td>
|
||||
{if $category.id!=5}
|
||||
{if !in_array($category.id, [5, 37])}
|
||||
<td>封面</td>
|
||||
{/if}
|
||||
{if $category.id!=42}
|
||||
{if !in_array($category.id, [42, 37])}
|
||||
<td>手机封面</td>
|
||||
{/if}
|
||||
<td>标题</td>
|
||||
{switch $category.id}
|
||||
{case 37}<td>年份</td>{/case}
|
||||
{default /}<td>标题</td>
|
||||
{/switch}
|
||||
{if in_array($category.id, [37])}
|
||||
<td>月份</td>
|
||||
{/if}
|
||||
<!-- <td>点击量</td>-->
|
||||
<td>创建日期</td>
|
||||
<td>排序</td>
|
||||
|
@ -97,14 +106,14 @@ use app\model\Category as VCategory;
|
|||
{foreach name="list" item="item"}
|
||||
<tr class="select_box table-lv1" data-id="{$item.id}" data-category-id="{$category.id}" data-url="{:url('manager.article/sort', ['category_id'=>$category['id']])}">
|
||||
<td><input type="checkbox" name="checkbox" value="{$item.id}" lay-skin="primary" lay-filter="childrens-table"/></td>
|
||||
{if $category.id!=5}
|
||||
{if !in_array($category.id, [5, 37])}
|
||||
<td class="layer-photos">
|
||||
{if !empty($item['src']) && file_exists('.' . $item['src'])}
|
||||
<img src="{:CImage::getThumb($item.src, 50, 50)}" layer-src="{$item.src}" width="50" />
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
{if $category.id!=42}
|
||||
{if !in_array($category.id, [42, 37])}
|
||||
<td class="layer-photos">
|
||||
{if !empty($item['src_mobile']) && file_exists('.' . $item['src_mobile'])}
|
||||
<img src="{:CImage::getThumb($item.src_mobile, 50, 50)}" layer-src="{$item.src_mobile}" width="50" />
|
||||
|
@ -112,7 +121,10 @@ use app\model\Category as VCategory;
|
|||
</td>
|
||||
{/if}
|
||||
<td><a class="layui-btn layui-btn-title" data-state="edit" data-href="{:url('manager.article/edit',['id' => $item['id']])}" title="编辑">{$item.title}</a></td>
|
||||
<!-- <td>{$item.views}</td>-->
|
||||
{if in_array($category.id, [37])}
|
||||
<td>{$item.sub_title}</td>
|
||||
{/if}
|
||||
<!-- <td>{$item.views}</td>-->
|
||||
<td>{$item.create_time|date='Y-m-d'}</td>
|
||||
<td>{$item.sort}</td>
|
||||
{if !empty($attributeList)}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{php}
|
||||
use app\service\Image as WImage;
|
||||
{/php}
|
||||
<div class="upload-image-box">
|
||||
<div class="upload-image-box" xmlns="http://www.w3.org/1999/html">
|
||||
<input type="hidden" class="append-val" value="{$append}">
|
||||
<div id="upload_img_list{$append}" class="upload_img_list">
|
||||
{if !empty($imgs)}
|
||||
|
@ -26,7 +26,11 @@ use app\service\Image as WImage;
|
|||
</div>
|
||||
<div class="info">
|
||||
{foreach $fields as $name => $desc}
|
||||
{if $name == 'desc'}
|
||||
<textarea class="layui-textarea" name="img{$append}[{$k}][{$name}]" placeholder="{$desc}">{$img[$name] ?? ''}</textarea>
|
||||
{else}
|
||||
<input type="text" class="layui-input" name="img{$append}[{$k}][{$name}]" value="{$img[$name] ?? ''}" placeholder="{$desc}" />
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</dd>
|
||||
|
@ -149,7 +153,7 @@ use app\service\Image as WImage;
|
|||
if(data.data.length > 0){
|
||||
html += '<div class="layui-card-body"><div class="serverImgsList"><ul id="selectable">'
|
||||
$.each(data.data,function(i,item){
|
||||
html += '<li><img src="'+item.src+'" data-box="upload_img_list{$append}" data-append="{$append}" data-field="{:json_encode($fields)}" onclick="imgListUrl(this, ' + numid + ')"></li>'
|
||||
html += '<li><img src="'+item.src+'" data-box="upload_img_list{$append}" data-field="{:json_encode($fields)}" data-append="{$append}" onclick="imgListUrl(this, ' + numid + ')"></li>'
|
||||
})
|
||||
html += '</ul></div>';
|
||||
if(data.data.length >= 30){
|
||||
|
@ -187,11 +191,15 @@ use app\service\Image as WImage;
|
|||
});
|
||||
function imgListUrl(obj, numid){
|
||||
let append = $(obj).data('append');
|
||||
let fields = $(obj).data('fields');
|
||||
let fields = {:json_encode($fields, 256)};
|
||||
let fieldsHtml = '';
|
||||
$.each(fields, function (index, item) {
|
||||
fieldsHtml += `<input type="text" class="layui-input" name="img${append}[${numid}][${item.name}]" value="${item.name}" placeholder="${item.desc}" />`;
|
||||
})
|
||||
for (let key in fields) {
|
||||
if (key == 'desc') {
|
||||
fieldsHtml += `<textarea class="layui-textarea" name="img${append}[${numid}][${key}]" placeholder="${fields[key]}" ></textarea>`;
|
||||
} else {
|
||||
fieldsHtml += `<input type="text" class="layui-input" name="img${append}[${numid}][${key}]" value="" placeholder="${fields[key]}" />`;
|
||||
}
|
||||
}
|
||||
var imTpl = '<dd class="item_img" id="img_' + numid +'">'+
|
||||
'<div class="imgs"><div class="operate"><i onclick="UPLOAD_IMG_DEL(this)" class="close layui-icon"></i></div>'+
|
||||
'<img src="' + $(obj).attr('src') +'"></div>'+
|
||||
|
|
|
@ -4,6 +4,27 @@ use app\model\Article;
|
|||
use app\model\Category;
|
||||
$childrenMenu = Category::getChildrenByParentId(Category::CATEGORY_COMPANY);
|
||||
$items = Article::getList(Category::CATEGORY_COMPANY_EVENT, 1000);
|
||||
$items = $items->toArray();
|
||||
$items = $items['data'];
|
||||
$years = array_unique(array_column($items, 'title'));
|
||||
rsort($years);
|
||||
|
||||
$yearList = [];
|
||||
foreach ($items as $item) {
|
||||
foreach($years as $year) {
|
||||
if (!isset($yearList[$item['title']])) {
|
||||
$yearList[$item['title']] = [];
|
||||
}
|
||||
|
||||
if (!isset($yearList[$item['title']][$item['sub_title']])) {
|
||||
$yearList[$item['title']][$item['sub_title']] = [];
|
||||
}
|
||||
|
||||
$yearList[$item['title']][$item['sub_title']] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
//dd($yearList[2022]);exit;
|
||||
{/php}
|
||||
|
||||
{include file="public/about_second" /}
|
||||
|
@ -25,25 +46,27 @@ $items = Article::getList(Category::CATEGORY_COMPANY_EVENT, 1000);
|
|||
</div>
|
||||
<div class="history-swiper swiper">
|
||||
<div class="swiper-wrapper">
|
||||
{foreach $items as $item}
|
||||
<div class="swiper-slide flex">
|
||||
{foreach $yearList as $year => $months}
|
||||
<div class="swiper-slide1 flex">
|
||||
<div class="history-time">
|
||||
<p class="bg-col-blue color-white">{$item.title ?? ''}</p>
|
||||
<p class="bg-col-blue color-white">{$year ?? ''}</p>
|
||||
<span><em></em></span>
|
||||
</div>
|
||||
<div class="history-txt">
|
||||
{php}
|
||||
$list = nl2br($item['summary']);
|
||||
$list = explode('<br />', $list);
|
||||
{/php}
|
||||
|
||||
{foreach $list as $val}
|
||||
{php}
|
||||
$strExplode = explode(' ', $val, 2);
|
||||
$month = count($strExplode) > 1 ? $strExplode[0] : '';
|
||||
$content = count($strExplode) > 1 ? $strExplode[1] : $val;
|
||||
{/php}
|
||||
<p><strong>{$month}</strong><span>{$content}</span></p>
|
||||
{foreach $months as $month => $info}
|
||||
<p>
|
||||
<strong>{$month ?? ''}月</strong>
|
||||
<span>
|
||||
{php}
|
||||
$eventList = json_decode($info['imgs'], true);
|
||||
{/php}
|
||||
{foreach $eventList as $event}
|
||||
<span style="cursor: pointer" data-src="{$event.src ?? ''}" class="show-event-img">
|
||||
{$event.title ??''}
|
||||
</span><br>
|
||||
{/foreach}
|
||||
</span>
|
||||
</p>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -57,13 +80,25 @@ $items = Article::getList(Category::CATEGORY_COMPANY_EVENT, 1000);
|
|||
</div>
|
||||
</div>
|
||||
<div class="img">
|
||||
{foreach $items as $item}
|
||||
{if $isMobile}
|
||||
<span><img src="{$item.src_mobile ?? ''}" alt="{$item.title ?? ''}"></span>
|
||||
{else /}
|
||||
<span><img src="{$item.src ?? ''}" alt="{$item.title ?? ''}"></span>
|
||||
{foreach $yearList as $year => $months}
|
||||
{foreach $months as $month => $info}
|
||||
{php}
|
||||
$eventList = json_decode($info['imgs'], true);
|
||||
{/php}
|
||||
{foreach $eventList as $k => $event}
|
||||
{if ($k == 0) }
|
||||
<span><img id="event-img" src="{$event.src ?? ''}" alt="{$event.title ?? ''}"></span>
|
||||
{php}break;{/php}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('body').on('click', '.show-event-img',function () {
|
||||
let src = $(this).attr('data-src');
|
||||
$('#event-img').attr('src', src);
|
||||
})
|
||||
</script>
|
|
@ -1,7 +1,7 @@
|
|||
<div class="pull-banner w100 wap-show"><img src="{$categoryPath[0]['src_mobile'] ?: ''}" alt="{$categoryPath[0]['title'] ?? ''}"></div>
|
||||
|
||||
<!-- 当前位置&二级导航 -->
|
||||
<div class="position-nav-bg pull-margin bg-col-f5"><!-- position-nav-bg01 -->
|
||||
<div class="position-nav-bg pull-margin bg-col-f5 {if $category['parent_id'] == 8} position-nav-bg01 {/if}"><!-- position-nav-bg01 -->
|
||||
<div class="position-sub-nav w1360 flex">
|
||||
<!-- 当前位置 -->
|
||||
<div class="position flex pc-show">
|
||||
|
|
Loading…
Reference in New Issue