Authored by 毕凯

SALE 页面banner and 活动入口

{{> layout/header}}
<div class="sale-page yoho-page">
<h1>折扣页面</h1>
<div class="sale-page yoho-page center-content">
{{#topBanner}}
{{> index/slide-banner}}
{{/topBanner}}
{{> sale/activity-entry}}
</div>
{{> layout/footer}}
... ...
<div class="slide-container {{#if pagination}}slide-thumb-container{{/if}}">
<div class="slide-wrapper">
<div class="slide-wrapper">
<ul>
{{# list}}
<li style="background:{{bgColor}}">
<li style="{{#if bgColor}}background:{{bgColor}}{{/if}}">
<a href="{{href}}" target= "_blank">
<img class="lazy" data-original="{{img}}" alt="">
</a>
... ... @@ -13,7 +13,7 @@
</div>
{{/ tips}}
</li>
{{/ list}}
{{/ list}}
</ul>
<div class="slide-switch">
<a class="prev" href="javascript:;">
... ... @@ -31,11 +31,11 @@
{{# pagination}}
<li>
<a href="{{href}}" target="_blank"></a>
<img src="{{img}}" alt="">
<img src="{{img}}" alt="">
</li>
{{/ pagination}}
</ul>
</div>
{{/if}}
</div>
<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>
\ No newline at end of file
<div class="slide-container-placeholder {{#if pagination}}slide-thumb-container-placeholder{{/if}}"></div>
... ...
... ... @@ -68,6 +68,13 @@
</script>
{{/if}}
{{!-- SALE --}}
{{#if saleIndexPage}}
<script>
seajs.use('js/sale/index');
</script>
{{/if}}
{{!-- 登录注册找回密码--}}
{{#if loginPage}}
<script>
... ...
<div class="activity-entry clearfix">
{{#activityEnter}}
<a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link">
<img class="icon pull-left" src="{{icon}}">
<div class="entry-text">
<span class="title">{{title}}</span>
<p class="desc">{{desc}}</p>
</div>
</a>
{{/activityEnter}}
</div>
... ...
/**
* 首页
* @author: bikai<kia.bi@yoho.cn>
* @date: 2016/1/18
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('../common/slider');
lazyLoad($('img.lazy'));
$('.slide-container').slider();
... ...
@charset "utf-8";
@import "compass",
@import "compass",
"compass/reset",
"header",
"footer",
... ... @@ -9,7 +9,7 @@
"pager";
body {
font-family: arial,"Microsoft YaHei";
font-family: arial,"Microsoft YaHei";
}
@font-face {
... ... @@ -38,10 +38,10 @@ body {
}
.clearfix:after {
clear: both;
clear: both;
}
.clearfix {
.clearfix {
*zoom: 1;
}
... ... @@ -86,4 +86,4 @@ input,textarea {
}
}
@import "home/index", "product/index", "guang/index", "passport/index", "error","order/index";
@import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index";
... ...
.sale-page {
margin-top: 10px;
.slide-container {
position: relative;
height: 450px;
overflow: hidden;
}
.activity-entry {
margin: 10px 0;
.entry-item {
display: block;
width: 377px;
margin-right: 10px;
padding: 24px 0;
background: #f5f5f5;
&.first,
&.last {
width: 376px;
}
&.last {
margin-right: 0;
}
}
.entry-text {
padding-left: 160px;
font-size: 16px;
}
.icon {
width: 72px;
height: 72px;
margin-left: 48px;
}
.title {
font-size: 26px;
font-weight: bold;
line-height: 48px;
}
}
}
... ...
<?php
/**
* 启动运行
*
*
* @name Bootstrap
* @author fei.hong
* @desc 所有在Bootstrap类中, 以_init开头的方法, 都会被Yaf调用,
... ... @@ -54,7 +54,7 @@ class Bootstrap extends Bootstrap_Abstract
// */
// public function _initPlugin(Dispatcher $dispatcher)
// {
//
//
// }
/**
... ... @@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract
case 'www': // 主站
case 'new': // 原新版
case 'dev': // 开发环境
case 'web':
break;
case 'search': // 搜索
$searchRequest = new Yaf\Request\Http('/product/search/index');
... ... @@ -129,7 +130,7 @@ class Bootstrap extends Bootstrap_Abstract
$layout = new TemplateLayout();
$layout->setScriptPath($this->_config->application->template->path);
$dispatcher->setView($layout);
//}
//}
}
// /**
... ...
... ... @@ -18,4 +18,4 @@ class LifestyleController extends WebAction
);
$this->_view->display('index', $data);
}
}
\ No newline at end of file
}
... ...
... ... @@ -2,16 +2,57 @@
// 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除
// 首页 毕凯,赵彪
// 列表页 王成龙
use Action\AbstractAction;
use Action\WebAction;
use Plugin\Helpers;
class Sale1Controller extends AbstractAction
class Sale1Controller extends WebAction
{
public function indexAction()
{
$data = array(
'salePage' => true
'saleIndexPage' => true,
'topBanner' => array(
'list' => array(
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450'
),
array(
'href' => 'http://www.yohobuy.com',
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450'
)
)
),
'activityEnter' => array(
array(
'icon' => '',
'title' => 'VIP会员专享',
'desc' => 'Only for VIP',
'link' => 'http://www.yohobuy.com'
),
array(
'icon' => '',
'title' => '断码区',
'desc' => 'Discount',
'link' => 'http://www.yohobuy.com'
),
array(
'icon' => '',
'title' => '最新降价',
'desc' => 'Off Price',
'link' => 'http://www.yohobuy.com'
)
)
);
$this->setWebNavHeader();
$this->_view->display('index', $data);
}
}
... ...