Showing
8 changed files
with
123 additions
and
98 deletions
@@ -666,7 +666,7 @@ define('yohood', function(require, exports) { | @@ -666,7 +666,7 @@ define('yohood', function(require, exports) { | ||
666 | $.each(data.data.lastNews, function(i, v) { | 666 | $.each(data.data.lastNews, function(i, v) { |
667 | isTitleStyle = (v.main_title_type == 1) ? 1 : 0; | 667 | isTitleStyle = (v.main_title_type == 1) ? 1 : 0; |
668 | lastNews += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'), | 668 | lastNews += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'), |
669 | - '/news/detail/id/' + v.id, 2, isTitleStyle, v.title, ''); | 669 | + '/news/detail/id/' + v.id, isVideo, isTitleStyle, v.title, ''); |
670 | }); | 670 | }); |
671 | $(".post-list").html(recom); | 671 | $(".post-list").html(recom); |
672 | $(".side-related-list").eq(0).html(hotVideo); | 672 | $(".side-related-list").eq(0).html(hotVideo); |
@@ -7,7 +7,7 @@ class Controller_Brand extends Controller_Abstract | @@ -7,7 +7,7 @@ class Controller_Brand extends Controller_Abstract | ||
7 | 7 | ||
8 | public function indexAction() | 8 | public function indexAction() |
9 | { | 9 | { |
10 | - $banners = Facade_Index::getIndex(3); | 10 | + $banners = Facade_Index::getIndex(1); |
11 | $this->_view['banners'] = $banners; | 11 | $this->_view['banners'] = $banners; |
12 | $this->_view['brandTotal'] = Facade_Brand::getBrandTotal(1); | 12 | $this->_view['brandTotal'] = Facade_Brand::getBrandTotal(1); |
13 | } | 13 | } |
@@ -149,11 +149,10 @@ | @@ -149,11 +149,10 @@ | ||
149 | </ul> | 149 | </ul> |
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | - <div class="bd clearfix"> | ||
153 | - <div class="wrapper"> | 152 | + <div class="bd"> |
153 | + | ||
154 | <?php $this->_block('main'); | 154 | <?php $this->_block('main'); |
155 | $this->_endblock();?> | 155 | $this->_endblock();?> |
156 | - </div> | ||
157 | </div> | 156 | </div> |
158 | <div class="return-top" style="display:none;"> | 157 | <div class="return-top" style="display:none;"> |
159 | <a href="javascript:void(0);" id="toTop" class="ifont" style="display: inline;"> | 158 | <a href="javascript:void(0);" id="toTop" class="ifont" style="display: inline;"> |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | </ul> | 38 | </ul> |
39 | </div> | 39 | </div> |
40 | <?php else: //不存在,显示coming soon?> | 40 | <?php else: //不存在,显示coming soon?> |
41 | - <img src="<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>" style="width:100%;"/> | 41 | + <img src="<?php echo SITE_RES.'/images/yohood/comingsoon.jpg';?>" style="width:100%;"/> |
42 | <?php endif;?> | 42 | <?php endif;?> |
43 | </div> | 43 | </div> |
44 | <div id="brand_detail"> | 44 | <div id="brand_detail"> |
@@ -51,5 +51,8 @@ | @@ -51,5 +51,8 @@ | ||
51 | seajs.use('yohood',function(yohood){ | 51 | seajs.use('yohood',function(yohood){ |
52 | yohood.brand(); | 52 | yohood.brand(); |
53 | }) | 53 | }) |
54 | + seajs.use('yohood',function(yohood){ | ||
55 | + yohood.index(); | ||
56 | + }) | ||
54 | </script> | 57 | </script> |
55 | <?php $this->_endblock();?> | 58 | <?php $this->_endblock();?> |
@@ -37,4 +37,21 @@ | @@ -37,4 +37,21 @@ | ||
37 | <p>Email:haizheng.zhao@yoho.cn</p> | 37 | <p>Email:haizheng.zhao@yoho.cn</p> |
38 | </div> | 38 | </div> |
39 | </div> | 39 | </div> |
40 | + <!-- 公众号信息 start --> | ||
41 | + <div class="info-list public-number-info"> | ||
42 | + <h1 class="info-title public-number-title">在这可以找到我们</h1> | ||
43 | + <div class="info-section public-number-section"> | ||
44 | + <h2>新浪微博</h2> | ||
45 | + <p>@YOHO有货</p> | ||
46 | + </div> | ||
47 | + <div class="info-section public-number-section"> | ||
48 | + <h2>微信公众平台</h2> | ||
49 | + <p>"yohobuy4008899646"</p> | ||
50 | + </div> | ||
51 | + <div class="info-section public-number-section"> | ||
52 | + <h2>或者扫描下面的二维码</h2> | ||
53 | + <img src="http://cmsimg01.qiniudn.com/contentimg/2015/05/04/10/014aba20f78c3417e86b1b83b894a13f53.jpg" src="http://cmsimg01.qiniudn.com/contentimg/2015/05/04/10/014aba20f78c3417e86b1b83b894a13f53.jpg" alt="微信公众号二维码"> | ||
54 | + </div> | ||
55 | + </div> | ||
56 | + <!-- 公众号信息 end --> | ||
40 | <?php $this->_endblock();?> | 57 | <?php $this->_endblock();?> |
1 | <?php $this->_extends('layout/default_layout');?> | 1 | <?php $this->_extends('layout/default_layout');?> |
2 | <?php $this->_block('main');?> | 2 | <?php $this->_block('main');?> |
3 | - <div class="slide-main"> | ||
4 | - <div class="slide-box"> | 3 | + <div class="slide-main clearfix"> |
4 | + <div class="slide-box-warp"> | ||
5 | + <div class="slide-box"> | ||
5 | <div class="slide-wrap clearfix"> | 6 | <div class="slide-wrap clearfix"> |
6 | <?php foreach($this->view->banners as $banner):?> | 7 | <?php foreach($this->view->banners as $banner):?> |
7 | <div class="box"> | 8 | <div class="box"> |
@@ -11,6 +12,7 @@ | @@ -11,6 +12,7 @@ | ||
11 | </div> | 12 | </div> |
12 | <?php endforeach;?> | 13 | <?php endforeach;?> |
13 | </div> | 14 | </div> |
15 | + </div> | ||
14 | </div> | 16 | </div> |
15 | <div class="slide-navigator"> | 17 | <div class="slide-navigator"> |
16 | <div class="dib clearfix"> | 18 | <div class="dib clearfix"> |
@@ -31,27 +33,29 @@ | @@ -31,27 +33,29 @@ | ||
31 | </div> | 33 | </div> |
32 | <div id="pageContent" style="text-align: center;" class="pagination"> | 34 | <div id="pageContent" style="text-align: center;" class="pagination"> |
33 | <?php $this->_component('Common_Pagination',array( | 35 | <?php $this->_component('Common_Pagination',array( |
34 | - 'pagination' => $this->view->pagination,'next_label' => '>>','prev_label' => '<<','current_class' => 'current', | 36 | + 'pagination' => $this->view->pagination,'next_label' => 'NEXT>>','prev_label' => '<<','current_class' => 'current', |
35 | 'page_class'=>'pagination-inner', 'id'=>'img_page' | 37 | 'page_class'=>'pagination-inner', 'id'=>'img_page' |
36 | ));?> | 38 | ));?> |
37 | </div> | 39 | </div> |
38 | </div> | 40 | </div> |
39 | </div> | 41 | </div> |
40 | <?php if(count($this->view->partnerList)):?> | 42 | <?php if(count($this->view->partnerList)):?> |
41 | - <div class="cooperation clearfix"> | ||
42 | - <div class="cooperation-slide-box"> | ||
43 | - <div class="slide-wrap clearfix"> | ||
44 | - <?php | 43 | +<!-- 合作商等信息滑动条 start --> |
44 | +<div class="cooperation clearfix"> | ||
45 | + <div class="cooperation-slide-warp"> | ||
46 | + <div class="cooperation-slide-box"> | ||
47 | + <div class="slide-wrap clearfix"> | ||
48 | + <?php | ||
45 | $partnerGroups = array(); | 49 | $partnerGroups = array(); |
46 | foreach($this->view->partnerList as $partner) | 50 | foreach($this->view->partnerList as $partner) |
47 | { | 51 | { |
48 | - foreach($this->view->partnerTypes as $key => $type) | ||
49 | - { | ||
50 | - if($partner['type'] == $key) | ||
51 | - { | ||
52 | - $partnerGroups[$type][] = $partner; | ||
53 | - } | ||
54 | - } | 52 | + foreach($this->view->partnerTypes as $key => $type) |
53 | + { | ||
54 | + if($partner['type'] == $key) | ||
55 | + { | ||
56 | + $partnerGroups[$type][] = $partner; | ||
57 | + } | ||
58 | + } | ||
55 | } | 59 | } |
56 | $groupNum = 0; | 60 | $groupNum = 0; |
57 | $groupLen = 0; | 61 | $groupLen = 0; |
@@ -62,85 +66,87 @@ | @@ -62,85 +66,87 @@ | ||
62 | foreach ($group as $key => $partner) | 66 | foreach ($group as $key => $partner) |
63 | { | 67 | { |
64 | $pic = Lib_Images::getImageUrl($partner['pic'], 'source','fragmentimg'); | 68 | $pic = Lib_Images::getImageUrl($partner['pic'], 'source','fragmentimg'); |
65 | - $html.= <<<EOL | 69 | + $html.= <<<EOL |
66 | <li> | 70 | <li> |
67 | <a href="{$partner['url']}" title="{$partner['name']}" target="_blank"> | 71 | <a href="{$partner['url']}" title="{$partner['name']}" target="_blank"> |
68 | <img src="{$pic}" alt="" style="width:70px;"/> | 72 | <img src="{$pic}" alt="" style="width:70px;"/> |
69 | </a> | 73 | </a> |
70 | </li> | 74 | </li> |
71 | EOL; | 75 | EOL; |
72 | - $groupLen ++; | ||
73 | - if($groupLen>= 6) | ||
74 | - { | ||
75 | - $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
76 | - $html = ''; | ||
77 | - $groupLen = 0; | ||
78 | - $groupNum = 0; | ||
79 | - } | ||
80 | - } | ||
81 | - if(!empty($html)) | ||
82 | - { | ||
83 | - $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
84 | - $html = ''; | ||
85 | - } | ||
86 | - $groupNum ++; | ||
87 | - if($groupNum == 2 && !empty($html)) | ||
88 | - { | ||
89 | - $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
90 | - $html = ''; | ||
91 | - $groupNum = 0; | ||
92 | - $groupLen = 0; | ||
93 | - } | ||
94 | - } | ||
95 | - $pos = 0; | ||
96 | - foreach($templates as $temp) | ||
97 | - { | ||
98 | - if($pos % 2 == 0) | ||
99 | - { | ||
100 | - $temp = str_replace('{class}','partner', $temp); | ||
101 | - } | ||
102 | - else | ||
103 | - { | ||
104 | - $temp = str_replace('{class}','media', $temp); | ||
105 | - } | ||
106 | - preg_match_all("/<li>/i", $temp, $liLen, PREG_SET_ORDER); | ||
107 | - if(count($liLen) >= 6) | ||
108 | - { | ||
109 | - $temp = preg_replace('@<div class="(\w+)">(.+)<\/div>@isU', "\\2", $temp); | ||
110 | - $template .='<div class="box clearfix">'.$temp.'</div>'; | ||
111 | - $pos = -1; | 76 | + $groupLen ++; |
77 | + if($groupLen>= 6) | ||
78 | + { | ||
79 | + $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
80 | + $html = ''; | ||
81 | + $groupLen = 0; | ||
82 | + $groupNum = 0; | ||
83 | + } | ||
84 | + } | ||
85 | + if(!empty($html)) | ||
86 | + { | ||
87 | + $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
88 | + $html = ''; | ||
89 | + } | ||
90 | + $groupNum ++; | ||
91 | + if($groupNum == 2 && !empty($html)) | ||
92 | + { | ||
93 | + $templates[] ='<div class="{class}"><h2>'.$type.'</h2><ul class="clearfix">'.$html.'</ul></div>'; | ||
94 | + $html = ''; | ||
95 | + $groupNum = 0; | ||
96 | + $groupLen = 0; | ||
97 | + } | ||
112 | } | 98 | } |
113 | - else | 99 | + $pos = 0; |
100 | + foreach($templates as $temp) | ||
114 | { | 101 | { |
115 | if($pos % 2 == 0) | 102 | if($pos % 2 == 0) |
116 | { | 103 | { |
117 | - $template .='<div class="box clearfix">'; | 104 | + $temp = str_replace('{class}','partner', $temp); |
105 | + } | ||
106 | + else | ||
107 | + { | ||
108 | + $temp = str_replace('{class}','media', $temp); | ||
109 | + } | ||
110 | + preg_match_all("/<li>/i", $temp, $liLen, PREG_SET_ORDER); | ||
111 | + if(count($liLen) >= 6) | ||
112 | + { | ||
113 | + $temp = preg_replace('@<div class="(\w+)">(.+)<\/div>@isU', "\\2", $temp); | ||
114 | + $template .='<div class="box clearfix">'.$temp.'</div>'; | ||
115 | + $pos = -1; | ||
118 | } | 116 | } |
119 | - $template .= $temp; | ||
120 | - if(($pos+1) % 2 == 0) | 117 | + else |
121 | { | 118 | { |
122 | - $template .='</div>'; | 119 | + if($pos % 2 == 0) |
120 | + { | ||
121 | + $template .='<div class="box clearfix">'; | ||
122 | + } | ||
123 | + $template .= $temp; | ||
124 | + if(($pos+1) % 2 == 0) | ||
125 | + { | ||
126 | + $template .='</div>'; | ||
127 | + } | ||
123 | } | 128 | } |
129 | + $pos++; | ||
124 | } | 130 | } |
125 | - $pos++; | ||
126 | - } | ||
127 | - if($pos % 2 == 1) | ||
128 | - { | ||
129 | - $template .='</div>'; | ||
130 | - } | ||
131 | - echo $template; | ||
132 | - ?> | ||
133 | - </div> | ||
134 | - </div> | ||
135 | - <div class="cooperation-slide-control"> | ||
136 | - <a class="cooperation-slide-prev iconfont" href="javascript:void(0);"></a> | ||
137 | - <a class="cooperation-slide-next iconfont" href="javascript:void(0);"></a> | ||
138 | - </div> | ||
139 | - </div> | ||
140 | - <?php endif;?> | 131 | + if($pos % 2 == 1) |
132 | + { | ||
133 | + $template .='</div>'; | ||
134 | + } | ||
135 | + echo $template; | ||
136 | + ?> | ||
137 | + </div> | ||
138 | + </div> | ||
139 | + <div class="cooperation-slide-control"> | ||
140 | + <a class="cooperation-slide-prev iconfont" href="javascript:void(0);"></a> | ||
141 | + <a class="cooperation-slide-next iconfont" href="javascript:void(0);"></a> | ||
142 | + </div> | ||
143 | + </div> | ||
144 | +</div> | ||
145 | +<?php endif;?> | ||
146 | +<!-- 合作商等信息滑动条 end --> | ||
141 | 147 | ||
142 | <div id="right_banner" style="display:none;" num="<?php echo count($this->view->rightBanners);?>"> | 148 | <div id="right_banner" style="display:none;" num="<?php echo count($this->view->rightBanners);?>"> |
143 | - <div class="fluid-item layout-item tiled"> | 149 | + <div class="right-banner fluid-item layout-item tiled"> |
144 | <?php | 150 | <?php |
145 | $banners = $this->view->rightBanners; | 151 | $banners = $this->view->rightBanners; |
146 | $temp = array(); | 152 | $temp = array(); |
@@ -163,7 +169,7 @@ EOL; | @@ -163,7 +169,7 @@ EOL; | ||
163 | } | 169 | } |
164 | $width = 308; | 170 | $width = 308; |
165 | ?> | 171 | ?> |
166 | - <div class="image-box" style="padding-bottom: 30px;"> | 172 | + <div class="image-box" style="padding-bottom: 39px;"> |
167 | <a href="<?php echo $banner['url']?>" target="_blank" style="<?php echo sprintf("height:%spx;width:%spx;overflow:hidden;", $height, $width);?>"> | 173 | <a href="<?php echo $banner['url']?>" target="_blank" style="<?php echo sprintf("height:%spx;width:%spx;overflow:hidden;", $height, $width);?>"> |
168 | <img disopen="1" src="<?php echo Lib_Images::getImageUrl($banner['res'], 'source','fragmentimg');?>" style="<?php echo sprintf("height:%spx;width:%spx;", $height, $width);?>"/> | 174 | <img disopen="1" src="<?php echo Lib_Images::getImageUrl($banner['res'], 'source','fragmentimg');?>" style="<?php echo sprintf("height:%spx;width:%spx;", $height, $width);?>"/> |
169 | </a> | 175 | </a> |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <h2><?php echo $this->view->info['title']?></h2> | 5 | <h2><?php echo $this->view->info['title']?></h2> |
6 | <!-- <h3>潮流嘉年华</h3> --> | 6 | <!-- <h3>潮流嘉年华</h3> --> |
7 | <div class="item-info"> | 7 | <div class="item-info"> |
8 | - <a class="fluid-tag item-tag brand-info" href="javascript:;">品牌资讯</a> | 8 | + <a class="fluid-tag item-tag brand-info" href="/news/index/tag/<?php echo $this->view->info['tag']?>"><?php echo $this->view->info['tag']?></a> |
9 | <span class="item-time"><?php echo date('Y.m.d', $this->view->info['create_time']);?></span> | 9 | <span class="item-time"><?php echo date('Y.m.d', $this->view->info['create_time']);?></span> |
10 | </div> | 10 | </div> |
11 | </div> | 11 | </div> |
@@ -12,32 +12,32 @@ else | @@ -12,32 +12,32 @@ else | ||
12 | { | 12 | { |
13 | $thumb = SITE_IMG.'/pic01.png'; | 13 | $thumb = SITE_IMG.'/pic01.png'; |
14 | } | 14 | } |
15 | - if($thumb_size['height']!=0 && $thumb_size['width']!=0) { | ||
16 | - $height = ceil($thumb_size['height'] * (308 / $thumb_size['width'])); | ||
17 | - } | 15 | +// if($thumb_size['height']!=0 && $thumb_size['width']!=0) { |
16 | +// $height = ceil($thumb_size['height'] * (308 / $thumb_size['width'])); | ||
17 | +// } | ||
18 | + $height=193; | ||
18 | $width = 308; | 19 | $width = 308; |
19 | ?> | 20 | ?> |
20 | -<div class="<?php !isset($video) ?'fluid-item':'';?>layout-item tiled"> | 21 | + <div class="fluid-item layout-item tiled"> |
21 | <div class="image-box"> | 22 | <div class="image-box"> |
22 | <a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank" title="<?php echo Lib_Utils_StringHelper::stripTags($news['title']);?>" | 23 | <a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank" title="<?php echo Lib_Utils_StringHelper::stripTags($news['title']);?>" |
23 | <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;overflow: hidden;\"", $height, $width):''; ?>> | 24 | <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;overflow: hidden;\"", $height, $width):''; ?>> |
24 | - <img src="<?php echo $thumb;?>" alt="" <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;\"", $height, $width):''; ?>> | ||
25 | - <?php if(trim($news['tag']) == '视频'):?> | ||
26 | - <i class="play-icon"></i> | ||
27 | - <?php endif;?> | 25 | + <img src="<?php echo $thumb;?>" alt="" <?php echo $video !=1 ? sprintf("style=\"height:%spx;width:%spx;overflow: hidden;\"", $height, $width):''; ?>> |
28 | </a> | 26 | </a> |
29 | - <a class="item-tag" href="<?php echo url('news/index',array('tag' => $news['tag']))?>"><?php echo $news['tag'];?></a> | ||
30 | </div> | 27 | </div> |
28 | + <div class="item-info"> | ||
29 | + <a class="fluid-tag item-tag brand-info" href="/news/index/tag/<?php echo $news['tag']?>"><?php echo $news['tag']?></a> | ||
30 | + <span class="item-time"><?php echo date('Y.m.d', $news['create_time']);?></span> | ||
31 | + </div> | ||
31 | <div class="content"> | 32 | <div class="content"> |
32 | - <h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?>> | 33 | + <h2 <?php echo $news['main_title_type'] == 1 ? 'class="volupia"':'';?> style="white-space:nowrap;text-overflow:ellipsis;overflow: hidden;"> |
33 | <a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank"> | 34 | <a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank"> |
34 | - <?php | 35 | + <?php |
35 | echo $video ? Lib_Utils_StringHelper::substr_full_en($news['title'], 88) : $news['title']; | 36 | echo $video ? Lib_Utils_StringHelper::substr_full_en($news['title'], 88) : $news['title']; |
36 | - ?> | 37 | + ?> |
37 | </a> | 38 | </a> |
38 | </h2> | 39 | </h2> |
39 | <p class="text-content"><a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank"><?php echo $description;?></a></p> | 40 | <p class="text-content"><a href="<?php echo url('news/detail' ,array('id' => $news['id']))?>" target="_blank"><?php echo $description;?></a></p> |
40 | - <p class="time"><?php echo date('Y.m.d', $news['create_time']);?></p> | ||
41 | </div> | 41 | </div> |
42 | </div> | 42 | </div> |
43 | <?php endforeach;?> | 43 | <?php endforeach;?> |
-
Please register or login to post a comment