Authored by hf

modify guang page generate url use url()

Showing 49 changed files with 233 additions and 184 deletions
... ... @@ -7,3 +7,5 @@ compile/
assets/
script/nginx/logs
npm-debug.log
composer.lock
vendor/
... ...
... ... @@ -11,7 +11,7 @@
{
"name": "fei.hong",
"email": "fei.hong@yoho.cn",
"homepage": "www.yoho.cn"
"homepage": "http://www.yoho.cn"
}
],
"require": {
... ...
... ... @@ -357,7 +357,6 @@ class AbstractAction extends Controller_Abstract
}
// 未登录
else {
$footer = array();
$footer['loginUrl'] = '/signin.html'; // 登录链接
$footer['signupUrl'] = '/reg.html'; // 注册链接
}
... ... @@ -377,18 +376,6 @@ class AbstractAction extends Controller_Abstract
}
/**
* 返回顶部软件下载有关数据
* @return array 下载有关数据
*/
protected function getHeaderDownload()
{
return array(
'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
'url' => 'http://www.baidu.com'
);
}
/**
* 设置首页以及频道页顶部信息
*
* @return void
... ... @@ -400,18 +387,4 @@ class AbstractAction extends Controller_Abstract
$this->_view->assign('homeHeader', $header);
}
/**
* 返回顶部软件下载有关数据
* @return array 下载有关数据
*/
protected function setHeaderDownload()
{
$download = array(
'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
'url' => 'http://www.baidu.com'
);
$this->_view->assign('headerDownload', $download);
}
}
... ...
... ... @@ -8,13 +8,14 @@ var $ = require('yoho.zepto'),
Swiper = require('yoho.iswiper'),
lazyLoad = require('yoho.zeptolazyload');
var swiper;
var swiper,
$brandList = $('.brand-list');
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
loop: true,
autoplay: 3000,
pagination: '.swiper-pagination'
pagination: '.swiper-pagination .pagination-inner'
});
lazyLoad($('img.lazy'));
... ... @@ -22,4 +23,27 @@ $('.yoho-header').css({
'z-index': 2,
position: 'fixed'
});
$('.banner-top').css('padding-top', '90px');
\ No newline at end of file
$('.banner-top').css('padding-top', '90px');
if ($brandList.length > 0) {
$(window).scroll(function() {
var scrTop = $(window).scrollTop(),
searchH = $('.newbrand-search').height(),
headerH = $('.yoho-header').height(),
brandSwipe = parseInt(searchH) + parseInt(headerH);
$('.brand-list').each(function() {
var offTop = $(this).offset().top - brandSwipe;
if (scrTop >= offTop) {
$brandList.find('.title-bar').css('position', 'static');
$(this).find('.title-bar').css({
position: 'fixed',
top: brandSwipe
});
} else {
$(this).find('.title-bar').css('position', 'static');
}
});
});
}
... ...
... ... @@ -15,7 +15,7 @@ $('#search-input').focus(function() {
$(this).blur();
});
$nav.delegate('li', 'touchstart', function() {
$nav.delegate('li', 'tap', function() {
var $this = $(this),
index = $this.index();
... ... @@ -30,7 +30,7 @@ $nav.delegate('li', 'touchstart', function() {
$curContent = $contents.eq(index).removeClass('hide');
});
$('.primary-level').delegate('li', 'touchstart', function() {
$('.primary-level').delegate('li', 'tap', function() {
var $this = $(this),
index = $this.index();
... ...
... ... @@ -56,7 +56,7 @@ info.initInfosEvt($infoList);
});
}());
$nav.delegate('.guang-nav-item', 'touchstart', function() {
$nav.delegate('.guang-nav-item', 'tap', function() {
var $this = $(this),
$content,
index;
... ...
... ... @@ -45,7 +45,7 @@ function setLazyLoadAndMellipsis($infos) {
* @params $container 逛资讯列表容器
*/
function initInfosEvt($container) {
$container.delegate('.like-btn', 'touchstart', function(e) {
$container.delegate('.like-btn', 'tap', function(e) {
var $likeBtn = $(e.currentTarget),
$info = $likeBtn.closest('.guang-info'),
opt = 'ok';
... ...
... ... @@ -37,7 +37,7 @@ setTimeout(function() {
info.initInfosEvt($infosContainer);
//文字介绍收起与展开
$('#more-intro').bind('touchstart', function() {
$('#more-intro').bind('tap', function() {
var $this = $(this);
$this.toggleClass('spread');
... ... @@ -56,7 +56,7 @@ $('#more-intro').bind('touchstart', function() {
});
//品牌收藏
$('#brand-like').bind('touchstart', function(e) {
$('#brand-like').bind('tap', function(e) {
var opt = 'ok',
$this = $(this);
... ...
... ... @@ -20,7 +20,7 @@ mySwiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination'
});
$('#nav-tab').delegate('li', 'touchstart', function() {
$('#nav-tab').delegate('li', 'tap', function() {
if ($(this).hasClass('focus')) {
return;
}
... ...
... ... @@ -6,13 +6,13 @@
var $ = require('yoho.zepto');
var $input = $('#search-input > input');
var $input = $('#search-input input');
var $clear = $('#search-input > .clear-input');
var $clear = $('#search-input .clear-input');
var $history = $('.history');
$('#clear-history').bind('touchstart', function() {
$('#clear-history').bind('tap', function() {
$.ajax({
type: 'POST',
url: '/search/clearHistory',
... ... @@ -32,6 +32,6 @@ $input.bind('input', function() {
}
});
$clear.bind('touchstart', function() {
$clear.bind('tap', function() {
$input.val('').trigger('input');
});
\ No newline at end of file
... ...
... ... @@ -33,7 +33,7 @@ function bindEyesEvt() {
$hasEye.append('<div class="eye close"></div>');
$eye = $hasEye.children('.eye');
$eye.on('touchstart', function(e) {
$eye.on('tap', function(e) {
var $this = $(this),
$pwd = $this.siblings('.pwd');
... ... @@ -58,7 +58,7 @@ function bindClearEvt() {
$hasClear.append('<div class="clear-input"></div>');
$clear = $hasClear.children('.clear-input');
$clear.on('touchstart', function(e) {
$clear.on('tap', function(e) {
var $input = $clear.siblings('.input');
$input.val('').trigger('input').focus();
... ...
... ... @@ -11,7 +11,7 @@ var $resend = $('#resend');
var tip = require('../../plugin/tip'),
showErrTip = tip.show;
$resend.on('touchstart', function(e) {
$resend.on('tap', function(e) {
e.preventDefault();
$.ajax({
... ...
... ... @@ -24,7 +24,7 @@ $email.bind('input', function() {
}
});
$btnSure.on('touchstart', function() {
$btnSure.on('tap', function() {
var email = trim($email.val());
if ($btnSure.hasClass('disable')) {
... ...
... ... @@ -32,7 +32,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$btnNext.on('touchstart', function() {
$btnNext.on('tap', function() {
var pn = trim($phoneNum.val()),
area = $countrySelect.val();
... ...
... ... @@ -45,7 +45,7 @@ module.exports = function(useInRegister) {
});
//重新发送验证码
$captchaTip.on('touchstart', function() {
$captchaTip.on('tap', function() {
if ($captchaTip.hasClass('disable')) {
return;
}
... ... @@ -70,7 +70,7 @@ module.exports = function(useInRegister) {
});
});
$btnNext.on('touchstart', function() {
$btnNext.on('tap', function() {
if ($btnNext.hasClass('disable')) {
return;
}
... ...
... ... @@ -64,7 +64,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$loginBtn.on('touchstart', function() {
$loginBtn.on('tap', function() {
var pn = trim($phoneNum.val()),
areaCode = $countrySelect.val(),
pwd = trim($pwd.val());
... ...
... ... @@ -68,7 +68,7 @@ $pwd.bind('input', function() {
// Login
$loginBtn.on('touchstart', function() {
$loginBtn.on('tap', function() {
var acc = trim($account.val()),
pwd = trim($pwd.val());
... ... @@ -107,15 +107,15 @@ $loginBtn.on('touchstart', function() {
});
$('#forget-pwd').on('touchstart', function() {
$('#forget-pwd').on('tap', function() {
showRetrivePanel();
});
$mask.on('touchstart', function() {
$mask.on('tap', function() {
hideRetrivePanel();
});
$('#cancel-retrive').on('touchstart', function(e) {
$('#cancel-retrive').on('tap', function(e) {
e.preventDefault();
hideRetrivePanel();
});
... ...
... ... @@ -24,7 +24,7 @@ $pwd.bind('input', function() {
}
});
$btnSure.on('touchstart', function() {
$btnSure.on('tap', function() {
var pwd = trim($pwd.val());
if ($btnSure.hasClass('disable')) {
... ...
... ... @@ -32,7 +32,7 @@ $countrySelect.change(function() {
$areaCode.text($countrySelect.val());
});
$btnNext.on('touchstart', function() {
$btnNext.on('tap', function() {
var pn = trim($phoneNum.val()),
areaCode = $countrySelect.val();
... ...
... ... @@ -33,7 +33,7 @@ function registerCbFn(cb) {
$classify.children(':first-child').addClass('active'); //T:不在HTML中使用{{#if @first}}active{{/if}}来初始化active为避免sub设置高度时的闪烁
//classify switch
$classify.delegate('.classify-item', 'touchstart', function() {
$classify.delegate('.classify-item', 'tap', function() {
var $this = $(this);
if ($this.hasClass('active')) {
... ... @@ -46,11 +46,11 @@ $classify.delegate('.classify-item', 'touchstart', function() {
});
//点击Mask隐藏筛选界面
$filter.filter('.filter-mask').click(function() {
$filter.filter('.filter-mask').tap(function() {
hideFilter();
});
$subClassify.delegate('li', 'click', function(e) {
$subClassify.delegate('li', 'tap', function(e) {
var $this = $(this),
id = $this.data('id');
... ...
... ... @@ -17,7 +17,7 @@ var $tip, tipItime;
$('.yoho-page').append(tipHtml);
$tip = $('#yoho-tip');
$tip.on('touchstart', function() {
$tip.on('tap', function() {
$tip.hide();
//清除Timeout
... ...
... ... @@ -210,7 +210,7 @@ filter.registerCbFn(search);
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav.delegate('li', 'touchstart', function() {
$listNav.delegate('li', 'tap', function() {
var $this = $(this),
nav,
navType,
... ... @@ -309,19 +309,19 @@ $(window).scroll(function() {
});
//品牌介绍
$brandHeader.children('.btn-intro').bind('touchstart', function() {
$brandHeader.children('.btn-intro').bind('tap', function() {
$introBox.removeClass('hide');
});
$('.close-intro, .brand-intro-box').click(function() {
$('.close-intro, .brand-intro-box').tap(function() {
$introBox.addClass('hide');
});
$('#brand-intro').click(function(e) {
$('#brand-intro').tap(function(e) {
e.stopPropagation();
});
//品牌收藏
$brandHeader.children('.btn-col').bind('touchstart', function() {
$brandHeader.children('.btn-col').bind('tap', function() {
$(this).toggleClass('coled');
});
\ No newline at end of file
... ...
... ... @@ -13,9 +13,9 @@ var swiper;
var filter = require('../../plugin/filter');
var $goodsContainer = $('#goods-container'),
$ngc = $goodsContainer.children('.new-goods'),
$pgc = $goodsContainer.children('.price-goods'),
$dgc = $goodsContainer.children('.discount-goods');
$ngc = $($goodsContainer.children().get(0)),
$pgc = $($goodsContainer.children().get(1)),
$dgc = $($goodsContainer.children().get(2));
var winH = $(window).height();
... ... @@ -56,10 +56,12 @@ var $listNav = $('#list-nav'),
$pre, //纪录进入筛选前的active项
searching;
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
if ($('.swiper-container .swiper-slide').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -132,7 +134,7 @@ function search(opt) {
}
//导航类别
if ($pre === undefined || $pre.hasClass('new')) {
if ($pre.hasClass('new')) {
navType = 'newest';
} else if ($pre.hasClass('price')) {
navType = 'price';
... ... @@ -308,6 +310,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
search();
if ($pre !== undefined) {
search();
}
}
});
});
\ No newline at end of file
... ...
... ... @@ -59,10 +59,12 @@ var $listNav = $('#list-nav'),
$pgc.addClass('hide');
$dgc.addClass('hide');
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
if ($('.swiper-container .swiper-slide').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
}
/**
* 筛选注册的回调,筛选子项点击后逻辑
... ... @@ -151,7 +153,7 @@ function search(opt) {
}
//导航类别
if ($pre === undefined || $pre.hasClass('today')) {
if ($pre.hasClass('today')) {
navType = 'today';
dayLimit = 1;
} else if ($pre.hasClass('week')) {
... ... @@ -270,7 +272,8 @@ $listNav.delegate('li', 'touchstart', function() {
nav = navInfo[navType];
if ($this.hasClass('hide')) {
if (!($this.hasClass('active'))) {
$active = $this.siblings('.active');
$pre = $this; //$pre为除筛选导航的其他导航项,若当前active的为筛选,则把$pre置为当前点击项
... ... @@ -314,6 +317,8 @@ $(window).scroll(function() {
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
if ($(window).scrollTop() + winH >
$(document).height() - 0.25 * $goodsContainer.height()) {
search();
if ($pre !== undefined) {
search();
}
}
});
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@ var $cartContent = $('.cart-content');
require('./good');
$('.cart-nav').delegate('li', 'touchstart', function() {
$('.cart-nav').delegate('li', 'tap', function() {
var $this = $(this);
if ($this.hasClass('active')) {
... ...
... ... @@ -37,7 +37,7 @@ function remove() {
$('.chose-panel').remove();
}
$('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) {
$('.yoho-page').delegate('.chose-panel', 'tap', function(e) {
var $cur = $(e.target);
if ($cur.closest('.main').length > 0) {
... ... @@ -46,10 +46,10 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) {
//点击蒙版消失
remove();
}).delegate('#chose-btn-sure', 'touchstart', function() {
}).delegate('#chose-btn-sure', 'tap', function() {
//确定
}).delegate('.block', 'touchstart', function() {
}).delegate('.block', 'tap', function() {
//尺寸颜色点选
var $this = $(this);
... ... @@ -60,7 +60,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) {
$this.siblings('.chosed').removeClass('chosed');
$this.addClass('chosed');
}).delegate('.btn-minus', 'touchstart', function() {
}).delegate('.btn-minus', 'tap', function() {
var num = +$num.val();
if (num === 1) {
... ... @@ -68,7 +68,7 @@ $('.yoho-page').delegate('.chose-panel', 'touchstart', function(e) {
}
$num.val(num - 1);
}).delegate('.btn-plus', 'touchstart', function() {
}).delegate('.btn-plus', 'tap', function() {
var num = +$num.val();
//TODO:库存数验证
... ...
... ... @@ -11,7 +11,7 @@ var chosePanel = require('./chose-panel');
lazyLoad($('.lazy'));
$('.gift-advance-page').delegate('.chose', 'touchstart', function() {
$('.gift-advance-page').delegate('.chose', 'tap', function() {
var id = $(this).closest('.gift-advance-good').data('id');
$.ajax({
... ...
... ... @@ -17,12 +17,12 @@ function docTouchEvt(e) {
$('.opt-panel:not(.hide)').addClass('hide');
//
$(document).unbind('touchstart', docTouchEvt);
$(document).unbind('tap', docTouchEvt);
}
}
// function unbindDocTouchEvt(e) {
// $(document).unbind('touchstart', docTouchEvt);
// $(document).unbind('tap', docTouchEvt);
// }
ellipsis.init();
... ... @@ -32,7 +32,7 @@ lazyLoad($('.lazy'));
$('.name')[0].mlellipsis(2);
//TIP:事件委托在.cart-goods,商品列表的容器统一需要有.cart-goods
$('.cart-goods').delegate('.checkbox', 'touchstart', function() {
$('.cart-goods').delegate('.checkbox', 'tap', function() {
var $this = $(this);
if ($this.hasClass('icon-cb-checked')) {
... ... @@ -40,7 +40,7 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() {
} else {
$this.removeClass('icon-checkbox').addClass('icon-cb-checked');
}
}).delegate('.icon-edit', 'touchstart', function() {
}).delegate('.icon-edit', 'tap', function() {
var id = $(this).closest('.shopping-cart-good').data('id');
$.ajax({
... ... @@ -55,13 +55,13 @@ $('.cart-goods').delegate('.checkbox', 'touchstart', function() {
}
}
});
}).delegate('.icon-del', 'touchstart', function(e) {
}).delegate('.icon-del', 'tap', function(e) {
e.stopPropagation();
$(this).closest('.shopping-cart-good').children('.opt-panel').removeClass('hide');
$(document).bind('touchstart', docTouchEvt);
}).delegate('.opt-panel', 'touchstart', function() {
$(document).bind('tap', docTouchEvt);
}).delegate('.opt-panel', 'tap', function() {
var $this = $(this),
id = $this.closest('.shopping-cart-good').data('id');
... ...
... ... @@ -16,13 +16,13 @@
"spm": {
"main": "index.js",
"dependencies": {
"yoho.zepto": "1.1.60",
"yoho.zepto": "1.1.61",
"yoho.jquery": "1.8.3",
"mlellipsis": "0.0.6",
"yoho.iswiper": "3.0.1",
"iscroll": "5.1.2",
"import-style": "1.0.0",
"yoho.zeptolazyload": "0.0.1",
"yoho.zeptolazyload": "0.0.2",
"yoho.handlebars": "3.0.3"
},
"devDependencies": {
... ...
... ... @@ -2,31 +2,32 @@
.newbrand-search {
width: 93.75%;
height: 30px;
padding: 7px 3.125%;
height: 60rem / $pxConvertRem;
padding: 14rem / $pxConvertRem 3.125%;
background-color: #f8f8f8;
left: 0;
top: 44px;
top: 88rem / $pxConvertRem;
position: fixed;
z-index: 2;
.search-box {
position: relative;
height: 30px;
height: 60rem / $pxConvertRem;
background-color: #FFF;
border-radius: 15px;
padding: 0 16px 0 26px;
border-radius: 30rem / $pxConvertRem;
padding: 0 32rem / $pxConvertRem 0 52rem / $pxConvertRem;
.search-input {
width: 100%;
height: 30px;
height: 60rem / $pxConvertRem;
border: 0;
}
.search-icon {
position: absolute;
font-size: 12px;
top: 16px;
left: 24px;
font-size: 24rem / $pxConvertRem;
top: 20rem / $pxConvertRem;
left: 24rem / $pxConvertRem;
color: #bdbdbd;
}
}
... ... @@ -60,52 +61,67 @@
background: #eeeeee;
color: #999999;
font-weight: bold;
// font-weight: bold;
position: relative;
h2 {
width: 100%;
height: 25px;
line-height: 25px;
font-size: 17px;
// width: 100%;
padding: 0 20rem / $pxConvertRem;
height: 50rem / $pxConvertRem;
line-height: 50rem / $pxConvertRem;
font-size: 34rem / $pxConvertRem;
border-top: 1px solid #e6e6e6;
background-color: #f4f4f4;
}
}
p {
cursor: pointer;
height: 25px;
padding-right: 10px;
a {
display: block;
font-size: 17px;
border-bottom: 1px solid #f3f3f3;
border-top: 1px solid #f9f9f9;
i {
position: relative;
top: 1px;
color: #ff0000;
padding-left: 16px;
}
p {
cursor: pointer;
// height: 50rem / $pxConvertRem;
padding: 0 20rem / $pxConvertRem;
a {
display: block;
padding-top: 10rem / $pxConvertRem;
height: 76rem / $pxConvertRem;
line-height: 76rem / $pxConvertRem;
font-size: 34rem / $pxConvertRem;
border-bottom: 1px solid #f3f3f3;
border-top: 1px solid #f9f9f9;
i {
display: inline-block;
margin-left: 24rem / $pxConvertRem;
width: 40rem / $pxConvertRem;
height: 40rem / $pxConvertRem;
text-align: center;
vertical-align: middle;
font-size: 28rem / $pxConvertRem;
line-height: 40rem / $pxConvertRem;
color: #fff;
border-radius: 50%;
}
.icon-hot {
background: #ff0000;
}
.icon-new {
background: #86c048;
}
}
}
}
.right-bar {
width: 30px;
top: 120px !important;
width: 60rem / $pxConvertRem;
top: 240rem / $pxConvertRem !important;
overflow: hidden;
position: fixed;
right: 1px;
border-radius: 6px;
right: 2rem / $pxConvertRem;
border-radius: 12rem / $pxConvertRem;
background: rgba(0,0,0,.8);
z-index: 2;
b {
height: 16px;
height: 32rem / $pxConvertRem;
line-height: 14px;
line-height: 28rem / $pxConvertRem;
text-align: center;
display: block;
color: #999999;
... ... @@ -114,6 +130,6 @@
}
.con {
padding-top: 5px;
padding-top: 10rem / $pxConvertRem;
}
}
\ No newline at end of file
... ...
... ... @@ -6,6 +6,7 @@
right: 0;
bottom: 20rem / $pxConvertRem;
text-align: center;
z-index: 1;
.pagination-inner {
display: inline-block;
span {
... ... @@ -16,9 +17,10 @@
opacity: 0.5;
margin: 0 (9rem / $pxConvertRem);
border-radius: 50%;
}
span.swiper-active-switch {
opacity: 1;
&.swiper-pagination-bullet-active {
background: #fff;
opacity: 1;
}
}
}
}
... ...
... ... @@ -17,14 +17,15 @@
overflow: hidden;
.brand-logo {
width: 100%;
display: table-cell;
width: 3.95rem;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
text-align: center;
font-size: 0;
vertical-align: middle;
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
... ... @@ -68,13 +69,13 @@
.brands-swiper {
background: #fff;
width: 100%;
height: 140rem / $pxConvertRem;
height: 180rem / $pxConvertRem;
margin-bottom: 28rem / $pxConvertRem;
overflow: hidden;
.brands-list {
position: relative;
height: 140rem / $pxConvertRem;
height: 180rem / $pxConvertRem;
li {
float: left;
... ... @@ -85,11 +86,12 @@
a {
position: relative;
display: block;
display: table-cell;
width: 100%;
height: 100%;
height: 140rem / $pxConvertRem;
line-height: 140rem / $pxConvertRem;
font-size: 0;
vertical-align: middle;
}
img {
... ... @@ -102,7 +104,8 @@
position: absolute;
left: 8rem / $pxConvertRem;
right: 8rem / $pxConvertRem;
bottom: 8rem / $pxConvertRem;
bottom: -32rem / $pxConvertRem;
width: 100%;
height: 28rem / $pxConvertRem;
line-height: 28rem / $pxConvertRem;
text-align: center;
... ...
... ... @@ -4,15 +4,15 @@
color: #fff;
width: 100%;
overflow: hidden;
height: 44px;
line-height: 44px;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
.nav-back {
position: absolute;
left: 17px;
top: 14px;
width: 9px;
height: 16px;
left: 34rem / $pxConvertRem;
top: 28rem / $pxConvertRem;
width: 18rem / $pxConvertRem;
height: 32rem / $pxConvertRem;
background: image-url('layout/back.png') no-repeat;
background-size: 100% 100%;
outline: none;
... ... @@ -20,8 +20,8 @@
.nav-home {
position: absolute;
top: 14px;
right: 17px;
top: 28rem / $pxConvertRem;
right: 34rem / $pxConvertRem;
width: 20px;
height: 20px;
background: image-url('layout/home.png') no-repeat;
... ... @@ -31,10 +31,10 @@
.nav-title {
position: absolute;
margin-left: 26px;
margin-right: 32px;
margin-left: 52rem / $pxConvertRem;
margin-right: 64rem / $pxConvertRem;
height: 100%;
font-size: 18px;
font-size: 36rem / $pxConvertRem;
color: #fff;
font-weight: bold;
top: 0;
... ...
... ... @@ -39,13 +39,11 @@
{{# list}}
<p>
<a href="{{url}}">{{name}}
<i class="icon-hot">
</i>
{{# isHot}}
<i class="icon-hot"></i>
<i class="icon-hot">H</i>
{{/ isHot}}
{{# isNew}}
<i class="icon-new"></i>
<i class="icon-new">N</i>
{{/ isNew}}
</a>
</p>
... ...
... ... @@ -23,7 +23,7 @@
{{# content}}
{{#if text}}
<div class="post-block text-block">
{{text}}
{{{text}}}
</div>
{{/if}}
... ...
... ... @@ -84,13 +84,13 @@
</li>
</ul>
<div id="goods-container" class="goods-container">
<div class="new-goods container">
<div class="new-goods container clearfix">
{{# new}}
{{> good}}
{{/ new}}
</div>
<div class="price-goods container hide"></div>
<div class="discount-goods container hide"></div>
<div class="price-goods container clearfix hide"></div>
<div class="discount-goods container clearfix hide"></div>
{{> filter}}
</div>
... ...
... ... @@ -41,8 +41,6 @@
</div>
{{/ goodsContainer}}
{{> filter}}
</div>
... ...
... ... @@ -40,12 +40,18 @@
<div id="goods-container" class="goods-container">
{{# goodsContainer}}
<div class="new-goods container">
{{#if goods}}
{{# goods}}
{{> good}}
{{/ goods}}
{{^}}
<p class="no-result">未找到相关搜索结果</p>
{{/if}}
</div>
<div class="price-goods container hide"></div>
<div class="discount-goods container hide"></div>
{{/ goodsContainer}}
{{> filter}}
</div>
... ... @@ -90,7 +96,7 @@
{{/if}}
{{#if discount}}
<input id="page" type="hidden" value={{page}}>
<input id="discount" type="hidden" value={{discount}}>
{{/if}}
</div>
... ...
... ... @@ -108,14 +108,14 @@
{{/if}}
{{!-- 新品到着 --}}
{{#if newArrival}}
{{#if newArrivalPage}}
<script>
seajs.use('js/product/newsale/newarrival');
</script>
{{/if}}
{{!-- 折扣专区 --}}
{{#if discount}}
{{#if discountPage}}
<script>
seajs.use('js/product/newsale/discount');
</script>
... ...
... ... @@ -26,6 +26,7 @@ class BoysController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'boysHomePage' => true,
'showDownloadApp'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getBoysFloor()
));
... ...
... ... @@ -26,6 +26,7 @@ class GirlsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'grilsHomePage' => true,
'showDownloadApp'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getGirlsFloor()
));
... ...
... ... @@ -18,7 +18,9 @@ class IndexController extends AbstractAction
// 渲染模板
$this->_view->display('index', array(
'background' => Index\HomeModel::getBgImage()
'background' => Index\HomeModel::getBgImage(),
'channelPage' => true,
'showDownloadApp'=>true
));
}
... ...
... ... @@ -26,6 +26,7 @@ class KidsController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'kidsHomePage' => true,
'showDownloadApp'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getKidsFloor()
));
... ...
... ... @@ -26,6 +26,7 @@ class LifestyleController extends AbstractAction
// 渲染模板并输出
$this->_view->display('index', array(
'lifestyleHomePage' => true,
'showDownloadApp'=>true,
'maybeLike' => true,
'content' => Index\HomeModel::getLifestyleFloor()
));
... ...
... ... @@ -19,7 +19,7 @@ class PlusstarModel
{
/**
* 获取国际优的品牌列表
* 获取国际优的品牌列表
*
* @param string $gender "1,3"表示男, "2,3"表示女
* @return array
... ...
... ... @@ -144,7 +144,7 @@ class HomeModel
Cache::set(CacheConfig::KEY_ACTION_BOYS_INDEX, $result);
}
}
return $result;
}
... ...
... ... @@ -41,7 +41,7 @@ class InfoController extends AbstractAction
$data['guang']['author']['avatar'] = $detail['getAuthor']['avatar'];
$data['guang']['author']['name'] = $detail['getAuthor']['name'];
$data['guang']['author']['intro'] = $detail['getAuthor']['author_desc'];
$data['guang']['author']['url'] = '/author/index?id=' . $detail['getArticle']['author_id'];
$data['guang']['author']['url'] = Helpers::url('/author/index', array('id' => $detail['getArticle']['author_id']), 'guang');
}
$data['detail'] = array();
... ... @@ -55,17 +55,27 @@ class InfoController extends AbstractAction
$good = array();
$skns = array();
$product = array();
foreach ($detail['getArticleContent'] as $value) {
$build = array();
// 文字
if (isset($value['text'])) {
$build['text'] = $value['text']['data']['text'];
$data['detail']['content'][] = $build;
}
// 单张图
elseif (isset($value['singleImage'])) {
$build['bigImage'] = Helpers::getImageUrl($value['singleImage']['data'][0]['src'], 640, 640);
$data['detail']['content'][] = $build;
}
elseif (isset($value['smallPic'])) {
$imgs = $value['smallPic']['data'];
$build['smallImage'] = array(
array(
'src' => Helpers::getImageUrl($imgs[0]['src'], 315, 420)
),
array(
'src' => Helpers::getImageUrl($imgs[1]['src'], 315, 420)
)
);
}
// 相关推荐
elseif (isset($value['goods']['data'])) {
... ... @@ -133,7 +143,7 @@ class InfoController extends AbstractAction
// 相关标签
if (!empty($detail['getArticle']['tags'])) {
foreach ($detail['getArticle']['tags'] as $value) {
$value['url'] = '/tags/index?query=' . $value['name'];
$value['url'] = Helpers::url('/tags/index', array('query=' => $value['name']), 'guang');
$data['relatedTag'][] = $value;
}
}
... ... @@ -141,11 +151,12 @@ class InfoController extends AbstractAction
// 相关文章
if (!empty($detail['getOtherArticle'])) {
foreach ($detail['getOtherArticle'] as $value) {
$value['url'] = '/info/index?id=' . $value['id'];
$value['url'] = Helpers::url('/info/index', array('id' => $value['id']), 'guang');
$value['thumb'] = Helpers::getImageUrl($value['thumb'], 279, 175);
$data['relatedInfo'][] = $value;
}
}
$this->_view->display('index', $data);
$detail = array();
... ...
... ... @@ -79,7 +79,7 @@ class PlusstarController extends AbstractAction
$data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}";
$data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
$data['ps']['newArrival'] = array();
$data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面
$data['ps']['newArrival']['moreUrl'] = '/product/list/brand?brand='.$id; // @todo 品牌列表页面
$data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
$data['ps']['infos'] = array();
... ...
... ... @@ -24,7 +24,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['newArrival'] = true;
$data['newArrivalPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getNewProducts($channel, 60);
if (!empty($goodsList)) {
... ... @@ -58,6 +58,7 @@ class NewsaleController extends AbstractAction
$this->channelTrans($channel);
$data = array();
$data['discountPage'] = true;
$data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
$goodsList = \Product\NewsaleModel::getSaleProducts($channel, 60);
if (!empty($goodsList)) {
... ... @@ -72,7 +73,7 @@ class NewsaleController extends AbstractAction
'size' => 0,
'discount' => '0.1,0.9'
);
//var_dump($data);exit;
$this->_view->display('sale', $data);
}
... ... @@ -131,7 +132,7 @@ class NewsaleController extends AbstractAction
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color,
$size, $price, $p_d, $channel, $dayLimit, $limit, $page
$size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
);
$result = \Product\NewsaleModel::selectData($data);
... ...