SALE 页面banner and 活动入口
Showing
10 changed files
with
131 additions
and
7 deletions
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | -<div class="sale-page yoho-page"> | ||
3 | - <h1>折扣页面</h1> | 2 | +<div class="sale-page yoho-page center-content"> |
3 | + {{#topBanner}} | ||
4 | + {{> index/slide-banner}} | ||
5 | + {{/topBanner}} | ||
6 | + | ||
7 | + {{> sale/activity-entry}} | ||
4 | </div> | 8 | </div> |
5 | {{> layout/footer}} | 9 | {{> layout/footer}} |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="slide-wrapper"> | 2 | <div class="slide-wrapper"> |
3 | <ul> | 3 | <ul> |
4 | {{# list}} | 4 | {{# list}} |
5 | - <li style="background:{{bgColor}}"> | 5 | + <li style="{{#if bgColor}}background:{{bgColor}}{{/if}}"> |
6 | <a href="{{href}}" target= "_blank"> | 6 | <a href="{{href}}" target= "_blank"> |
7 | <img class="lazy" data-original="{{img}}" alt=""> | 7 | <img class="lazy" data-original="{{img}}" alt=""> |
8 | </a> | 8 | </a> |
@@ -68,6 +68,13 @@ | @@ -68,6 +68,13 @@ | ||
68 | </script> | 68 | </script> |
69 | {{/if}} | 69 | {{/if}} |
70 | 70 | ||
71 | +{{!-- SALE --}} | ||
72 | +{{#if saleIndexPage}} | ||
73 | + <script> | ||
74 | + seajs.use('js/sale/index'); | ||
75 | + </script> | ||
76 | +{{/if}} | ||
77 | + | ||
71 | {{!-- 登录注册找回密码--}} | 78 | {{!-- 登录注册找回密码--}} |
72 | {{#if loginPage}} | 79 | {{#if loginPage}} |
73 | <script> | 80 | <script> |
1 | +<div class="activity-entry clearfix"> | ||
2 | + {{#activityEnter}} | ||
3 | + <a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link"> | ||
4 | + <img class="icon pull-left" src="{{icon}}"> | ||
5 | + <div class="entry-text"> | ||
6 | + <span class="title">{{title}}</span> | ||
7 | + <p class="desc">{{desc}}</p> | ||
8 | + </div> | ||
9 | + </a> | ||
10 | + {{/activityEnter}} | ||
11 | +</div> |
web-static/js/sale/index.js
0 → 100644
@@ -86,4 +86,4 @@ input,textarea { | @@ -86,4 +86,4 @@ input,textarea { | ||
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
89 | -@import "home/index", "product/index", "guang/index", "passport/index", "error","order/index"; | 89 | +@import "home/index", "product/index", "guang/index", "passport/index", "error", "order/index", "sale/index"; |
web-static/sass/sale/_index.scss
0 → 100644
1 | +.sale-page { | ||
2 | + margin-top: 10px; | ||
3 | + | ||
4 | + .slide-container { | ||
5 | + position: relative; | ||
6 | + height: 450px; | ||
7 | + overflow: hidden; | ||
8 | + } | ||
9 | + | ||
10 | + .activity-entry { | ||
11 | + margin: 10px 0; | ||
12 | + | ||
13 | + .entry-item { | ||
14 | + display: block; | ||
15 | + width: 377px; | ||
16 | + margin-right: 10px; | ||
17 | + padding: 24px 0; | ||
18 | + background: #f5f5f5; | ||
19 | + | ||
20 | + &.first, | ||
21 | + &.last { | ||
22 | + width: 376px; | ||
23 | + } | ||
24 | + | ||
25 | + &.last { | ||
26 | + margin-right: 0; | ||
27 | + } | ||
28 | + } | ||
29 | + | ||
30 | + .entry-text { | ||
31 | + padding-left: 160px; | ||
32 | + font-size: 16px; | ||
33 | + } | ||
34 | + | ||
35 | + .icon { | ||
36 | + width: 72px; | ||
37 | + height: 72px; | ||
38 | + margin-left: 48px; | ||
39 | + } | ||
40 | + | ||
41 | + .title { | ||
42 | + font-size: 26px; | ||
43 | + font-weight: bold; | ||
44 | + line-height: 48px; | ||
45 | + } | ||
46 | + } | ||
47 | +} |
@@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract | @@ -77,6 +77,7 @@ class Bootstrap extends Bootstrap_Abstract | ||
77 | case 'www': // 主站 | 77 | case 'www': // 主站 |
78 | case 'new': // 原新版 | 78 | case 'new': // 原新版 |
79 | case 'dev': // 开发环境 | 79 | case 'dev': // 开发环境 |
80 | + case 'web': | ||
80 | break; | 81 | break; |
81 | case 'search': // 搜索 | 82 | case 'search': // 搜索 |
82 | $searchRequest = new Yaf\Request\Http('/product/search/index'); | 83 | $searchRequest = new Yaf\Request\Http('/product/search/index'); |
@@ -2,16 +2,57 @@ | @@ -2,16 +2,57 @@ | ||
2 | // 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除 | 2 | // 前端开发添加的路由,对应需求 http://redmine.yoho.cn/issues/143, 后端开发完删除 |
3 | // 首页 毕凯,赵彪 | 3 | // 首页 毕凯,赵彪 |
4 | // 列表页 王成龙 | 4 | // 列表页 王成龙 |
5 | -use Action\AbstractAction; | 5 | +use Action\WebAction; |
6 | use Plugin\Helpers; | 6 | use Plugin\Helpers; |
7 | 7 | ||
8 | -class Sale1Controller extends AbstractAction | 8 | +class Sale1Controller extends WebAction |
9 | { | 9 | { |
10 | public function indexAction() | 10 | public function indexAction() |
11 | { | 11 | { |
12 | $data = array( | 12 | $data = array( |
13 | - 'salePage' => true | 13 | + 'saleIndexPage' => true, |
14 | + 'topBanner' => array( | ||
15 | + 'list' => array( | ||
16 | + array( | ||
17 | + 'href' => 'http://www.yohobuy.com', | ||
18 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450' | ||
19 | + ), | ||
20 | + array( | ||
21 | + 'href' => 'http://www.yohobuy.com', | ||
22 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450' | ||
23 | + ), | ||
24 | + array( | ||
25 | + 'href' => 'http://www.yohobuy.com', | ||
26 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01cd0659953f9f213213839c971406413c.jpg?imageView/1/w/1150/h/450' | ||
27 | + ), | ||
28 | + array( | ||
29 | + 'href' => 'http://www.yohobuy.com', | ||
30 | + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/23/03/01c571ce38e5d6cf5a0077bd11593bbdfe.jpg?imageView/1/w/1150/h/450' | ||
31 | + ) | ||
32 | + ) | ||
33 | + ), | ||
34 | + 'activityEnter' => array( | ||
35 | + array( | ||
36 | + 'icon' => '', | ||
37 | + 'title' => 'VIP会员专享', | ||
38 | + 'desc' => 'Only for VIP', | ||
39 | + 'link' => 'http://www.yohobuy.com' | ||
40 | + ), | ||
41 | + array( | ||
42 | + 'icon' => '', | ||
43 | + 'title' => '断码区', | ||
44 | + 'desc' => 'Discount', | ||
45 | + 'link' => 'http://www.yohobuy.com' | ||
46 | + ), | ||
47 | + array( | ||
48 | + 'icon' => '', | ||
49 | + 'title' => '最新降价', | ||
50 | + 'desc' => 'Off Price', | ||
51 | + 'link' => 'http://www.yohobuy.com' | ||
52 | + ) | ||
53 | + ) | ||
14 | ); | 54 | ); |
55 | + $this->setWebNavHeader(); | ||
15 | $this->_view->display('index', $data); | 56 | $this->_view->display('index', $data); |
16 | } | 57 | } |
17 | } | 58 | } |
-
Please register or login to post a comment