提交 6591a7c4 编写于 作者: G gongfuxiang

首页排版优化

上级 5fa361de
......@@ -102,7 +102,7 @@ class Search extends Common
{
// 获取商品列表
$ret = SearchService::GoodsList($this->params);
if(empty($ret['data']))
if(empty($ret['data']['data']))
{
$msg = '没有相关数据';
$code = -100;
......
......@@ -149,8 +149,8 @@
</div>
</div>
<div class="am-g am-g-fixed flood" {{if !empty($floor['bg_color'])}}style="background-color:{{$floor.bg_color}};"{{else /}}style="background-color:#eaeaea;"{{/if}}>
<div class="am-u-sm-5 am-u-md-4 text-one list" >
<div class="am-g am-g-fixed flood">
<div class="am-u-sm-3 text-one list" {{if !empty($floor['bg_color'])}}style="background-color:{{$floor.bg_color}};"{{else /}}style="background-color:#eaeaea;"{{/if}}>
<div class="word">
{{if !empty($floor['items'])}}
{{foreach $floor.items as $category_key=>$category}}
......@@ -164,32 +164,34 @@
{{/foreach}}
{{/if}}
</div>
<a href="{{:MyUrl('index/search/index', ['category_id'=>$floor['id']])}}" target="_blank">
<div class="outer-con">
<div class="describe">{{$floor.describe}}</div>
</div>
{{if !empty($floor['big_images'])}}
<div class="outer-con">
<div class="describe">{{$floor.describe}}</div>
</div>
{{if !empty($floor['big_images'])}}
<a href="{{:MyUrl('index/search/index', ['category_id'=>$floor['id']])}}" target="_blank">
<img src="{{$floor.big_images}}" />
{{/if}}
</a>
</a>
{{/if}}
<div class="triangle-topright"></div>
</div>
{{if !empty($floor['goods'])}}
{{foreach $floor.goods as $goods_key=>$goods}}
<div class="goods-items {{if in_array($goods_key, [0,1])}}am-u-sm-7 am-u-md-4 text-two{{else /}}am-u-sm-6 am-u-md-2 text-three{{/if}} {{if in_array($goods_key, [0,3])}} sug{{/if}} {{if in_array($goods_key, [2,5])}} big{{/if}} {{if $goods_key eq 5}} last{{/if}}">
<div class="outer-con">
<div class="goods-title ellipsis">
<a href="{{$goods['goods_url']}}" target="_blank" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>{{$goods.title}}</a>
<div class="goods-list">
{{if !empty($floor['goods'])}}
{{foreach $floor.goods as $goods_key=>$goods}}
<div class="goods-items">
<a href="{{$goods.goods_url}}" target="_blank">
<img src="{{$goods.home_recommended_images}}" alt="{{$goods.title}}" />
</a>
<div class="outer-con">
<div class="goods-title ellipsis">
<a href="{{$goods['goods_url']}}" target="_blank" {{if !empty($goods.title_color)}}style="color:{{$goods.title_color}};"{{/if}}>{{$goods.title}}</a>
</div>
<div class="price">¥{{$goods.min_price}}</div>
</div>
<div class="price">¥{{$goods.min_price}}</div>
</div>
<a href="{{$goods.goods_url}}" target="_blank">
<img src="{{$goods.home_recommended_images}}" />
</a>
</div>
{{/foreach}}
{{/if}}
{{/foreach}}
{{/if}}
</div>
</div>
</div>
{{/if}}
......
......@@ -186,7 +186,7 @@ class GoodsService
foreach($goods_category as &$v)
{
$category_ids = self::GoodsCategoryItemsIds([$v['id']], 1);
$goods = self::CategoryGoodsList(['where'=>['gci.category_id'=>$category_ids, 'is_home_recommended'=>1], 'm'=>0, 'n'=>6, 'field'=>'g.id,g.title,g.title_color,g.images,g.home_recommended_images,g.original_price,g.price,g.min_price,g.max_price,g.inventory,g.buy_min_number,g.buy_max_number']);
$goods = self::CategoryGoodsList(['where'=>['gci.category_id'=>$category_ids, 'is_home_recommended'=>1], 'm'=>0, 'n'=>8, 'field'=>'g.id,g.title,g.title_color,g.images,g.home_recommended_images,g.original_price,g.price,g.min_price,g.max_price,g.inventory,g.buy_min_number,g.buy_max_number']);
$v['goods'] = $goods['data'];
}
}
......
此差异已折叠。
......@@ -26,9 +26,6 @@ dt + dd {margin-top: 0;}
.small-nav .mini-nav-seconds { background-color: #fa506c; }
.small-nav a { text-decoration: none !important; }
.list .word{display: none;}
.last{border-right:0px !important ;}
/*走马灯*/
.marqueen{position: relative;border-top:1px solid #F5F5F5 ;border-bottom: 1px #f5f5f5 solid;overflow: hidden;}
.marqueen-title{position: absolute;left:10px;padding-right:10px;border-right:1px solid #F5F5F5 ;}
......@@ -62,59 +59,39 @@ text-align: center;float:none}
.s-buy{display:none;}
/*楼层*/
.flood {background: #fff;}
.outer-con .price {
color: #f33f00;
font-weight: bold;
}
.items-nav-title a:hover {
color: #d2364c;
}
.flood {background: #fff; position: relative; }
.outer-con .price { color: #f33f00; font-weight: bold; }
.items-nav-title a:hover { color: #d2364c; }
/*文字说明*/
.seprate{display: none;}
.outer-con {position: absolute;width:100% ;}
.text-one .outer-con {text-align: center;top:7%;}
.recommendation .info h3{font-size:12px;color:#F03726}
/*小标签*/
.list .word{padding: 5px 10px; overflow: hidden;}
.word .outer {margin: 5px; width: 50px;height: 50px;text-align: center;color: #2f2f2f;background-color: #fff;border-radius: 50px; display: -webkit-inline-box; }
.word .outer .inner {display: table-cell;vertical-align: middle;width:50px;height:50px;}
.word .outer .text {font-weight: 400;display: inline-block; max-width:35px;margin: 0 auto;}
/*楼层*/
.flood .text-one{border-top: 1px solid #eee;}
.flood .text-one img{width:96%;margin:49% 2% 0% 2%;}
.flood .text-two{border-top: 1px solid #eee;border-left: 1px solid #eee;}
.flood .text-two img{width:50%;margin:1% 3% 1% 47%;}
.flood .text-three{border-top: 1px solid #eee;border-left: 1px solid #eee;}
.flood .text-three img{width:96%;margin:2% 2% 45% 2%;}
.flood .outer-con {padding: 0% 3% 3% 3%; bottom: 0px;}
.flood .text-two .outer-con {width:40%;}
.list .outer-con .describe {
color: #fff;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
/*楼层左侧*/
.list .outer-con .describe { color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.flood .list { overflow: hidden; width: 150px; height: 400px; text-align: center; }
.list .outer-con{ padding: 10px; text-align: center; }
/*楼层商品*/
.goods-items { background-color: #fff; }
.flood .list { overflow: hidden; }
.goods-items a { font-size: 12px; }
/*推荐*/
.flood li {width: 50%;float: left;text-align: center;}
@media only screen and (min-width: 480px) {
.small-nav img{max-width: 100%;max-height: 100%;}
.small-nav{ font-size:14px;}
.flood li{width:33.3%;}
/*第二套各类活动*/
.row li{width: 25%;float: left;}
}
.word .outer:hover { background: #f9918f; color: #fff !important; border: 3px solid #fff; }
@media only screen and (min-width: 640px) {
/*标题*/
.items-nav-title{background: #fff;}
.items-nav-title{background: #fff; border-bottom: 2px solid #000;}
.hmtop{background: #fff;}
.am-container {padding-left:0px;padding-right:0px ;}
.home-floor{width:100%;background:#fff;overflow:visible;}
......@@ -170,24 +147,59 @@ text-align: center;float:none}
.s-time .ss {left: 121px;}
/*楼层*/
.flood {border: 1px solid #eee;border-top: none;}
.flood { margin-bottom: 15px; }
.outer-con .describe ,.recommendation .info h3{font-size: 14px;font-weight: 600;}
.goods-title, .outer-con .price { font-size: 14px; }
.flood .goods-list { overflow: hidden; }
.flood .goods-list .goods-items { float: left; width: 25%; padding: 10px 15px; border-right: 1px solid; border-bottom: 1px solid; border-color: #eee; height: 200px; position: relative; overflow: hidden; }
.flood .goods-list .goods-items img { max-width: 100%; padding: 10px; }
.flood .list img {position: absolute;top:auto;left:0;bottom:0;max-width: 100%;}
/*楼层 hover*/
.word .outer:hover { background: #f9918f; color: #fff !important; -webkit-transition: background .2s ease-in; -moz-transition: background .2s ease-in; -ms-transition: background .2s ease-in; -o-transition: background .2s ease-in; transition: background .2s ease-in; }
.goods-items:before { content: ""; position: absolute; top: 0; left: -100%; display: block; height: 100%; width: 50%; z-index: 999; background-color: rgba(255, 255, 255, 0.3); -webkit-transition: all 1s ease 0s; -moz-transition: all 1s ease 0s; -o-transition: all 1s ease 0s; transition: all 1s ease 0s; -ms-transform: skewX(-20deg); -webkit-transform: skewX(-20deg); -o-transform: skewX(-20deg); transform: skewX(-20deg); background: -webkit-linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.4) 100%); background: -moz-linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.4) 100%); background: -o-linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.4) 100%); background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.4) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=transparent, endColorstr=rgba(255, 255, 255, 0.4),GradientType=0.9); }
.goods-items:hover:before { left: 100%; }
}
@media only screen and (min-width: 750px) {
/*楼层*/
.flood .text-one img{width:90%;margin:37% 5% 0% 5%;}
.flood .text-two img{width:60%;margin:1% 3% 1% 37%;}
.flood .text-three img{width:96%;margin:2% 2% 40% 2%;}
.flood .text-two .outer-con {top:7%;left:2% ;width:35%;}
.flood .goods-list .goods-items { width: 25%; padding: 10px 15px; height: 200px; }
/*楼层左侧*/
.flood .list { width: 150px; height: 400px; }
}
@media only screen and (max-width: 640px) {
.flood .text-one { background-color: transparent !important; }
.items-nav-title{ padding: 0 10%;}
.marqueen-title{line-height: 30px; height: 30px;}
.am-footer { padding-bottom: 55px; }
@media only screen and (min-width: 800px) {
/*楼层*/
.flood .goods-list .goods-items { width: 25%; padding: 10px 15px; height: 190px; }
/*楼层左侧*/
.flood .list { width: 222px; height: 380px; }
}
@media only screen and (min-width: 850px) {
/*楼层*/
.flood .goods-list .goods-items { width: 25%; padding: 10px 15px; height: 200px; }
/*楼层左侧*/
.flood .list { width: 222px; height: 399px; }
}
@media only screen and (min-width: 900px) {
/*楼层*/
.flood .goods-list .goods-items { width: 25%; padding: 10px 15px; height: 208px; }
/*楼层左侧*/
.flood .list { width: 222px; height: 416px; }
}
@media only screen and (min-width: 950px) {
/*楼层*/
.flood .goods-list .goods-items { width: 25%; padding: 10px 15px; height: 228px; }
/*楼层左侧*/
.flood .list { width: 222px; height: 456px; }
}
@media only screen and (min-width: 1025px) {
.small-nav { display:none;}
......@@ -206,9 +218,8 @@ text-align: center;float:none}
.category-content .category-list.navTwo .b-category-name {line-height: 28px;}
.category-content .category-list.navTwo .category-name i img {width: 22px; height: 22px;border-radius: 22px;}
/*标题*/
.items-nav-title{text-align: left;position: relative;border-bottom:2px solid #000;margin-top:10px ;}
.items-nav-title{text-align: left;position: relative;margin-top:10px ;}
.activity .items-nav-title{margin-top: 10px;}
.items-nav-title h4{float:left;border: none;margin:7px 0px ;font-size:20px;font-weight: 700;}
.items-nav-title h3{display:block;font-size: 14px;color: #999;float: left;margin-left: 10px;margin-top:12px;}
......@@ -248,31 +259,12 @@ text-align: center;float:none}
/*楼层*/
.outer-con .title,.recommendation .info h3{line-height:22px ;color:#666 ;}
.flood {position: relative;border: none;}
.flood .big, .flood .list {height: 400px !important;position: relative;}
.flood .big img {width:174px !important;margin-right: -87px !important;right: 50%;bottom: 15% !important;top: auto !important;}
.big .outer-con{top:23% !important;}
.list .outer-con{top:38% !important;width:98% !important;left:2% !important;text-align: center !important;}
.flood .list img { height: 200px; }
.flood .list { overflow: hidden; }
.flood .text-two .outer-con ,.flood .text-three .outer-con {top:auto;left:5%;width:90%;bottom:10px ;}
/*小标签*/
.list .word{display: block;padding:20px 0 30px 10px;}
.word .outer {margin: 0 10px 10px 0;float: left;width: 50px;height: 50px;text-align: center;color: #2f2f2f;background-color: #fff;border-radius: 50px;}
.word .outer .inner {display: table-cell;vertical-align: middle;width:50px;height:50px;}
.word .outer .text {font-weight: 400;display: inline-block; max-width:35px;margin: 0 auto;}
/*楼层*/
.flood .text-one,.flood .text-two,.flood .text-three{width:20%;text-align: center;margin: 0px 0px;height:200px ;}
.flood .text-two.sug{position: absolute;top:200px;left:20%;}
.flood .text-three.sug{position: absolute;top:200px;right:20%;}
.flood .text-one img,.flood .text-two img,.flood .text-three img{position: absolute;margin:0px 0px;width: 120px;right: 50%;margin-right: -60px;}
.flood .list img{position: absolute;top:auto;margin:0px 0px;bottom:0;right:50%;width:200px;margin-right: -100px;}
/*楼层左侧*/
.flood .list { width: 222px; height: 456px; }
/*楼层商品*/
.flood .goods-list .goods-items { height: 228px; }
/*楼层颜色*/
#floor1 .list .triangle-topright{width: 0;height: 0;border-top: 30px solid #68937f;position: absolute;bottom:0px;border-left: 30px solid #fff}
......@@ -285,31 +277,14 @@ text-align: center;float:none}
#floor8 .list .triangle-topright{width: 0;height: 0;border-top: 30px solid #9c7b36;position: absolute;bottom:0px;border-left: 30px solid #fff}
#floor9 .list .triangle-topright{width: 0;height: 0;border-top: 30px solid #caa463;position: absolute;bottom:0px;border-left: 30px solid #fff}
#floor10 .list .triangle-topright{width: 0;height: 0;border-top: 30px solid #f768e8;position: absolute;bottom:0px;border-left: 30px solid #fff}
/*位移效果*/
.flood .goods-items:hover img{
transition: all 0.5s ease 0s;
-webkit-transform: all 0.5s ease 0s;
transform: translateX(-10px);
-webkit-transform: translateX(-10px);
}
.flood .text-one:hover img {
transform: scale(1.1);
transition: all 0.5s ease 0s;
-webkit-transform: scale(1.1);
-webkit-transform: all 1s ease 0s;
}
}
@media only screen and (min-width: 1260px) {
.slideall{max-width: 1200px;margin:0px auto ;height:430px;}
.am-g-fixed{max-width:1200px}
.flood li {width: 16.66667%;}
/*轮播图布局*/
.banner .am-slider .am-slides li{height:430px;}
.banner .am-slider .am-slides img{width:1200px ;left:50% ;position: absolute;margin-left: -600px;}
/*公告布局*/
......@@ -329,25 +304,24 @@ text-align: center;float:none}
.member-center a {float: left;margin-left: -1px;width:50px;text-align: center;border-left: 1px solid #EEE;font-size: 12px; text-decoration: none; }
.member-center a strong {height: 18px;display: block;font-size: 14px;color: #F40;}
/*第二套各类活动*/
.row {padding:0px;position: absolute;left:182px ;bottom:0px ;right:0px ;}
/*秒杀*/
.sale-mt{margin-top: 10px;}
/*推荐*/
.clock img{position: absolute;right: 15%;width: 120px;top:15px;}
/*楼层*/
.flood .list { width: 222px; height: 556px; }
.flood .goods-list .goods-items { height: 278px; }
}
.list .word{padding:20px 0 30px 20px;}
.word .outer {width: 57px;height: 57px;border-radius: 57px;}
.word .outer .inner {width:57px;height:57px;}
@media only screen and (max-width: 640px) {
.items-nav-title{ padding: 0 10%;}
.marqueen-title{line-height: 30px; height: 30px;}
.am-footer { padding-bottom: 55px; }
/*楼层*/
.flood .big, .flood .list{height: 480px !important;}
.flood .big img{width:194px !important;margin-right: -97px !important;}
.big .outer-con {top: 25% !important;}
.flood .text-one,.flood .text-two,.flood .text-three{width:20%;text-align: center;margin: 0px 0px;height:240px ;}
.flood .text-two.sug,.flood .text-three.sug{top:240px;}
.flood .text-one img,.flood .text-two img,.flood .text-three img{width: 180px;margin-right: -90px;}
.flood .list img{width:210px;margin-right: -105px;}
}
\ No newline at end of file
.flood .list { width: 100%; height: auto; }
.word .outer { display: inline-flex; padding: 5px 0; height: auto;background-color: transparent; width: 32.33%; margin: 0; }
.word .outer .inner { color: #2f2f2f; background-color: #fff; border-radius: 50px; margin: 0 auto; padding: 0 12px;}
.flood .goods-list .goods-items { width: 50%; float: left; padding: 10px; border-bottom: 1px solid #eee; }
.flood .goods-list .goods-items img { padding: 10px; }
.flood .goods-list .goods-items:nth-of-type(2n + 1) { border-right: 1px solid #eee; }
.flood .goods-list .goods-items:nth-of-type(2n) { border-left: 1px solid transparent; }
.list .word { padding: 10px 0; }
.word .outer .text { display: table-cell; vertical-align: middle; width: 35px; height: 50px; }
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册