正在显示
7 个修改的文件
包含
96 行增加
和
87 行删除
@@ -105,7 +105,7 @@ class RegionController extends HomeBaseController | @@ -105,7 +105,7 @@ class RegionController extends HomeBaseController | ||
105 | } | 105 | } |
106 | 106 | ||
107 | //根据子类获取文章分页 | 107 | //根据子类获取文章分页 |
108 | - public function getChildArticlePage($position,$field,$page,$limit=''){ | 108 | + public function getChildArticlePage($position,$field,$limit=''){ |
109 | $pre = CityCategoryModel::pre; | 109 | $pre = CityCategoryModel::pre; |
110 | $limit = empty($limit)?$this->more_limit:$limit; | 110 | $limit = empty($limit)?$this->more_limit:$limit; |
111 | $post_id = Db::table($pre.'portal_category_post') | 111 | $post_id = Db::table($pre.'portal_category_post') |
@@ -120,7 +120,7 @@ class RegionController extends HomeBaseController | @@ -120,7 +120,7 @@ class RegionController extends HomeBaseController | ||
120 | ->where('delete_time', 0) | 120 | ->where('delete_time', 0) |
121 | ->field($field) | 121 | ->field($field) |
122 | ->order('weigh desc') | 122 | ->order('weigh desc') |
123 | - ->paginate(1); | 123 | + ->paginate($limit); |
124 | $arr['data'] = $res->toArray(); | 124 | $arr['data'] = $res->toArray(); |
125 | $arr['page'] = $res->render(); | 125 | $arr['page'] = $res->render(); |
126 | return $arr; | 126 | return $arr; |
@@ -154,10 +154,9 @@ class RegionController extends HomeBaseController | @@ -154,10 +154,9 @@ class RegionController extends HomeBaseController | ||
154 | 154 | ||
155 | //明星访谈更多 | 155 | //明星访谈更多 |
156 | public function getMoreStar(){ | 156 | public function getMoreStar(){ |
157 | - $page = $this->request->param('page',1,'intval'); | ||
158 | $position['category_id'] = CityCategoryModel::mxft; | 157 | $position['category_id'] = CityCategoryModel::mxft; |
159 | $field = 'id,thumbnail avatar,full_name,position,trade,post_excerpt'; | 158 | $field = 'id,thumbnail avatar,full_name,position,trade,post_excerpt'; |
160 | - $res = $this->getChildArticlePage($position,$field,$page,5); | 159 | + $res = $this->getChildArticlePage($position,$field,5); |
161 | $this->assign('res',$res['data']); | 160 | $this->assign('res',$res['data']); |
162 | $this->assign('page',$res['page']); | 161 | $this->assign('page',$res['page']); |
163 | return $this->fetch(); | 162 | return $this->fetch(); |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <!-- 首页主体内容 --> | 27 | <!-- 首页主体内容 --> |
28 | <div id="star_main"> | 28 | <div id="star_main"> |
29 | <!-- 星球奇境 --> | 29 | <!-- 星球奇境 --> |
30 | - <div class="star_happy"> | 30 | + <div class="star_happy" id="star"> |
31 | <div> | 31 | <div> |
32 | <span class="happy_title clearfix"> | 32 | <span class="happy_title clearfix"> |
33 | <p>星球<i>奇境</i></p> | 33 | <p>星球<i>奇境</i></p> |
@@ -32,75 +32,82 @@ | @@ -32,75 +32,82 @@ | ||
32 | <!--</div>--> | 32 | <!--</div>--> |
33 | </div> | 33 | </div> |
34 | <!-- 内容--1 --> | 34 | <!-- 内容--1 --> |
35 | - <div class="show_INMain_con clearfix"> | ||
36 | - <img class="show_INMain_con1" src="__TMPL__/public/assets/starImg/aicon_31.png" alt=""> | ||
37 | - <div class="show_INMain_con2 clearfix"> | ||
38 | - <img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> | ||
39 | - <h2>胡歌</h2> | ||
40 | - <h3>著名国际巨星 慈善家</h3> | ||
41 | - <p>那年孩子们都上大学了,我孑然一身,几个老弟兄说出国走走看看,一个老嫂子会点外语,于是我们就自由行到了欧洲,法国,德国,意大利,几个国家转了一圈,外国的天气,气候真是清新,不去的时候不想,但是身临其境的时候就会感受到巨大的差异。巴黎车水马龙,意大利热情奔放,</p> | 35 | + <notempty name="res['data'][0]"> |
36 | + <div class="show_INMain_con clearfix"> | ||
37 | + <img class="show_INMain_con1" src="{:cmf_get_image_url($res['data'][0]['avatar'])}" alt=""> | ||
38 | + <div class="show_INMain_con2 clearfix"> | ||
39 | + <img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> | ||
40 | + <h2>{$res['data'][0]['full_name']}</h2> | ||
41 | + <h3>{$res['data'][0]['position']} {$res['data'][0]['trade']}</h3> | ||
42 | + <p>{$res['data'][0]['post_excerpt']}</p> | ||
43 | + </div> | ||
42 | </div> | 44 | </div> |
43 | - </div> | 45 | + <!--<else/>--> |
46 | + <!--<div class="show_INMain_con clearfix">--> | ||
47 | + <!--<img class="show_INMain_con1" src="__TMPL__/public/assets/starImg/aicon_31.png" alt="">--> | ||
48 | + <!--<div class="show_INMain_con2 clearfix">--> | ||
49 | + <!--<img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt="">--> | ||
50 | + <!--<h2>胡歌</h2>--> | ||
51 | + <!--<h3>著名国际巨星 慈善家</h3>--> | ||
52 | + <!--<p>那年孩子们都上大学了,我孑然一身,几个老弟兄说出国走走看看,一个老嫂子会点外语,于是我们就自由行到了欧洲,法国,德国,意大利,几个国家转了一圈,外国的天气,气候真是清新,不去的时候不想,但是身临其境的时候就会感受到巨大的差异。巴黎车水马龙,意大利热情奔放,</p>--> | ||
53 | + <!--</div>--> | ||
54 | + <!--</div>--> | ||
55 | + </notempty> | ||
44 | <!-- 内容--2 --> | 56 | <!-- 内容--2 --> |
45 | <div class="show_3_list"> | 57 | <div class="show_3_list"> |
46 | <ul class="clearfix"> | 58 | <ul class="clearfix"> |
47 | - <li> | ||
48 | - <img src="__TMPL__/public/assets/starImg/bicon_24.png" alt=""> | ||
49 | - <div class="show_3_list_txt"> | ||
50 | - <h1>斯嘉丽·约翰逊</h1> | ||
51 | - <h2>著名国际巨星 慈善家</h2> | ||
52 | - <p> | ||
53 | - | ||
54 | - 这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。 | ||
55 | - | ||
56 | - </p> | ||
57 | - </div> | ||
58 | - </li> | ||
59 | - <li> | ||
60 | - <img src="__TMPL__/public/assets/starImg/bicon_24.png" alt=""> | ||
61 | - <div class="show_3_list_txt"> | ||
62 | - <h1>斯嘉丽·约翰逊</h1> | ||
63 | - <h2>著名国际巨星 慈善家</h2> | ||
64 | - <p> | ||
65 | - | ||
66 | - 这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。 | ||
67 | - | ||
68 | - </p> | ||
69 | - </div> | ||
70 | - </li> | ||
71 | - <li> | ||
72 | - <img src="__TMPL__/public/assets/starImg/bicon_24.png" alt=""> | ||
73 | - <div class="show_3_list_txt"> | ||
74 | - <h1>斯嘉丽·约翰逊</h1> | ||
75 | - <h2>著名国际巨星 慈善家</h2> | ||
76 | - <p> | ||
77 | - | ||
78 | - 这两位的婚礼这几天在微博上是大有刷屏之势,新娘新郎就算了,连参加婚礼的宾客们都轮番换着上热搜,那叫一个热闹。其实除了刘诗诗吴奇隆,之前杨幂和刘恺威的婚礼也是选在了巴厘岛。地处印度尼西亚的巴厘岛是著名的旅游海岛,岛上热带风情浓郁,风景绮丽无比,这里的细阔沙滩. 魂牵梦绕。 | ||
79 | - | ||
80 | - </p> | ||
81 | - </div> | ||
82 | - </li> | 59 | + <notempty name="res['data'][1]"> |
60 | + <li> | ||
61 | + <img src="{:cmf_get_image_url($res['data'][1]['avatar'])}" alt=""> | ||
62 | + <div class="show_3_list_txt"> | ||
63 | + <h1>{$res['data'][1]['full_name']}</h1> | ||
64 | + <h2>{$res['data'][1]['position']} {$res['data'][1]['trade']}</h2> | ||
65 | + <p> | ||
66 | + {$res['data'][1]['post_excerpt']} | ||
67 | + </p> | ||
68 | + </div> | ||
69 | + </li> | ||
70 | + </notempty> | ||
71 | + <notempty name="res['data'][2]"> | ||
72 | + <li> | ||
73 | + <img src="{:cmf_get_image_url($res['data'][2]['avatar'])}" alt=""> | ||
74 | + <div class="show_3_list_txt"> | ||
75 | + <h1>{$res['data'][2]['full_name']}</h1> | ||
76 | + <h2>{$res['data'][2]['position']} {$res['data'][2]['trade']}</h2> | ||
77 | + <p> | ||
78 | + {$res['data'][2]['post_excerpt']} | ||
79 | + </p> | ||
80 | + </div> | ||
81 | + </li> | ||
82 | + </notempty> | ||
83 | + <notempty name="res['data'][3]"> | ||
84 | + <li> | ||
85 | + <img src="{:cmf_get_image_url($res['data'][3]['avatar'])}" alt=""> | ||
86 | + <div class="show_3_list_txt"> | ||
87 | + <h1>{$res['data'][3]['full_name']}</h1> | ||
88 | + <h2>{$res['data'][3]['position']} {$res['data'][3]['trade']}</h2> | ||
89 | + <p> | ||
90 | + {$res['data'][3]['post_excerpt']} | ||
91 | + </p> | ||
92 | + </div> | ||
93 | + </li> | ||
94 | + </notempty> | ||
83 | </ul> | 95 | </ul> |
84 | </div> | 96 | </div> |
85 | <!-- 内容--3 --> | 97 | <!-- 内容--3 --> |
86 | - <div class="show_INMain_con show_3_con3 clearfix"> | ||
87 | - <img class="show_INMain_con1" src="__TMPL__/public/assets/starImg/aicon_31.png" alt=""> | ||
88 | - <div class="show_INMain_con2 clearfix"> | ||
89 | - <img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> | ||
90 | - <h2>林允儿</h2> | ||
91 | - <h3>著名国际巨星 慈善家</h3> | ||
92 | - <p>那年孩子们都上大学了,我孑然一身,几个老弟兄说出国走走看看,一个老嫂子会点外语,于是我们就自由行到了欧洲,法国,德国,意大利,几个国家转了一圈,外国的天气,气候真是清新,不去的时候不想,但是身临其境的时候就会感受到巨大的差异。巴黎车水马龙,意大利热情奔放,</p> | 98 | + <notempty name="res['data'][4]"> |
99 | + <div class="show_INMain_con show_3_con3 clearfix"> | ||
100 | + <img class="show_INMain_con1" src="{:cmf_get_image_url($res['data'][4]['avatar'])}" alt=""> | ||
101 | + <div class="show_INMain_con2 clearfix"> | ||
102 | + <img class="show_INMain_con3" src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> | ||
103 | + <h2>{$res['data'][4]['full_name']}</h2> | ||
104 | + <h3>{$res['data'][4]['position']} {$res['data'][4]['trade']}</h3> | ||
105 | + <p> | ||
106 | + {$res['data'][4]['post_excerpt']} | ||
107 | + </p> | ||
108 | + </div> | ||
93 | </div> | 109 | </div> |
94 | - </div> | ||
95 | - | ||
96 | - <!-- 底部翻页 --> | ||
97 | - <!-- <div class="show_3_nextPage clearfix"> | ||
98 | - <span> < </span> | ||
99 | - <p>1</p> | ||
100 | - <p>2</p> | ||
101 | - <p>3</p> | ||
102 | - <span> > </span> | ||
103 | - </div> --> | 110 | + </notempty> |
104 | 111 | ||
105 | <!--分页--> | 112 | <!--分页--> |
106 | <div class="pagination"> | 113 | <div class="pagination"> |
@@ -77,6 +77,11 @@ | @@ -77,6 +77,11 @@ | ||
77 | .home_nav_down2 dl dd:hover { | 77 | .home_nav_down2 dl dd:hover { |
78 | background: rgba(58, 255, 165, 1); | 78 | background: rgba(58, 255, 165, 1); |
79 | } | 79 | } |
80 | +.home_nav_down2 dl dd a:hover { | ||
81 | + background: rgba(58, 255, 165, 1); | ||
82 | + color: #2d374b; | ||
83 | + text-decoration: none; | ||
84 | +} | ||
80 | 85 | ||
81 | .home_nav_down2 dl dd { | 86 | .home_nav_down2 dl dd { |
82 | overflow: hidden; | 87 | overflow: hidden; |
@@ -101,10 +106,16 @@ | @@ -101,10 +106,16 @@ | ||
101 | color: rgba(9, 255, 142, 1); | 106 | color: rgba(9, 255, 142, 1); |
102 | border-top: 4px solid rgba(9, 255, 142, 1); | 107 | border-top: 4px solid rgba(9, 255, 142, 1); |
103 | } | 108 | } |
109 | +.home_nav_act a:hover{ | ||
110 | + color: rgba(9, 255, 142, 1); | ||
111 | + border-top: 4px solid rgba(9, 255, 142, 1); | ||
112 | + text-decoration: none; | ||
113 | +} | ||
104 | 114 | ||
105 | .home_nav .home_nav_act_A:hover { | 115 | .home_nav .home_nav_act_A:hover { |
106 | color: rgba(9, 255, 142, 1); | 116 | color: rgba(9, 255, 142, 1); |
107 | border-top: 4px solid rgba(9, 255, 142, 1); | 117 | border-top: 4px solid rgba(9, 255, 142, 1); |
118 | + text-decoration : none; | ||
108 | } | 119 | } |
109 | 120 | ||
110 | 121 |
@@ -10,6 +10,9 @@ | @@ -10,6 +10,9 @@ | ||
10 | <li class="home_nav_act"> | 10 | <li class="home_nav_act"> |
11 | <a class="home_nav_act" href="/">首页</a> | 11 | <a class="home_nav_act" href="/">首页</a> |
12 | </li> | 12 | </li> |
13 | + <li class="slide_vo"> | ||
14 | + <a class="home_nav_act_A" href="/#star">星球奇境</a> | ||
15 | + </li> | ||
13 | <volist name="slide" id="vo"> | 16 | <volist name="slide" id="vo"> |
14 | <li class="slide_vo"> | 17 | <li class="slide_vo"> |
15 | <a class="home_nav_act_A" href="{$vo.url}">{$vo.name}</a> | 18 | <a class="home_nav_act_A" href="{$vo.url}">{$vo.name}</a> |
@@ -17,29 +20,16 @@ | @@ -17,29 +20,16 @@ | ||
17 | <div class="home_nav_down2"> | 20 | <div class="home_nav_down2"> |
18 | <img src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> | 21 | <img src="__TMPL__/public/assets/starImg/aicon_32.png" alt=""> |
19 | <dl> | 22 | <dl> |
20 | - <volist name="vo.child" id="voo"> | ||
21 | - <dd><a href="{$voo.url}">{$voo.name}</a></dd> | ||
22 | - </volist> | 23 | + <notempty name="vo.child"> |
24 | + <volist name="vo.child" id="voo"> | ||
25 | + <dd><a href="{$voo.url}">{$voo.name}</a></dd> | ||
26 | + </volist> | ||
27 | + </notempty> | ||
23 | </dl> | 28 | </dl> |
24 | </div> | 29 | </div> |
25 | </div> | 30 | </div> |
26 | </li> | 31 | </li> |
27 | </volist> | 32 | </volist> |
28 | - <!--<li>--> | ||
29 | - <!--<a href="">星球奇境</a>--> | ||
30 | - <!--<!– 下拉导航 –>--> | ||
31 | - <!--<div class="home_nav_down">--> | ||
32 | - <!--<div class="home_nav_down2">--> | ||
33 | - <!--<img src="__TMPL__/public/assets/starImg/aicon_32.png" alt="">--> | ||
34 | - <!--<dl>--> | ||
35 | - <!--<dd><a href="">地标1</a></dd>--> | ||
36 | - <!--<dd><a href="">地标1</a></dd>--> | ||
37 | - <!--<dd><a href="">地标1</a></dd>--> | ||
38 | - <!--<dd><a href="">地标1</a></dd>--> | ||
39 | - <!--</dl>--> | ||
40 | - <!--</div>--> | ||
41 | - <!--</div>--> | ||
42 | - <!--</li>--> | ||
43 | </ul> | 33 | </ul> |
44 | </section> | 34 | </section> |
45 | <!-- 搜索框 --> | 35 | <!-- 搜索框 --> |
@@ -307,7 +307,7 @@ hello; | @@ -307,7 +307,7 @@ hello; | ||
307 | //获取导航栏相关内容 | 307 | //获取导航栏相关内容 |
308 | public function getHeader(){ | 308 | public function getHeader(){ |
309 | $parent = Db::name('portal_category') | 309 | $parent = Db::name('portal_category') |
310 | - ->whereIn('id',[1,2,3,4,5]) | 310 | + ->whereIn('id',[2,3,4,5]) |
311 | ->field('id,name,description url') | 311 | ->field('id,name,description url') |
312 | ->select() | 312 | ->select() |
313 | ->toArray(); | 313 | ->toArray(); |
@@ -318,8 +318,8 @@ hello; | @@ -318,8 +318,8 @@ hello; | ||
318 | ->toArray(); | 318 | ->toArray(); |
319 | $arr = []; | 319 | $arr = []; |
320 | foreach($parent as &$p_value){ | 320 | foreach($parent as &$p_value){ |
321 | - foreach($child as $c_key=>$c_value){ | ||
322 | - if($p_value['id'] == $c_value['parent_id']){ | 321 | + foreach ($child as $c_key => $c_value) { |
322 | + if ($p_value['id'] == $c_value['parent_id']) { | ||
323 | $p_value['child'][] = $c_value; | 323 | $p_value['child'][] = $c_value; |
324 | } | 324 | } |
325 | } | 325 | } |
-
请 注册 或 登录 后发表评论