Authored by 周少峰

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into feature/web-list

... ... @@ -42,4 +42,30 @@ class IndexData
$params['client_secret'] = Sign::getSign($params);
return Yohobuy::get(Yohobuy::SERVICE_URL . self::URL_OPERATIONS_RESOURCE_GET, $params);
}
/**
* 邮箱订阅
*
* @param string $email
* @param string $uid
* @return array
*/
public static function emailSubscriber($email, $uid = 0)
{
//TODO 走老接口
// 构建必传参数
$param = Yohobuy::param();
$param['page'] = 1;
$param['open_key'] = '12345';
$param['method'] = 'open.subscriber.subscriber';
$param['email'] = $email;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
unset($param['app_version']);
unset($param['client_type']);
unset($param['os_version']);
unset($param['screen_size']);
unset($param['v']);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}
\ No newline at end of file
... ...
... ... @@ -26,6 +26,11 @@ var $chosePanel = $('#chose-panel'),
hasChooseSize,
$curSizeBlock,
$sizeRowList,
$curColorBlock,
$colorRowList,
$curSizeRow,
$curColorRow,
rowIndex,
cbFn,
$allChoseItems,
queryString,
... ... @@ -41,7 +46,13 @@ function init() {
$imgsThumb = $('.chose-panel').find('.thumb');
$allChoseItems = $('.chose-items');
$sizeRowList = $('.size-list ul');
$colorRowList = $('.color-list ul');
$leftNum = $('#left-num');
$curSizeRow = $sizeRowList.eq(0);
$curColorRow = $colorRowList.eq(0);
rowIndex = 0;
curColorIndex = 0;
curSizeIndex = 0;
}
function checkColorSizeNum() {
... ... @@ -107,36 +118,23 @@ function updateConformButtonClassAndText() {
}
}
//重置颜色块的库存为0的样式
function resetColorZeroStock($siblingBlock) {
var numArray,
i;
if (!hasChooseSize) {
$siblingBlock.find('ul>li').each(function() {
if (0 === $(this).data('num')) {
$(this).addClass('zero-stock');
} else {
$(this).removeClass('zero-stock');
}
});
//显示剩余件数
function displayGoodNum(curGoodNum) {
} else {
numArray = ($curSizeBlock.data('numstr') + '').split('/');
for (i = 0; i < numArray.length; i++) {
if ('0' === numArray[i]) {
$siblingBlock.find('.block').eq(i).addClass('zero-stock');
} else {
$siblingBlock.find('.block').eq(i).removeClass('zero-stock');
}
//数量大于0
if (curGoodNum > 0) {
if ($soonSoldOut.length > 0) {
$allChoseItems.find('.num .left-num').html('即将售罄');
} else {
$allChoseItems.find('.num .left-num').html('剩余' + curGoodNum + '件');
}
}
}
// 选择了颜色切换商品图片
function changeGoodImgWhenClickColor() {
if (hasChooseColor && curColorIndex >= 0) {
$imgsThumb.addClass('hide').eq(curColorIndex).removeClass('hide');
$leftNum.val(curGoodNum);
//数量小于0
} else {
$allChoseItems.find('.num .left-num').html('');
$leftNum.val(0);
}
}
... ... @@ -157,35 +155,37 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
var $this = $(this),
index,
curSizeBlock,
$preSiblingBlock,
$curSizeRow,
numArray,
i,
curGoodNum;
var $siblingBlock = $this.closest('.block-list').siblings(':first');
$this.siblings('.chosed').removeClass('chosed');
index = $this.index();
$preSiblingBlock = $siblingBlock.find('.chosed');
$curSizeRow = $sizeRowList.eq(index);
// 当前颜色已经是选中状态,再点击时
if ($this.hasClass('chosed')) {
//颜色原来已经是勾选时,要清空剩余件数的提示
//清空剩余件数的提示
$allChoseItems.find('.num .left-num').html('');
$leftNum.val(0);
hasChooseColor = false;
$this.removeClass('zero-stock');
if ($curSizeBlock) {
numArray = ($curSizeBlock.data('numstr') + '').split('/');
for (i = 0; i < numArray.length; i++) {
if ('0' === numArray[i]) {
$('.color-list .block').eq(i).addClass('zero-stock');
}
//当前尺码行隐藏
$sizeRowList.eq(curSizeIndex).removeClass('show').addClass('hide');
//目标尺码行显示
$sizeRowList.eq(0).removeClass('hide').addClass('show');
curSizeIndex = 0;
//如果尺码已经是选择状态
if (curColorIndex) {
// 之前选中的尺码去掉勾选样式,新尺码块勾选
if ($curSizeBlock && $curSizeBlock.length > 0) {
$curSizeBlock.removeClass('chosed');
curSizeBlock = $sizeRowList.eq(0).children().get(curColorIndex - 1);
$curSizeBlock = $(curSizeBlock);
curGoodNum = $curSizeBlock.data('num');
$curSizeBlock.addClass('chosed');
}
}
... ... @@ -193,106 +193,115 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
} else {
hasChooseColor = true;
//把当前选中颜色对应的尺码那一行显示出来
$sizeRowList.addClass('hide');
$curSizeRow.removeClass('hide').addClass('show');
//如果尺码已经是选择状态
if (curColorIndex) {
// 之前选中的尺码去掉勾选样式
if ($preSiblingBlock.length > 0) {
$preSiblingBlock.removeClass('chosed');
curSizeBlock = $curSizeRow.children().get(curSizeIndex);
$curSizeBlock = $(curSizeBlock);
}
// 之前选中的尺码去掉勾选样式,新尺码块勾选
if ($curSizeBlock && $curSizeBlock.length > 0) {
$curSizeBlock.removeClass('chosed');
// 当前选中颜色对应的尺码行,其对应的尺码加上勾选样式 (前提是要判断下这个尺码是否存在)
if (curSizeBlock) {
curGoodNum = $(curSizeBlock).data('num');
$(curSizeBlock).addClass('chosed');
//如果当前有尺码被选中,且数量等于0,则颜色块添加数量为0的样式
if (curGoodNum > 0) {
if ($soonSoldOut.length > 0) {
$allChoseItems.find('.num .left-num').html('即将售罄');
} else {
$allChoseItems.find('.num .left-num').html('剩余' + curGoodNum + '件');
}
$leftNum.val(curGoodNum);
} else {
$allChoseItems.find('.num .left-num').html('');
$leftNum.val(0);
//curSizeBlock = $sizeRowList.eq(curSizeIndex + 1).children().get(curColorIndex - 1);
curSizeBlock = $sizeRowList.eq(index + 1).children().get(curColorIndex - 1);
$curSizeBlock = $(curSizeBlock);
curGoodNum = $curSizeBlock.data('num');
$curSizeBlock.addClass('chosed');
}
}
// 显示剩余数量
displayGoodNum(curGoodNum);
// 尺码行当前行隐藏
$sizeRowList.eq(curSizeIndex).removeClass('show').addClass('hide');
//尺码对应行显示
$sizeRowList.eq(index + 1).removeClass('hide').addClass('show');
curSizeIndex = index + 1;
$curColorBlock = $this;
// 修改颜色时修改商品图片
$imgsThumb.addClass('hide').eq(index).removeClass('hide');
}
// 当前颜色块 切换勾选样式
$this.toggleClass('chosed');
curColorIndex = index;
$('#good-num').val(1);
// 修改颜色时修改商品图片
changeGoodImgWhenClickColor();
// 设置按钮的样式和文字
updateConformButtonClassAndText();
}).on('touchstart', '.size-list .block', function() {
var $this = $(this),
index,
$curSizeRow,
curColorBlock,
curGoodNum;
var $siblingBlock = $this.closest('.block-list').siblings(':first');
$this.siblings('.chosed').removeClass('chosed');
index = $this.index();
$curSizeRow = $sizeRowList.eq(index);
// 当前尺码已经是选中状态,再点击时
if ($this.hasClass('chosed')) {
//尺码原来已经是勾选时,要清空剩余件数的提示
//清空剩余件数的提示
$allChoseItems.find('.num .left-num').html('');
$('#left-num').val(0);
$leftNum.val(0);
hasChooseSize = false;
curSizeIndex = null;
$curSizeBlock = null;
//当前颜色行隐藏
$colorRowList.eq(curColorIndex).removeClass('show').addClass('hide');
//目标颜色行显示
$colorRowList.eq(0).removeClass('hide').addClass('show');
curColorIndex = 0;
//如果颜色已经是选择状态
if (curSizeIndex) {
// 之前选中的颜色去掉勾选样式,新颜色块勾选
if ($curColorBlock && $curColorBlock.length > 0) {
$curColorBlock.removeClass('chosed');
curColorBlock = $colorRowList.eq(0).children().get(curSizeIndex - 1);
$curColorBlock = $(curColorBlock);
curGoodNum = $curColorBlock.data('num');
$curColorBlock.addClass('chosed');
}
}
// 当前尺码不是选中状态,选中时
} else {
hasChooseSize = true;
curGoodNum = $this.data('num');
// 之前选中的尺码去掉勾选样式
if ($curSizeBlock) {
$curSizeBlock.removeClass('chosed');
}
//如果颜色已经是选择状态
if (curSizeIndex) {
// 如果当前有尺码被选中,且数量等于0, 否则显示剩余件数
if (curGoodNum > 0 && hasChooseColor) {
if ($soonSoldOut.length > 0) {
$allChoseItems.find('.num .left-num').html('即将售罄');
} else {
$allChoseItems.find('.num .left-num').html('剩余' + curGoodNum + '件');
// 之前选中的颜色去掉勾选样式,新颜色块勾选
if ($curColorBlock && $curColorBlock.length > 0) {
$curColorBlock.removeClass('chosed');
curColorBlock = $colorRowList.eq(index + 1).children().get(curSizeIndex - 1);
$curColorBlock = $(curColorBlock);
curGoodNum = $curColorBlock.data('num');
$curColorBlock.addClass('chosed');
}
$('#left-num').val(curGoodNum);
} else {
$allChoseItems.find('.num .left-num').html('');
$('#left-num').val(0);
}
if (curGoodNum === 0 && hasChooseColor) {
$this.addClass('zero-stock');
}
curSizeIndex = index;
// 显示剩余数量
displayGoodNum(curGoodNum);
// 颜色当前行隐藏
$colorRowList.eq(curColorIndex).removeClass('show').addClass('hide');
//颜色对应行显示
$colorRowList.eq(index + 1).removeClass('hide').addClass('show');
curColorIndex = index + 1;
$curSizeBlock = $this;
}
$this.toggleClass('chosed');
$('#good-num').val(1);
// 重置颜色块的样式
resetColorZeroStock($siblingBlock);
// 设置按钮的样式和文字
updateConformButtonClassAndText();
});
... ...
... ... @@ -215,6 +215,7 @@
background-size:100% 100%;
position: relative;
top: .36rem;
margin-right: pxToRem(12px);
}
&.highlight {
background: #eee;
... ...
... ... @@ -19,24 +19,33 @@
<div class="chose-items">
<div class="color-list block-list">
<span>颜色</span>
<ul class="clearfix" data-type="color">
<!--<ul class="clearfix" data-type="color">
{{# colors}}
<li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-id="{{id}}" data-numstr="{{sizeNumStr}}" data-skcid="{{skcId}}">
{{name}}
</li>
{{/ colors}}
</ul>-->
{{# colors}}
<ul class="size-row clearfix {{#unless @first}}hide{{/if}}">
{{# color}}
<li class="block {{#if chosed}}chosed{{/if}} {{#unless colorNum}}zero-stock{{/unless}}" data-num="{{colorNum}}" data-id="{{id}}" data-numstr="{{sizeNumStr}}" data-skcid="{{skcId}}">
{{name}}
</li>
{{/ color}}
</ul>
{{/ colors}}
</div>
<div class="size-list block-list">
<span>尺码</span>
{{# sizes}}
<ul class="size-row clearfix {{#unless @first}}hide{{/if}}">
{{# size}}
<li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}">
{{name}}
</li>
{{/ size}}
</ul>
<ul class="size-row clearfix {{#unless @first}}hide{{/if}}">
{{# size}}
<li class="block {{#if chosed}}chosed{{/if}} {{#unless sizeNum}}zero-stock{{/unless}}" data-id="{{id}}" data-colorid="{{colorId}}" data-num="{{sizeNum}}" data-numstr="{{colorNumStr}}" data-skuid="{{skuId}}" data-goodid="{{goodsId}}">
{{name}}
</li>
{{/ size}}
</ul>
{{/ sizes}}
<!--{{#if defaultSizes}}
... ... @@ -69,5 +78,5 @@
</div>
</div>
</div>
{{/cartInfo}}
{{/cartInfo}}
<input id="promotionId" type="hidden" value="{{promotionId}}">
\ No newline at end of file
... ...
... ... @@ -104,7 +104,7 @@
{{/thirdnav}}
</div>
</div>
<div class="showdetail" data-code="220eec926e0d2c48b2f7e36fb9c42b83">
<div class="showdetail" data-code="{{content_code}}">
<a href="http://list.yohobuy.com/?gender=1,3&amp;msort=8">
<img src="http://img12.static.yhbimg.com/yhb-img01/2015/10/30/06/02af834d146e3f00b1f5fcc8388f641922.jpg?imageView/1/w/337/h/250" alt="" style=""></a>
<a class="title" href="http://list.yohobuy.com/?gender=1,3&amp;msort=8">热门小物优选</a>
... ...
... ... @@ -6,9 +6,9 @@
<div class="sale-group-big clearfix">
{{#brandSale}}
{{#big}}
<a class="item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="{{link}}">
<a class="item pull-left" href="{{link}}">
<div class="pic">
<img class="" src="{{img}}">
<img src="{{img}}">
<div class="time">{{time}}</div>
</div>
<div class="detail">
... ... @@ -24,6 +24,17 @@
</div>
</a>
{{/big}}
</div>
<div class="sale-group clearfix">
{{#normal}}
<a class="item pull-left" href="{{link}}">
<img class="pic" src="{{img}}">
<div class="detail">
<div class="title">{{title}}</div>
<div class="time">{{time}}</div>
</div>
</a>
{{/normal}}
{{/brandSale}}
</div>
... ...
... ... @@ -472,7 +472,7 @@ function actionGoodsCart() {
return false;
}
key = encodeURI(key);
$.get(searchDomain + '?callback=?&query=' + key, function(htmlData) {
$.get(searchDomain + '?query=' + key, function(htmlData) {
$('.search-list').html(htmlData.data);
queryNum = $('.search-list').children('li').length;
listIndex = -1;
... ... @@ -486,7 +486,7 @@ function actionGoodsCart() {
}, function() {
$(this).css('background-color', '#fff');
});
}, 'jsonp');
}, 'json');
}
function getText(obj) {
... ... @@ -855,7 +855,7 @@ function createNewArray(obj) {
var $that = $(this);
var $alink = $that.find('a');
var _href = $alink.attr('href');
var hottag = $alink.attr('hot') === 'true' ? true : false;
var hottag = $alink.attr('hot') === 'hot' ? true : false;
var objt = {};
if ($that.hasClass('category-title')) {
... ... @@ -1050,7 +1050,35 @@ function actionNav() {
});
}
/**
* 获取三级导航的tip图标
* @return {[type]} [description]
*/
function actionTipPic() {
var tipscode = {};
var $contentcode = '';
var serverApi = 'http://www.yohobuy.com/common/getbanner?content_code=';
var $img = '';
var $title = '';
var $link = '';
$(document).on('mouseenter', '.sub-nav-item', function() {
$contentcode = $(this).find('.showdetail').attr('data-code');
if ($contentcode) {
if (!tipscode[$contentcode]) {
tipscode[$contentcode] = $contentcode;
$img = $(this).find('.showdetail').find('img');
$title = $(this).find('.showdetail').find('.title');
$link = $(this).find('.showdetail').find('a');
$.get(serverApi + $contentcode + '&width=337&height=250&client_type=web', function(rsdata) {
$img.attr('src', rsdata.data.src);
$link.attr('href', rsdata.data.url);
$title.text(rsdata.data.title);
}, 'jsonp');
}
}
});
}
/**
* 查询跳转后保留关键字
... ... @@ -1502,7 +1530,7 @@ function actionExeTemplate() {
* @return {[type]} [description]
*/
function actionSearch() {
var searchDomain = 'http://search.yohobuy.com/api/suggest';
var searchDomain = 'http://search.yohobuy.com/product/search/suggest';
$('#query_key').search(searchDomain);
}
... ... @@ -1656,6 +1684,7 @@ function actionLoginInfo() {
*/
function init() {
actionNav(); //处理导航
actionTipPic(); //鼠标移入后查询
actionExeTemplate(); //处理模板
actionInitCookie(); //初始化cookie
actionExeCookieMap(); //格式化cookie
... ... @@ -4782,17 +4811,19 @@ var $cr = $('#country-code-hide'),
emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/,
acAccount = [
['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com',
'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序
'sohu.com', 'hotmail.com', '139.com', '189.com'
], //数字顺序
['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com',
'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序
'sohu.com', 'hotmail.com', '139.com', '189.com'
] //组合顺序
],
$ccList = $('#country-code-list'),
$cc = $('#country-code'),
$btn = $('#find-btn'),
$accErr = $('#account-err'),
$caErr = $('#captcha-err'),
time, //timeout-id
caCount = 4, //验证码位数
time, //timeout-id
caCount = 4, //验证码位数
hasPh = false,
hasCa = false;
... ... @@ -4810,8 +4841,9 @@ require("jquery.placeholder");
function imgcode() {
var time = new Date(),
$captchaImg = $('#captcha-img'),
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
$captchaImg = $('#captcha-img'),
captchaImgSrc = $captchaImg.attr('src').split('?')[0];
$('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime());
//getSource('yoho_family_web', '换一张', 'homepage_man');
... ... @@ -4869,8 +4901,8 @@ function vaCa() {
type: 'POST',
url: '/passport/back/authcode',
data: {
verifyCode: v,
phoneNum: $('#phone-num').val(),
verifyCode: v,
phoneNum: $('#phone-num').val(),
area: $('#country-code-hide').val()
}
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
... ... @@ -720,6 +720,35 @@ function actionNav() {
});
}
/**
* 获取三级导航的tip图标
* @return {[type]} [description]
*/
function actionTipPic() {
var tipscode = {};
var $contentcode = '';
var serverApi = 'http://www.yohobuy.com/common/getbanner?content_code=';
var $img = '';
var $title = '';
var $link = '';
$(document).on('mouseenter', '.sub-nav-item', function() {
$contentcode = $(this).find('.showdetail').attr('data-code');
if ($contentcode) {
if (!tipscode[$contentcode]) {
tipscode[$contentcode] = $contentcode;
$img = $(this).find('.showdetail').find('img');
$title = $(this).find('.showdetail').find('.title');
$link = $(this).find('.showdetail').find('a');
$.get(serverApi + $contentcode + '&width=337&height=250&client_type=web', function(rsdata) {
$img.attr('src', rsdata.data.src);
$link.attr('href', rsdata.data.url);
$title.text(rsdata.data.title);
}, 'jsonp');
}
}
});
}
/**
* 查询跳转后保留关键字
... ... @@ -1325,6 +1354,7 @@ function actionLoginInfo() {
*/
function init() {
actionNav(); //处理导航
actionTipPic(); //鼠标移入后查询
actionExeTemplate(); //处理模板
actionInitCookie(); //初始化cookie
actionExeCookieMap(); //格式化cookie
... ...
... ... @@ -55,20 +55,13 @@
}
.brand-sale {
.sale-group-big {
.item {
width: 377px;
margin-right: 10px;
&.first,
&.last {
width: 376px;
}
width: 1150px + 8px;
&.last {
margin-right: 0;
}
.item {
width: 378px;
margin-right: 8px;
margin-bottom: 10px;
}
.pic {
... ... @@ -95,7 +88,7 @@
}
.brand {
margin: 24px 10px;
margin: 24px 10px 0;
}
.text {
... ... @@ -112,7 +105,36 @@
font-size: 40px;
}
}
}
.sale-group {
width: 1150px + 8px;
.item {
width: 185px;
margin-right: 8px;
margin-bottom: 10px;
}
.pic {
width: 100%;
display: block;
}
.detail {
padding: 14px 10px;
background: #f5f5f5;
text-align: center;
line-height: 20px;
}
.title {
font-size: 12px;
}
.time {
font-size: 14px;
}
}
}
}
... ...
... ... @@ -72,6 +72,12 @@ class Bootstrap extends Bootstrap_Abstract
$action = 'Index';
// 二级域名
if (2 === $level) {
$url = strtolower($dispatcher->getRequest()->getRequestUri());
if(empty($url) || $url == '/index' || $url == '/') {
$urlAction = '/index';
} else {
$urlAction = $url;
}
$subDomain = strval($hostParts[0]);
switch (strtolower($subDomain)) {
case 'www': // 主站
... ... @@ -80,17 +86,18 @@ class Bootstrap extends Bootstrap_Abstract
case 'web':
break;
case 'search': // 搜索
$searchRequest = new Yaf\Request\Http('/product/search/index');
$dispatcher->setRequest($searchRequest);
if($urlAction == '/index') {
$searchRequest = new Yaf\Request\Http('/product/search/index');
$dispatcher->setRequest($searchRequest);
}
break;
case 'guang': // 逛
$module = 'Guang';
break;
case 'list': // 商品列表
$module = 'Product';
$url = strtolower($dispatcher->getRequest()->getRequestUri());
//list列表的index
if(empty($url) || $url == '/index' || $url == '/') {
if($urlAction == '/index') {
$listRequest = new Yaf\Request\Http('/product/list/index');
$dispatcher->setRequest($listRequest);
}
... ...
... ... @@ -6,6 +6,7 @@ use Plugin\Cache;
use Configs\CacheConfig;
use Api\Yohobuy;
use Plugin\Images;
use Plugin\Helpers;
class CommonController extends WebAction
{
... ... @@ -118,4 +119,24 @@ class CommonController extends WebAction
}
return $this->helpJsonCallbackResult($callback, $data['code'], $data['message'], $banner);
}
/**
* 获取邮件订阅
*
* @return jsonp
*/
public function emailsubscriberAction()
{
$callback = $this->get('callback', '');
$email = $this->get('email', '');
$uid = intval($this->get('uid', '0'));
$data = array();
//验证邮件
if(Helpers::verifyEmail($email)) {
$data = IndexData::emailSubscriber($email, $uid);
return $this->helpJsonCallbackResult($callback, $data['code'], $data['message'], $data['data']);
} else {
return $this->helpJsonCallbackResult($callback, 403, '订阅失败', '');
}
}
}
\ No newline at end of file
... ...
... ... @@ -54,7 +54,7 @@ class Sale1Controller extends WebAction
'brandSale' => array(
'big' => array(
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/378/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
... ... @@ -62,7 +62,7 @@ class Sale1Controller extends WebAction
'discount' => '70%',
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/378/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
... ... @@ -70,7 +70,7 @@ class Sale1Controller extends WebAction
'discount' => '70%',
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/378/h/400',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62',
... ... @@ -78,7 +78,80 @@ class Sale1Controller extends WebAction
'discount' => '70%',
)
),
'normal' => array()
'normal' => array(
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
),
array(
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/185/h/180',
'link' => 'http://www.yohobuy.com',
'time' => '低于1小时',
'title' => '2015春夏海量大促!'
)
)
)
);
$this->setWebNavHeader();
... ...
... ... @@ -18,3 +18,10 @@ routes.productgetProductPic.match = "/getProductPic"
routes.productgetProductPic.route.module = Product
routes.productgetProductPic.route.controller = List
routes.productgetProductPic.route.action = getProductPic
;api(search api suggest)
routes.searchsuggest.type = "rewrite"
routes.searchsuggest.match = "/api/suggest"
routes.searchsuggest.route.module = Product
routes.searchsuggest.route.controller = Search
routes.searchsuggest.route.action = suggest
... ...