Authored by weiqingting

女装首页和男装修改

{{> layout/header}}
<div class="home-page yoho-page">
<div class="home-page yoho-page boys" data-newarrivls='{"url":"/boys/commodity","pageCount":"4","flag":"boys"}'>
{{# boy}}
{{! 头部banner}}
... ... @@ -98,7 +98,7 @@
{{! 单品/广告}}
{{# singlehot}}
{{> index/singlehot}}
{{> index/boy-singlehot}}
{{/ singlehot}}
{{! 广告}}
... ... @@ -110,7 +110,7 @@
{{! 品类推荐}}
{{# recommend}}
{{> index/recommend}}
{{> index/boy-recommend}}
{{/ recommend}}
{{! 新品上架}}
... ...
{{> layout/header}}
<div class="home-page yoho-page">
girls
<div class="home-page yoho-page girls" data-newarrivls='{"url":"/girls/commodity","pageCount":"4","flag":"girls"}'>
{{#girl}}
{{! 品类推荐}}
{{# recommend}}
{{> index/girl-recommend}}
{{/ recommend}}
{{! 单品/广告}}
{{# singlehot}}
{{> index/girl-singlehot}}
{{/ singlehot}}
{{! 广告}}
{{# adbanner}}
{{/ adbanner}}
{{! 新品上架}}
{{# newArrivls}}
{{> index/commodity}}
{{/ newArrivls}}
{{/girl}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="home-page yoho-page">
kids
<div class="home-page yoho-page kids" data-newarrivls='{"url":"/kids/commodity","pageCount":"4","flag":"kids"}'>
{{#kid}}
{{! 新品上架}}
{{# newArrivls}}
{{> index/commodity}}
{{/ newArrivls}}
{{/kid}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="home-page yoho-page">
lifestyle
<div class="home-page yoho-page lifestyle" data-newarrivls='{"url":"/lifestyle/commodity","pageCount":"4","flag":"lifestyle"}'>
{{#lifestyle}}
{{! 新品上架}}
{{# newArrivls}}
{{> index/commodity}}
{{/ newArrivls}}
{{/lifestyle}}
</div>
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -5,26 +5,26 @@
<div class="tpl-nav">
<div class="tpl-keywords">
{{#each keyword}}
<a class="keywords{{@index}}" title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a>
<a class="keywords{{@index}}" title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
{{/ keyword}}
</div>
<div class="tpl-category clearfix">
{{#each category}}
<a href="{{url}}">{{name}}</a>
<a href="{{href}}">{{name}}</a>
{{/ category}}
</div>
</div>
<div class="tpl-brands clearfix">
<ul>
{{#each brands}}
<li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li>
<li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
<div class="tpl-types clearfix">
<ul>
{{#each types}}
<li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li>
<li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
... ... @@ -32,7 +32,7 @@
<div class="tpl-products clearfix">
<ul>
{{#each products}}
<li><a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a></li>
<li><a href="{{href}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
... ...
{{> index/floor-header}}
<div class="commodity clearfix">
<div class="commodity clearfix" id="newarrivals">
<ul class="clearfix">
</ul>
<div class="loading">
{{# navs}}
... ...
{{# tplrecommend}}
{{> index/floor-header}}
<div class="tpl-recommend clearfix">
<div class="tpl-body clearfix">
<div class="tpl-nav">
<div class="tpl-keywords">
{{#each keyword}}
<a class="keywords{{@index}}" title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
{{/ keyword}}
</div>
<div class="tpl-category clearfix">
{{#each category}}
<a href="{{href}}">{{name}}</a>
{{/ category}}
</div>
</div>
<div class="tpl-brands clearfix">
{{#each brands}}
<a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
{{/each}}
</div>
<div class="tpl-types clearfix">
<ul>
{{#each types}}
<li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
{{/each}}
</ul>
</div>
</div>
</div>
{{/ tplrecommend}}
\ No newline at end of file
... ...
{{> index/floor-header}}
<div class="commodity clearfix">
<ul class="clearfix">
{{#each imgHot}}
<li>
<a href="{{url}}"><div class="commodity-img">
{{# state}}
<i class="commodity-tag{{.}}"></i>
{{/ state}}
<img class="lazy" data-original="{{img}}" src="{{img}}"/></div>
<p class="commodity-name">{{name}}</p>
<p class="commodity-price"><span>¥{{price}}</span></p>
</a>
</li>
{{/each}}
</ul>
</div>
\ No newline at end of file
... ...
... ... @@ -4,8 +4,8 @@ var $ = require('yoho.jquery');
var Handlebars = require('yoho.handlebars');
var InfiniteLoad = require('../common/infinite-load');
(function($) {
var $container = $('div.commodity ul');
module.exports=function(url,data){
var $container = $('#newarrivals ul');
var $load = $('.loading a');
var load = new InfiniteLoad({
offset: {
... ... @@ -16,14 +16,12 @@ var InfiniteLoad = require('../common/infinite-load');
});
load.on('after', function(p) {
data=$.extend({},data,{pageIndex: p.index});
var options = {
type: 'POST',
url: '/boys/commodity',
data: {
pageIndex: p.index,
pageCount: 10,
flag: 'boy'
},
url: url,
data: data,
success: function(data) {
var code = data.code;
var myTemplate;
... ... @@ -46,6 +44,7 @@ var InfiniteLoad = require('../common/infinite-load');
},
error: function() {
load.stop();
$load.html('网络断开连接了~');
}
};
... ... @@ -58,14 +57,14 @@ var InfiniteLoad = require('../common/infinite-load');
//请求模板
load.tpl = '{{#each this}}';
load.tpl += '<li>';
load.tpl += ' {{# state}}';
load.tpl += ' <i class="commodity-tag{{.}}"></i>';
load.tpl += ' {{/ state}}';
load.tpl += ' <a href="{{url}}"><div class="commodity-img">';
load.tpl += ' <a href="{{url}}"><div class="commodity-img">';
load.tpl += ' {{# tip}}';
load.tpl += ' <i class="commodity-tag">{{.}}</i>';
load.tpl += ' {{/ tip}}';
load.tpl += ' <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>';
load.tpl += ' <p class="commodity-name">{{name}}</p>';
load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';
load.tpl += ' </a>';
load.tpl += ' <p class="commodity-name">{{name}}</p>';
load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';
load.tpl += ' </a>';
load.tpl += '</li>';
load.tpl += '{{/each}}';
... ... @@ -73,6 +72,7 @@ var InfiniteLoad = require('../common/infinite-load');
});
load.init();
}($));
}
... ...
... ... @@ -9,8 +9,14 @@ var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('../common/linkage-slider');
require('../common/slider2');
require('../common/new-arrivls');
var $data= JSON.parse($(".home-page").attr('data-newarrivls'));
require('../common/new-arrivls')($data.url,{
pageCount: $data.pageCount,
flag: $data.flag
});
lazyLoad($('img.lazy'));
$('.slide-container').linkageSlider();
... ...
.girls,.kids,.lifestyle{
.commodity{
li{
width: 280px;
a{
display: block;
width: 280px;
height: 465px;
position: relative;
}
i{
position: absolute;
bottom: 0;
width: 100%;
height: 20px;
background: #ffac5b;
color: #fff;
line-height: 20px;
text-align: center;
font-size: 12px;
}
.commodity-img{
img{
width: 280px;
height: 374px;
}
}
}
}
}
.boys{
.commodity{
i{
position: absolute;
top: -20px;
display: block;
width: 64px;
height: 20px;
}
}
.tpl-keywords{
.keywords0{
img{
height: 152px;
}
margin-bottom: 10px;
}
.keywords1{
img{
height: 86px;
}
}
}
}
.girls{
.tpl-keywords{
img{
height: 76px !important;
}
.keywords0{
margin-bottom: 10px;
}
.keywords1{
margin-bottom: 10px;
}
}
.tpl-brands img{
height: 502px !important;
width: 100% !important;
}
}
... ...
... ... @@ -266,18 +266,7 @@
height: 512px;
overflow: hidden;
.tpl-keywords{
.keywords0{
img{
height: 152px;
}
margin-bottom: 10px;
}
.keywords1{
img{
height: 86px;
}
margin-bottom: 8px;
}
margin-bottom: 8px;
}
.tpl-category{
height: 228px;
... ... @@ -328,18 +317,15 @@
}
.tpl-products{
width: 100%;
height: 298px;
overflow: hidden;
ul{margin-left:-10px;
li{
float: left;
margin-left:10px;
img{
width: 222px;
height: 298px;
}
margin-left:-10px;
li{
float: left;
margin-left:10px;
img{
width: 222px;
height: 298px;
}
}
}
... ... @@ -352,36 +338,35 @@
li{
float: left;
margin-left: 10px;
margin-bottom:28px;
padding-top:20px;
position: relative;
i{
position: absolute;
top: 0px;
display: block;
width: 64px;
height: 20px;
}
a{
display: block;
height: 360px;
height: 408px;
width: 222px;
.commodity-img{
img{
display: block;
height: 298px;
width: 222px;
}
}
p.commodity-name{
font-size: 12px;
color: #000;
line-height: 40px;
text-align: center;
}
.commodity-img{
position: relative;
img{
display: block;
height: 298px;
width: 222px;
}
p.commodity-price{
}
p.commodity-name{
font-size: 12px;
color: #000;
text-align: center;
margin-top: 14px;
line-height: 18px;
}
p.commodity-price{
position: relative;
margin: 3px 0 0 0;
text-align: center;
line-height: 20px;
color: #000;
span{
display: inline-block;
font-size: 12px;
text-align: center;
}
}
}
... ... @@ -393,7 +378,6 @@
font-size: 20px;
}
}
.singlehot{
width: 100%;
height: 584px;
... ... @@ -482,4 +466,5 @@
}
}
}
}
\ No newline at end of file
}
@import "_index-pliffy";
\ No newline at end of file
... ...
... ... @@ -212,6 +212,22 @@ class BoysController extends AbstractAction
)
)
);
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$name_href=array('name'=>'衣服','url'=>'');
$name_href_img=array(
'href' => '',
'img' => $imgsrc,
'name'=>'优显led触控台灯'
);
$name_href_img_price=array(
'href' => '',
'img' => $imgsrc,
'name'=>'优显led触控台灯',
'price'=>'100'
);
$tpldata = array(
'name'=>'潮人配饰 ORNAMENT',
'navs' => array(
... ... @@ -222,39 +238,15 @@ class BoysController extends AbstractAction
)
),
'tplrecommend'=>array(
'keyword'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),
'category'=>array(array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>'')),
'brands'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),
'types'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),
'products'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯'
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯'
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯'
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯'
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯'
)
)
'keyword'=>array($name_href_img,$name_href_img),
'category'=>array($name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href),
'brands'=>array($name_href_img,$name_href_img),
'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img),
'products'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
)
);
$data = array(
'headerdata' => $headerdata,
'boysHomePage' => true,
... ... @@ -416,51 +408,10 @@ class BoysController extends AbstractAction
array(
'singlehot'=>array(
'name' => '单品 HOT',
'imgHot' => array(
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
),
array(
'href' => '',
'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
)
)
'imgHot' => array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
)
),
array('adbanner'=>array('href' => '','img'=>'' )),//楼层广告
array('adbanner'=>$name_href_img),//楼层广告
array(
'recommend'=>$tpldata//潮人适配
),
... ... @@ -504,47 +455,47 @@ class BoysController extends AbstractAction
if($pageIndex>=3){
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$result=array(
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
)
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
)
)
);
);
} while (false);
$this->echoJson($result);
... ...
... ... @@ -212,13 +212,133 @@ class GirlsController extends AbstractAction
)
)
);
//数据变量
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$name_href=array('name'=>'衣服','url'=>'');
$name_href_img=array(
'href' => '',
'img' => $imgsrc,
'name'=>'优显led触控台灯'
);
$name_href_img_price=array(
'href' => '',
'img' => $imgsrc,
'name'=>'优显led触控台灯',
'price'=>'100'
);
$tpldata = array(
'name'=>'潮人配饰 ORNAMENT',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => 'MORE'
)
),
'tplrecommend'=>array(
'keyword'=>array($name_href_img,$name_href_img,$name_href_img),
'category'=>array($name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href),
'brands'=>array($name_href_img),
'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
)
);
$data = array(
'headerdata' => $headerdata,
'boysHomePage' => true,
'girl' => array(
array(
'recommend'=>$tpldata//潮人适配
),
array(
'recommend'=>$tpldata
),
array(
'singlehot'=>array(
'name' => '单品 HOT',
'imgHot' => array( $name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price),
'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
)
),
array(
'newArrivls' => array(
'name' => '最新上架 NEW ARRIVALS',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => 'MORE'
)
)
)
)
)
);
$this->_view->display('index', $data);
}
/**
* 男装首页 新品上架 接口数据
*
* @param int pageIndex 当前页数
* @param int pageCount 一页显示个数
* @param string flag 类型(男装/女装等,用于区分)
* @return json
*/
public function commodityAction()
{
$result = array();
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$pageIndex = $this->post('pageIndex');
if($pageIndex>=3){
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$result=array(
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'tip'=> '即将售罄' //提示
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'tip'=> '即将售罄' //提示
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'tip'=> '即将售罄' //提示
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'tip'=> '即将售罄' //提示
)
)
);
} while (false);
$this->echoJson($result);
}
}
\ No newline at end of file
... ...
... ... @@ -215,10 +215,91 @@ class KidsController extends AbstractAction
$data = array(
'headerdata' => $headerdata,
'boysHomePage' => true,
'girl' => array(
'kid' => array(
array(
'newArrivls' => array(
'name' => '最新上架 NEW ARRIVALS',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => 'MORE'
)
)
)
)
)
);
$this->_view->display('index', $data);
}
/**
* 男装首页 新品上架 接口数据
*
* @param int pageIndex 当前页数
* @param int pageCount 一页显示个数
* @param string flag 类型(男装/女装等,用于区分)
* @return json
*/
public function commodityAction()
{
$result = array();
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$pageIndex = $this->post('pageIndex');
if($pageIndex>=3){
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$result=array(
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
)
)
);
} while (false);
$this->echoJson($result);
}
}
\ No newline at end of file
... ...
... ... @@ -215,10 +215,91 @@ class LifestyleController extends AbstractAction
$data = array(
'headerdata' => $headerdata,
'boysHomePage' => true,
'girl' => array(
'lifestyle' => array(
array(
'newArrivls' => array(
'name' => '最新上架 NEW ARRIVALS',
'navs' => array(
array(
'id' => '',
'href' => '',
'name' => 'MORE'
)
)
)
)
)
);
$this->_view->display('index', $data);
}
/**
* 男装首页 新品上架 接口数据
*
* @param int pageIndex 当前页数
* @param int pageCount 一页显示个数
* @param string flag 类型(男装/女装等,用于区分)
* @return json
*/
public function commodityAction()
{
$result = array();
do {
/* 判断是不是AJAX请求 */
if (!$this->isAjax()) {
break;
}
$pageIndex = $this->post('pageIndex');
if($pageIndex>=3){
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$result=array(
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
)
)
);
} while (false);
$this->echoJson($result);
}
}
\ No newline at end of file
... ...