Authored by 张丽霞

Merge branch 'feature/mBrandShop' of git.dev.yoho.cn:web/yohobuywap into feature/mBrandShop

<?php
/**
* Created by PhpStorm.
* User: haishengshen
* Date: 14-3-6
* Time: 下午1:15
*/
namespace Plugin;
class Mobile
{
/**
* 获取用户User-Agent
* @return bool
*/
public static function getUserAgent()
{
if (!isset($_SERVER['HTTP_USER_AGENT']) || empty($_SERVER['HTTP_USER_AGENT'])) {
return '';
}
return $_SERVER['HTTP_USER_AGENT'];
}
/**
* 获取当前地址
* @return array
*/
public static function getNowUrl()
{
return array('host'=>$_SERVER['HTTP_HOST'], 'uri'=> $_SERVER['REQUEST_URI']);
}
/**
* 获取手机版的对应地址
* @param $host
* @return mixed
*/
public static function newHost($host)
{
if ($host == 'www.yohobuy.com' || $host == 'new.yohobuy.com' || stristr($host, 'new.yohobuy.com')) {
return str_replace(array('www.yohobuy', 'new.yohobuy'), 'm.yohobuy', $host);
}
if ($host == 'huodong.yohobuy.com') {
return str_replace('huodong.yohobuy', 'm.yohobuy', $host);
}
return str_replace('yohobuy.com', 'm.yohobuy.com', $host);
}
public static function match($url, $host, $uri)
{
// //guang.yohobuy.com
// //guang.yohobuy.com/1.html
// $list = array(
// array(
// 'match' => '#^([guang\.]*)yohobuy\.com(\/*)$#',
// ),
// array(
// 'match' => '#([guang\.]*)yohobuy.com/([0-9]+).html#',
// 'to' => 'guang.m.yohobuy.com/info/index?id='.substr($uri,1,(strpos($uri,'.')-1)) ,
// ),
// );
// foreach ($list as $value) {
// if (preg_match($value['match'], $url) && !empty($value['to'])) {
// return $value['to'];
// } else if (preg_match($value['match'], $url)) {
// $newHost = self::newHost($host);
// return $newHost . $uri;
// }
// }
//
// $continueList = array('www', 'list', 'search');
// $hostSplit = explode('.', $host);
// PC 跳 WAP 女生频道对应
if ($uri === '/woman') {
$uri = '/girls';
}
// 首页特殊跳转
if ($host === 'www.yohobuy.com') {
return 'm.yohobuy.com' . $uri;
}
$url = strtr($host, array('.yohobuy.com' => '.m.yohobuy.com')) . $uri;
return $url;
}
/**
* 获取新的URL
* @return string
*/
public static function getNewUrl()
{
$url = self::getNowUrl();
return self::match($url['host'].$url['uri'], $url['host'], $url['uri']);
}
/**
* 判断是否手机
* @return bool
*/
public static function isMobile()
{
$userAgent = self::getUserAgent();
if (stristr($userAgent, 'ipad')) {
return false;
}
$mobileAgents = array('iphone','android',"240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","anywhereyougo.com","applewebkit/525","applewebkit/532","asus","audio","au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ","fly_","fly-","go.web","goodaccess","gradiente","grundig","haier","hedy","hitachi","htc","huawei","hutchison","inno","ipad","ipaq","ipod","jbrowser","kddi","kgt","kwc","lenovo","lg ","lg2","lg3","lg4","lg5","lg7","lg8","lg9","lg-","lge-","lge9","longcos","maemo","mercator","meridian","micromax","midp","mini","mitsu","mmm","mmp","mobi","mot-","moto","nec-","netfront","newgen","nexian","nf-browser","nintendo","nitro","nokia","nook","novarra","obigo","palm","panasonic","pantech","philips","phone","pg-","playstation","pocket","pt-","qc-","qtek","rover","sagem","sama","samu","sanyo","samsung","sch-","scooter","sec-","sendo","sgh-","sharp","siemens","sie-","softbank","sony","spice","sprint","spv","symbian","tablet","talkabout","tcl-","teleca","telit","tianyu","tim-","toshiba","tsm","up.browser","utec","utstar","verykool","virgin","vk-","voda","voxtel","vx","wap","wellco","wig browser","wii","windows ce","wireless","xda","xde","zte");
$isMobile = false;
foreach ($mobileAgents as $device) {
if (stristr($userAgent, $device)) {
$isMobile = true;
break;
}
}
return $isMobile;
}
/**
* 是否转到手机版
* @return bool
*/
public static function isGoMobile()
{
if (empty($_COOKIE['m2w']) && self::isMobile()) {
header("HTTP/1.1 301 Moved Permanently");
header('Location:http://'.self::getNewUrl());
exit();
}
return true;
}
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,8 @@
var $ = require('jquery'),
IScroll = require('iscroll/iscroll-probe'),
// lazyLoad = require('yoho.lazyload'),
Swiper = require('yoho.iswiper'),
activeTab,
myScroll,
imgH,
... ... @@ -17,21 +19,57 @@ var $ = require('jquery'),
$nav2 = $('#pos-list'),
isIphone = navigator.userAgent.indexOf('iPhone') > 0 ? true : false;//判断浏览器类型
$.jqtab = function(nav, main) {
// lazyLoad($('img.lazy'));
if ($('.banner-swiper').find('li').size() > 1) {
bannerSwiper = new Swiper('.banner-swiper', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
loop: true,
autoplay: 3000,
autoplayDisableOnInteraction: false,
paginationClickable: true,
slideElement: 'li',
pagination: '.banner-top .pagination-inner'
});
}
if ($('.multi-browse').find('li').size() > 1) {
multiSwiper = new Swiper('.multi-browse', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
lazyLoadingOnTransitionStart: true,
grabCursor: true,
slidesPerView: 'auto',
slideElement: 'li',
watchSlidesVisibility: true
});
}
function tabChange(dom, index) {
var li = dom.eq(index);
dom.removeClass('active');
dom.removeClass('color');
li.addClass('color');
li.addClass('active');
}
$.jqtab = function(nav, nav1, main) {
$(nav + ' li').click(function() {
$(nav + ' li').removeClass('active');
$(nav + ' li').find('a').removeClass('color');
$(nav + ' li, ' + nav1 + ' li').on('touchstart', function() {
var index = $(this).index();
tabChange($(nav + ' li'), index);
tabChange($(nav1 + ' li'), index);
$(this).find('a').addClass('color');
activeTab = $(this).find('a').attr('tab');
$(main).hide();
$(this).addClass('active');
$('#' + activeTab).fadeIn();
return false;
});
};
$.jqtab('#nav', '.main');
$.jqtab('#nav','#pos-nav', '.main');
$(function(){
// if (!isIphone) {
... ... @@ -56,7 +94,6 @@ $(function(){
myScroll.on('scroll', function() {
var sTop = -this.y;
console.log(sTop)
if (sTop < imgH) {
if (!$nav1.hasClass('hide')) {
... ... @@ -78,9 +115,7 @@ $(function(){
$nav1.addClass('fixed-top')
.removeClass('absolute')
.css({
transform: 'translate(0, ' + (- scH) +
'px)'
transform: 'translate(0, ' + (- scH) + 'px)'
});
}
} else if (sTop < imgH + nav1H + main1H) {
... ... @@ -89,9 +124,7 @@ $(function(){
.removeClass('fixed-top');
}
$nav1.css({
transform: 'translate(0, ' + (imgH + main1H -
sTop - scH) + 'px)'
transform: 'translate(0, ' + (imgH + main1H - sTop - scH) + 'px)'
});
}
} else {
... ... @@ -107,9 +140,7 @@ sTop - scH) + 'px)'
$nav2.addClass('fixed-top')
.removeClass('absolute')
.css({
transform: 'translate(0, ' + (- scH) +
'px)'
transform: 'translate(0, ' + (- scH) + 'px)'
});
}
} else {
... ... @@ -118,25 +149,32 @@ sTop - scH) + 'px)'
.removeClass('fixed-top');
}
$nav2.css({
transform: 'translate(0, ' + (imgH + nav1H +
main1oH + main2oH -sTop - scH) + 'px)'
transform: 'translate(0, ' + (imgH + nav1H + main1oH + main2oH -sTop - scH) + 'px)'
});
}
}
});
})
//window onload 后重新refresh iscroll
window.onload = function() {
myScroll && myScroll.refresh();
imgH = $('#nav-top').outerHeight();
nav1H = $('#nav').outerHeight();
main1H = $('#nav-main').height();
main1oH = $('#nav-main').outerHeight();
nav2H = $('#list-nav').outerHeight();
main2oH = $('#goods-container').outerHeight();
scH = $('#scroller').outerHeight();
console.log(imgH + main1H)
console.log(imgH + nav1H + main1H)
};
\ No newline at end of file
//window onload 后重新refresh iscroll
window.onload = function() {
myScroll && myScroll.refresh();
imgH = $('#nav-top').outerHeight();
nav1H = $('#nav').outerHeight();
main1H = $('#nav-main').height();
main1oH = $('#nav-main').outerHeight();
nav2H = $('#list-nav').outerHeight();
main2oH = $('#goods-container').outerHeight();
scH = $('#scroller').outerHeight();
};
// $(nav + ' li, ' + nav1 + ' li').on('touchstart', function() {
// $.ajax({
// url:,
// data:,
// xxx:,
// success:function(data){
// $('#nav-main').append(data);
// }
// });
// });
\ No newline at end of file
... ...
... ... @@ -51,15 +51,17 @@
border-left: 1px solid #e1e1e1;
margin-top: 30rem / $pxConvertRem;
border-sizing: border-box;
color: #b1b1b1;
&:first-child {
border-left: none;
}
}
a {
color: #b1b1b1;
a {
color: #b1b1b1;
}
}
.color {
color: #000;
}
... ... @@ -71,6 +73,19 @@
overflow: hidden;
}
.banner-area {
@extend .banner-top;
.banner-swiper ul {
height: 6.5rem;
}
.swiper-pagination {
bottom: 1.5rem;
}
}
.hide {
display: hidden;
}
... ... @@ -91,37 +106,39 @@
.multi-brands {
width: 100%;
height: 260rem / $pxConvertRem;
height: 270rem / $pxConvertRem;
background: #fff;
border: 1px solid #e1e1e1;
border-top: none;
font-size: 20px;
text-align: center;
padding-top: 25rem / $pxConvertRem;
padding-top: 25rem / $pxConvertRem;
margin-bottom: 30rem / $pxConvertRem;
}
.multi-browse {
margin-top: 50rem / $pxConvertRem;
overflow: hidden;
}
.brand-img {
margin-top: 65rem / $pxConvertRem;
margin-left: 30rem / $pxConvertRem;
width: 30%;
height: 55%;
overflow: hidden;
padding-bottom: 20rem / $pxConvertRem;
float: left;
img {
// width: 130rem / $pxConvertRem;
// height: 110rem / $pxConvertRem;
float: left;
margin-left: 30rem / $pxConvertRem;
p {
font-size: 25rem / $pxConvertRem;
color: #b1b1b1;
padding-top: 10rem / $pxConvertRem;
}
}
.centerimg {
margin-top: 30rem / $pxConvertRem;
}
.spring {
margin: 0;
overflow: hidden;
padding: 30rem / $pxConvertRem 0;
li {
width: 50%;
... ... @@ -315,6 +332,23 @@
display: none;
}
.nav-title {
position: absolute;
margin-left: 200rem / $pxConvertRem;
height: 100%;
font-size: 36rem / $pxConvertRem;
color: #fff;
font-weight: bold;
top: 0;
right: 0;
left: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
// .fixed-top {
// position: fixed;
// top: 0;
... ...
{{> layout/header}}
{{# brands}}
{{# content}}
<a class="brand-list" href="{{url}}">
{{brandname}}
{{brand_name}}
</a>
{{/ brands}}
{{/ content}}
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,9 @@
<div class="shop-index yoho-page" id="wrapper">
<div id="scroller">
<div id="nav-top">
{{# headerBanner}}
{{> product/banner-swipe-and-single}}
{{/ headerBanner}}
<div class="search-area">
<div id="search-input" class="search-input">
<form id="search-form" action={{url}} method="get">
... ... @@ -20,103 +23,98 @@
</div>
</div>
<ul id="nav" class="nav home-nav">
<li class="active">
<a href="#" tab="home-page" class="color" >首页</a>
</li>
<li>
<a href="#" tab="new-arrival">上新</a>
</li>
<li>
<a href="#" tab="popularity">人气</a>
</li>
<ul id="nav" class="nav">
<li class="active color" tab="home-page">首页</li>
<li tab="new-arrival">上新</li>
<li tab="popularity">人气</li>
<li>
<a href="#" target="_blank">全部商品</a>
</li>
</ul>
<ul id="main">
<li id="home-page" class="main">
<div id="nav-main">
{{#unless brands}}
<div class="multi-brands">
<h2>品牌一览</h2>
<div class="brand-img">
{{#each brandImg}}
<img src="{{brandType}}">
{{/each}}
</div>
</div>
{{/unless}}
<div class="centerimg">
<img src="{{preferential}}">
<div id="home-page">
<div id="nav-main" class="main">
{{#unless brands}}
<div class="multi-brands">
<h2>品牌一览</h2>
<div class="multi-browse swiper-container">
<ul class="swiper-wrapper">
{{#each multiList}}
<li class="swiper-slide brand-img">
<a href="{{url}}">
<img src="{{img}}">
</a>
<p>{{brandName}}</p>
</li>
{{/each}}
</ul>
</div>
</div>
{{/unless}}
<ul class="spring">
{{#each spring}}
<li>
<div class="banner-area">
{{# bannerTop}}
{{> home/banner_top}}
{{/ bannerTop}}
</div>
<ul class="spring">
{{#each spring}}
<li>
<a href="{{url}}">
<img src="{{springType}}">
</li>
{{/each}}
</ul>
</a>
</li>
{{/each}}
</ul>
{{! 热门品类}}
{{# hotCategory}}
{{> home/hot_category}}
{{/ hotCategory}}
{{! 热门品类}}
{{# hotCategory}}
{{> home/hot_category}}
{{/ hotCategory}}
<div class="title">
人气单品
<a class="more" href="{{more_url}}">&#xe618;</a>
</div>
<ul class="product-list">
{{#each hotList}}
<li>
<img src="{{listUrl}}">
<div class="list-price">
<p>VANS AP M BERZE</p>
<p><span class="red">{{originalPrice}}</span>
<span>{{presentPrice}}</span>
</p>
</div>
</li>
{{/each}}
</ul>
<div class="title">
人气单品
<a class="more" href="{{more_url}}">&#xe618;</a>
</div>
<ul class="product-list">
{{#each hotList}}
<li>
<a href="{{url}}">
<img src="{{listUrl}}">
</a>
<div class="list-price">
<p>VANS AP M BERZE</p>
<p><span class="red">{{originalPrice}}</span>
<span>{{presentPrice}}</span>
</p>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="discount-area">
<div class="discount-area">
{{> product/goods-nav-top}}
</div>
</li>
<li id="new-arrival" class="main list hide"></li>
</div>
</div>
<div id="new-arrival" class=""></div>
<div id="popularity" class=""></div>
<li id="popularity" class="main list hide"></li>
</ul>
</div>
{{> product/shop-footer}}
<ul id="pos-nav" class="nav home-nav">
<li class="active">
<a href="#" tab="home-page" class="color" >首页</a>
</li>
<li>
<a href="#" tab="new-arrival">上新</a>
</li>
<li>
<a href="#" tab="popularity">人气</a>
</li>
<ul id="pos-nav" class="nav hide">
<li class="active color">首页</li>
<li>上新</li>
<li>人气</li>
<li>
<a href="#" target="_blank">全部商品</a>
</li>
</ul>
<ul id="pos-list" class="nav hide">
<li>最新</li>
<li>价格</li>
<li>折扣</li>
<li>筛选</li>
<ul id="pos-list" class="nav hide discount-area">
{{> product/goods-nav-top}}
</ul>
</div>
{{/ shopIndex}}
... ...
... ... @@ -334,20 +334,17 @@
seajs.use('js/me/currency');
</script>
{{/if}}
{{#if currencyPage}}
<script>
seajs.use('js/me/currency-new');
</script>
{{/if}}
{{!-- 品牌分类 --}}
{{#if productCategoryPage}}
<script>
seajs.use('js/product/product-category');
</script>
{{/if}}
{{!-- 品牌店铺首页 --}}
{{#if shopPage}}
<script>
... ...
... ... @@ -170,8 +170,6 @@ class ListModel
// 调用接口查询数据
$brandLogo = BrandData::getBrandLogo($id);
var_dump($brandLogo);
exit;
// 处理返回的数据
if (isset($brandLogo['data'][0])) {
$result = array(
... ... @@ -346,7 +344,7 @@ class ListModel
}
/**
* @param $data 传入的从接口传来的数据
* @param $data
* @return array 返回的处理好的数据
* @author chengyao.guo
*/
... ... @@ -358,18 +356,27 @@ class ListModel
foreach ($data as &$item) {
array_push($result['class'], array('name' => $item['category_name']));
foreach ($item['sub'] as &$item2) {
$item2['url'] = Helpers::url(''); // tar mark 还不知道链接是啥样的
$item2['url'] = Helpers::url('/product/index/index',array(
'shop_id' => '326'
)); // tar mark 还不知道链接是啥样的
}
array_push($result['category'], array('subcategory' => $item['sub']));
}
return $result;
}
/**
* 店铺所有品牌信息处理
* @author chengyao.guo
* @param $data
* @return mixed
*/
public static function brandData($data)
{
// 处理图片链接
foreach ($data as &$item) {
$item['brand_ico'] = Images::getImageUrl($item['brand_ico'], 0, 0);
$item['url'] = Helpers::url('',array(),$item['brand_domain']);
}
return $data;
}
... ...
... ... @@ -4,6 +4,7 @@ use Action\AbstractAction;
use Plugin\Helpers;
use LibModels\Wap\Product\ShopData;
use Product\ListModel;
use Plugin\Mobile;
/**
* 商品列表相关的控制器
... ... @@ -27,6 +28,7 @@ class IndexController extends AbstractAction
{
// 过滤请求参数
$condition = filter_input_array(INPUT_GET, array(
'shop_id'=>FILTER_DEFAULT,
'brand' => FILTER_DEFAULT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_DEFAULT,
... ... @@ -39,6 +41,10 @@ class IndexController extends AbstractAction
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
// 转义店铺
if (isset($condition['shop_id'])) {
$condition['shop_id'] = rawurldecode($condition['shop_id']);
}
// 转义品牌
if (isset($condition['brand'])) {
$condition['brand'] = rawurldecode($condition['brand']);
... ... @@ -143,6 +149,7 @@ class IndexController extends AbstractAction
/* 过滤请求参数 */
$condition = filter_input_array(INPUT_GET, array(
'shop_id' => FILTER_DEFAULT,
'sort' => FILTER_DEFAULT,
'msort' => FILTER_DEFAULT,
'misort' => FILTER_DEFAULT,
... ... @@ -154,6 +161,10 @@ class IndexController extends AbstractAction
'gender' => FILTER_DEFAULT,
'p_d' => FILTER_DEFAULT,), false);
$condition['brand'] = $brandId;
// 转义店铺
if (isset($condition['shop_id'])) {
$condition['shop_id'] = rawurldecode($condition['shop_id']);
}
// 转义分类
if (isset($condition['sort'])) {
$condition['sort'] = rawurldecode($condition['sort']);
... ... @@ -231,7 +242,7 @@ class IndexController extends AbstractAction
}
/**
* 店铺全部品牌页面
* 店铺全部品牌页面
* @author chengyao.guo
* @return mixed
*/
... ... @@ -248,6 +259,12 @@ class IndexController extends AbstractAction
if($resource['code'] === 200){
$result = ListModel::brandData($resource['data']);
}
// ShopData::debugOut($resource);
if(Mobile::isMobile()){
$this->setTitle('品牌');
}else{
$this->setNavHeader('品牌', true, SITE_MAIN);
}
return $this->_view->display('brand', array(
'content' => $result,
));
... ... @@ -272,6 +289,12 @@ class IndexController extends AbstractAction
if ($resource['code'] === 200) {
$result = ListModel::categoryData($resource['data']);
}
if(Mobile::isMobile()){
$this->setTitle('品类');
}else{
$this->setNavHeader('品类', true, SITE_MAIN);
}
// ShopData::debugOut($resource);
return $this->_view->display('category', array(
'productCategoryPage' => true,
'content' => $result,
... ... @@ -296,126 +319,16 @@ class IndexController extends AbstractAction
if ($resource['code'] === 200) {
$result = $resource['data'];
}
if(Mobile::isMobile()){
$this->setTitle('店铺简介');
}else{
$this->setNavHeader('店铺简介', true, SITE_MAIN);
}
// ShopData::debugOut($resource);
return $this->_view->display('intro', array(
'content' => $result,
));
}
/**
* 店铺内全部商品页面
* @author chengyao.guo
* @return mixed
*/
public function allProductAction()
{
$result = array();
return $this->_view->display('allproduct', array(
'content' => $result,
));
}
/**
* 店铺分类品类页数据模拟
*
* @return array
*/
public function getCategoryContent()
{
return array(// 数据模拟
'class' => array(
array(
'name' => '上衣',
),
array(
'name' => '裤装',
),
array(
'name' => '鞋靴',
),
array(
'name' => '包类',
)
),
'category' => array(
array(
'subcategory' => array(
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '上衣衣1'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '上衣衣2'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '上衣衣3'
),
)
),
array(
'subcategory' => array(
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '裤装1'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '裤装2'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '裤装3'
),
)
),
array(
'subcategory' => array(
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '鞋靴1'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '鞋靴2'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '鞋靴3'
)
)
),
array(
'subcategory' => array(
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '包类1'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '包类2'
),
array(
'url' => 'http://img02.yohoboys.com/staticimg/2016/04/20/16/029d5f3c8dcb63249ac9bf42e7cf9c190c.jpg',
'name' => '包类3'
)
)
)
)
);
}
/**
* 店铺简介数据模拟
*
* @return array
*/
public function getIntroContent()
{
return array(// 数据模拟
);
}
}
... ...
... ... @@ -17,25 +17,47 @@ class ShopController extends AbstractAction
*/
public function indexAction()
{
$data = array(
'branerImg' => '',
'branerImg' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026e96d1b403d28407650c7228bb4ca405.jpg?imageView2/2/w/640/h/200',
'goodList' => 'http://www.baidu.com',
'brands' => false,
'brandImg' => array(
'multiList' => array(
array(
'brandType' => ''
'url' => '',
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403',
'brandName' => '123re34456556900'
),
array(
'brandType' => ''
)
'url' => '',
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403',
'brandName' => '123re344565'
),
array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/18/05/026b9aee5b7d2ec33e8db877c3d87b3386.jpg?imageView2/2/w/640/h/403',
'brandName' => '123re344565'
)
),
'bannerTop' => array(
'list' => array(
array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
),
array(
'url' => '',
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
),
)
),
'preferential' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'spring' => array(
array(
'url' => '',
'springType' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/29/08/01ea96f5fd2ea8ef99d37d00f39d8e57f0.jpg?imageView/2/w/275/h/160'
),
array(
'url' => '',
'springType' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/29/08/019c44dcf0a93e9f3afe2fbec0d1961046.jpg?imageView/2/w/275/h/160'
)
),
... ... @@ -43,7 +65,7 @@ class ShopController extends AbstractAction
'name' => '热门品类',
'list' => array(
array(
'url' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/29/08/019c44dcf0a93e9f3afe2fbec0d1961046.jpg?imageView/2/w/275/h/160',
'url' => 'http://img12.static.yhbimg.com/yhb-img01/2016/04/15/02/0295b83dc3bcef5bd59f339841f9ee92d1.jpg?imageView2/2/w/640/h/403',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/29/08/019c44dcf0a93e9f3afe2fbec0d1961046.jpg?imageView/2/w/275/h/160',
),
array(
... ... @@ -78,6 +100,7 @@ class ShopController extends AbstractAction
),
'hotList' => array(
array(
'url' => '',
'listUrl' => 'http://img11.static.yhbimg.com/goodsimg/2016/04/07/07/0147c904336407bb9f4008bfda7920b9bd.jpg?imageMogr2/thumbnail/276x366/extent/276x366/background/d2hpdGU=/position/center/quality/80',
'originalPrice' => '¥599.00',
'presentPrice' => '¥399.00'
... ... @@ -178,6 +201,36 @@ class ShopController extends AbstractAction
'is_limited' => false
),
'is_soon_sold_out' => false
),
array(
'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html',
'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314',
'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣',
'salePrice' => '759.00',
'price' => '799.00',
'tags' => array(
'is_new' => true,
'is_advance' => false,
'is_discount' => false,
'is_yohoood' => false,
'is_limited' => false
),
'is_soon_sold_out' => false
),
array(
'url' => 'http://m.yohobuy.com/product/pro_320421_412063/SYSTAGYuanLingWeiYiSYSA601HC09.html',
'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/12/07/09/01ced0e2ed6a4f2a6d95be70cd0a6c5a56.jpg?imageView/2/w/235/h/314',
'name' => 'NEFF ONE OF US RAGLAN L/S 男款森林风连帽卫衣',
'salePrice' => '759.00',
'price' => '799.00',
'tags' => array(
'is_new' => true,
'is_advance' => false,
'is_discount' => false,
'is_yohoood' => false,
'is_limited' => false
),
'is_soon_sold_out' => false
)
)
);
... ...