diff --git a/view/manager/article/add.html b/view/manager/article/add.html index 0f42bc6..d559f00 100755 --- a/view/manager/article/add.html +++ b/view/manager/article/add.html @@ -45,14 +45,27 @@ --> {if !(in_array($category['id'],[4,5,7,9,10]))}
- + {php} + $subtitle = '副标题'; + $titleNotice = ''; + $titleValue = ''; + switch ($category['id']) { + case 37: + $subtitle = '月份'; + $titleValue = 1; + $titleNotice = '月份必填 不填则默认为1月'; + break; + } + {/php} +
- + +
{$titleNotice}
{/if} - {if !(in_array($category['id'],[5]))} + {if !(in_array($category['id'],[5,37]))}
@@ -61,7 +74,7 @@
{/if} - {if !(in_array($category['id'],[5,42]))} + {if !(in_array($category['id'],[5,37,42]))}
@@ -78,14 +91,27 @@
- {if in_array($category['id'], [39,9,10,23,24,25])} + {if in_array($category['id'], [39,9,10,23,24,25,37])}
- + {php} + $imgName = 'PC组图'; + $pcImgSize = ''; + + switch ($category['id']) { + case 37: + $imgName = '大事记'; + $pcImgSize = '645*385'; + break; + } + {/php} +
{:widget('manager.upload/multi',['append' => '_imgs','imgs' => $item.imgs??'', 'num' => $item.num??10, 'imgSize' => $pcImgSize, $item['id']??''])}
+ {/if} + {if in_array($category['id'], [39,9,10,23,24,25])}
@@ -94,7 +120,7 @@
{/if} - {if in_array($category['id'], [24])} + {if in_array($category['id'], [9,10,23,24,42])}
@@ -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]))}
- {if $category['id'] == 37} - - {elseif $category['id'] == 38} + {if $category['id'] == 38} {else /} {/if}
- -
注:建议200字以内{if $category['id'] == 37} 大事记月份后需使用空格分割 如:1月 - 中正物业正式入驻鑫苑小区、光明A区、巴音孟克商业综合体办公楼。{/if}
+ +
注:建议200字以内
diff --git a/view/manager/article/edit.html b/view/manager/article/edit.html index f943405..703d544 100755 --- a/view/manager/article/edit.html +++ b/view/manager/article/edit.html @@ -5,10 +5,19 @@
- + {php} + $title = '标题'; + $titleNotice = '注:建议60个字符长度以内'; + switch ($category['id']) { + case 37: + $title = '年份'; + break; + } + {/php} +
-
注:建议60个字符长度以内
+
{$titleNotice}
@@ -49,14 +58,27 @@ --> {if !(in_array($category['id'],[4,5,7]))}
- + {php} + $subtitle = '副标题'; + $titleNotice = ''; + $titleValue = $item['sub_title']; + switch ($category['id']) { + case 37: + $subtitle = '月份'; + $titleNotice = '月份必填 不填则默认为1月'; + $titleValue = $item['sub_title'] ?: 1; + break; + } + {/php} +
- + +
{$titleNotice}
{/if} - {if !(in_array($category['id'],[5]))} + {if !(in_array($category['id'],[5,37]))}
@@ -72,7 +94,7 @@
{/if} - {if !(in_array($category['id'],[5,42]))} + {if !(in_array($category['id'],[5,37,42]))}
@@ -89,14 +111,28 @@
- {if in_array($category['id'], [39,9,10,23,24,25])} + {if in_array($category['id'], [39,9,10,23,24,25,37])}
- + {php} + $imgName = 'PC组图'; + $pcImgSize = ''; + + switch ($category['id']) { + case 37: + $imgName = '大事记'; + $pcImgSize = '645*385'; + break; + } + {/php} + +
{:widget('manager.upload/multi',['append' => '_imgs', 'imgs' => $item.imgs??'', 'num' => $item.num??10, 'imgSize' => $pcImgSize, $item['id']??''])}
+ {/if} + {if in_array($category['id'], [39,9,10,23,24,25])}
@@ -105,7 +141,7 @@
{/if} - {if in_array($category['id'], [24])} + {if in_array($category['id'], [9,10,23,24,42])}
diff --git a/view/manager/content/article.html b/view/manager/content/article.html index b8fc973..abff175 100755 --- a/view/manager/content/article.html +++ b/view/manager/content/article.html @@ -56,14 +56,17 @@ use app\model\Category as VCategory; - {if $category.id!=5} + {if !in_array($category.id, [5, 37])} {/if} - {if $category.id!=42} + {if !in_array($category.id, [42, 37])} {/if} + {if in_array($category.id, [37])} + + {/if} {if !empty($attributeList)} @@ -75,13 +78,19 @@ use app\model\Category as VCategory; - {if $category.id!=5} + {if !in_array($category.id, [5, 37])} {/if} - {if $category.id!=42} + {if !in_array($category.id, [42, 37])} {/if} - + {switch $category.id} + {case 37}{/case} + {default /} + {/switch} + {if in_array($category.id, [37])} + + {/if} @@ -97,14 +106,14 @@ use app\model\Category as VCategory; {foreach name="list" item="item"} - {if $category.id!=5} + {if !in_array($category.id, [5, 37])} {/if} - {if $category.id!=42} + {if !in_array($category.id, [42, 37])} {/if} - + {if in_array($category.id, [37])} + + {/if} + {if !empty($attributeList)} diff --git a/view/manager/widget/multi.html b/view/manager/widget/multi.html index e1975a1..a17fec5 100755 --- a/view/manager/widget/multi.html +++ b/view/manager/widget/multi.html @@ -1,7 +1,7 @@ {php} use app\service\Image as WImage; {/php} -
+
{if !empty($imgs)} @@ -26,7 +26,11 @@ use app\service\Image as WImage;
{foreach $fields as $name => $desc} + {if $name == 'desc'} + + {else} + {/if} {/foreach}
@@ -149,7 +153,7 @@ use app\service\Image as WImage; if(data.data.length > 0){ html += '
    ' $.each(data.data,function(i,item){ - html += '
  • ' + html += '
  • ' }) html += '
'; 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 += ``; - }) + for (let key in fields) { + if (key == 'desc') { + fieldsHtml += ``; + } else { + fieldsHtml += ``; + } + } var imTpl = '
'+ '
'+ '
'+ diff --git a/view/page/history.html b/view/page/history.html index 6ec5180..81da8d9 100755 --- a/view/page/history.html +++ b/view/page/history.html @@ -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);
- {foreach $items as $item} -
+ {foreach $yearList as $year => $months} +
-

{$item.title ?? ''}

+

{$year ?? ''}

- {php} - $list = nl2br($item['summary']); - $list = explode('
', $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} -

{$month}{$content}

+ {foreach $months as $month => $info} +

+ {$month ?? ''}月 + + {php} + $eventList = json_decode($info['imgs'], true); + {/php} + {foreach $eventList as $event} + + {$event.title ??''} +
+ {/foreach} +
+

{/foreach}
@@ -57,13 +80,25 @@ $items = Article::getList(Category::CATEGORY_COMPANY_EVENT, 1000);
- {foreach $items as $item} - {if $isMobile} - {$item.title ?? ''} - {else /} - {$item.title ?? ''} + {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) } + {$event.title ?? ''} + {php}break;{/php} {/if} {/foreach} + {/foreach} + {/foreach}
-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/view/public/about_second.html b/view/public/about_second.html index f810e04..1076134 100644 --- a/view/public/about_second.html +++ b/view/public/about_second.html @@ -1,7 +1,7 @@
{$categoryPath[0]['title'] ?? ''}
-
+
封面手机封面标题年份标题月份 创建日期 排序
{if !empty($item['src']) && file_exists('.' . $item['src'])} {/if} {if !empty($item['src_mobile']) && file_exists('.' . $item['src_mobile'])} @@ -112,7 +121,10 @@ use app\model\Category as VCategory; {$item.title}{$item.sub_title} {$item.create_time|date='Y-m-d'} {$item.sort}