From c29d6ebfa8d51104e583b99f71afe99583800340 Mon Sep 17 00:00:00 2001 From: toogee Date: Sat, 16 May 2020 18:07:23 +0800 Subject: [PATCH] view index --- app/index/controller/Index.php | 4 +- view/taoler/index/index/index.html | 192 +++++------------- view/taoler/index/public/filter.html | 8 +- view/taoler/index/public/index-forumlist.html | 33 +++ view/taoler/index/public/index-slider.html | 11 + view/taoler/index/public/index-static.html | 23 +++ view/taoler/index/public/index-topforum.html | 30 +++ 7 files changed, 151 insertions(+), 150 deletions(-) create mode 100644 view/taoler/index/public/index-forumlist.html create mode 100644 view/taoler/index/public/index-slider.html create mode 100644 view/taoler/index/public/index-static.html create mode 100644 view/taoler/index/public/index-topforum.html diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 46e0c30..f6558db 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -26,7 +26,7 @@ class Index extends BaseController //置顶文章 $artTop = Cache::get('arttop'); if(!$artTop){ - $artTop = Article::field('id,title,title_color,cate_id,user_id,create_time,is_top,jie')->where(['is_top'=>1,'status'=>1,'delete_time'=>0])->with([ + $artTop = Article::field('id,title,title_color,cate_id,user_id,create_time,is_top,jie,pv')->where(['is_top'=>1,'status'=>1,'delete_time'=>0])->with([ 'cate' => function($query){ $query->where('delete_time',0)->field('id,catename'); }, @@ -40,7 +40,7 @@ class Index extends BaseController //首页文章显示20条 $artList = Cache::get('artlist'); if(!$artList){ - $artList = Article::field('id,title,title_color,cate_id,user_id,create_time,is_hot,jie')->with([ + $artList = Article::field('id,title,title_color,cate_id,user_id,create_time,is_hot,jie,pv')->with([ 'cate' => function($query){ $query->where('delete_time',0)->field('id,catename'); }, diff --git a/view/taoler/index/index/index.html b/view/taoler/index/index/index.html index 351750e..9d744ff 100644 --- a/view/taoler/index/index/index.html +++ b/view/taoler/index/index/index.html @@ -10,146 +10,55 @@
- -
-
- -
-
- -
- - -
- -
- {include file="public/filter" /} - -
- -
- -
+ +
+ {include file="public/index-slider" /} +
+ +
+ +
    + {volist name="artTop" id="top" empty="还没有推荐"} + {include file="public/index-topforum" /} + {/volist} +
+
+ +
+ {include file="public/filter" /} +
    + {volist name="artList" id="art" empty="还没有帖子"} + {include file="public/index-forumlist" /} + {/volist} +
+
+ +
+
-
-

温馨通道

- -
+ +
+

温馨通道

+ {include file="public/index-static" /} +
{include file="public/sign" /} -
-
钻级赞助商 - 我要加入 -
-
- {volist name="ad_index" id="vo"} - {$vo.slid_name} - {/volist} -
-
+ +
+
钻级赞助商 + 我要加入 +
+
+ {volist name="ad_index" id="vo"} + {$vo.slid_name} + {/volist} +
+

回贴周榜

@@ -166,11 +75,6 @@ {$vo.comments_count} {/volist} - - -
@@ -186,8 +90,8 @@ {/volist}
- -{include file="public/flink" /} + + {include file="public/flink" /}
diff --git a/view/taoler/index/public/filter.html b/view/taoler/index/public/filter.html index fa07204..3fc9911 100644 --- a/view/taoler/index/public/filter.html +++ b/view/taoler/index/public/filter.html @@ -1,11 +1,11 @@
- 综合 + 综合 已结 - 热帖 - - 精华 + 热帖 + + 精贴 diff --git a/view/taoler/index/public/index-forumlist.html b/view/taoler/index/public/index-forumlist.html new file mode 100644 index 0000000..ef8fb3e --- /dev/null +++ b/view/taoler/index/public/index-forumlist.html @@ -0,0 +1,33 @@ +
  • + + {$art.user.name} + +

    + {$art.cate.catename} + {$art.title} +

    +
    + + {:getAsing($art.user.area_id) ?: '无'} + {$art.user.nickname ?: $art.user.name} + + {if($art.user.vip > 0)} + VIP{$art.user.vip} + {/if} + + {$art.create_time|date='Y-m-d'} + + {$art.pv} + {if ($art.jie == 1)}已结{/if} + + + {$art.comments_count} + +
    +
    + {if ($art.is_top == 1)} 置顶 {/if} + {if ($art.is_hot == 1)} 精帖 {/if} +
    +
  • \ No newline at end of file diff --git a/view/taoler/index/public/index-slider.html b/view/taoler/index/public/index-slider.html new file mode 100644 index 0000000..3e925ce --- /dev/null +++ b/view/taoler/index/public/index-slider.html @@ -0,0 +1,11 @@ +
    + +
    \ No newline at end of file diff --git a/view/taoler/index/public/index-static.html b/view/taoler/index/public/index-static.html new file mode 100644 index 0000000..eaa493c --- /dev/null +++ b/view/taoler/index/public/index-static.html @@ -0,0 +1,23 @@ + + diff --git a/view/taoler/index/public/index-topforum.html b/view/taoler/index/public/index-topforum.html new file mode 100644 index 0000000..f0542ca --- /dev/null +++ b/view/taoler/index/public/index-topforum.html @@ -0,0 +1,30 @@ +
  • + + {$top.user.name} + +

    + {$top.cate.catename} + {$top.title} +

    +
    + + {:getAsing($top.user.area_id) ?: '无'} + {$top.user.nickname ?: $top.user.name} + + {if($top.user.vip > 0)} + VIP{$top.user.vip} + {/if} + + {$top.create_time|date='Y-m-d'} + + {$top.pv} + {if ($top.jie == 1)}已结{/if} + + {$top.comments_count} + +
    +
    + {if ($top.is_top == 1)} 置顶 {/if} + {if ($top.is_hot == 1)} 精帖 {/if} +
    +
  • \ No newline at end of file