Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
7 changed files
with
145 additions
and
8 deletions
1 | <div class="activity-entry clearfix"> | 1 | <div class="activity-entry clearfix"> |
2 | {{#activityEnter}} | 2 | {{#activityEnter}} |
3 | - <a class="entry-item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="link"> | 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}}"> | 4 | <img class="icon pull-left" src="{{icon}}"> |
5 | <div class="entry-text"> | 5 | <div class="entry-text"> |
6 | <span class="title">{{title}}</span> | 6 | <span class="title">{{title}}</span> |
1 | +<div class="brand-sale"> | ||
2 | + <div class="floor-title"> | ||
3 | + 折扣专场 SALE | ||
4 | + </div> | ||
5 | + | ||
6 | + <div class="sale-group-big clearfix"> | ||
7 | + {{#brandSale}} | ||
8 | + {{#big}} | ||
9 | + <a class="item pull-left {{#if @first}}first{{/if}} {{#if @last}}last{{/if}}" href="{{link}}"> | ||
10 | + <div class="pic"> | ||
11 | + <img class="" src="{{img}}"> | ||
12 | + <div class="time">{{time}}</div> | ||
13 | + </div> | ||
14 | + <div class="detail"> | ||
15 | + <img class="brand pull-left" src="{{brand}}"> | ||
16 | + <div class="text"> | ||
17 | + <div class="discount"> | ||
18 | + <span class="num">{{discount}}</span> Off | ||
19 | + </div> | ||
20 | + <div class="title"> | ||
21 | + {{title}} | ||
22 | + </div> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | + </a> | ||
26 | + {{/big}} | ||
27 | + {{/brandSale}} | ||
28 | + </div> | ||
29 | + | ||
30 | + <div class="sale-group"> | ||
31 | + | ||
32 | + </div> | ||
33 | + | ||
34 | +</div> |
@@ -142,7 +142,7 @@ function actionGoodsCart() { | @@ -142,7 +142,7 @@ function actionGoodsCart() { | ||
142 | return false; | 142 | return false; |
143 | } | 143 | } |
144 | key = encodeURI(key); | 144 | key = encodeURI(key); |
145 | - $.get(searchDomain + '?callback=?&query=' + key, function(htmlData) { | 145 | + $.get(searchDomain + '?query=' + key, function(htmlData) { |
146 | $('.search-list').html(htmlData.data); | 146 | $('.search-list').html(htmlData.data); |
147 | queryNum = $('.search-list').children('li').length; | 147 | queryNum = $('.search-list').children('li').length; |
148 | listIndex = -1; | 148 | listIndex = -1; |
@@ -156,7 +156,7 @@ function actionGoodsCart() { | @@ -156,7 +156,7 @@ function actionGoodsCart() { | ||
156 | }, function() { | 156 | }, function() { |
157 | $(this).css('background-color', '#fff'); | 157 | $(this).css('background-color', '#fff'); |
158 | }); | 158 | }); |
159 | - }, 'jsonp'); | 159 | + }, 'json'); |
160 | } | 160 | } |
161 | 161 | ||
162 | function getText(obj) { | 162 | function getText(obj) { |
@@ -525,7 +525,7 @@ function createNewArray(obj) { | @@ -525,7 +525,7 @@ function createNewArray(obj) { | ||
525 | var $that = $(this); | 525 | var $that = $(this); |
526 | var $alink = $that.find('a'); | 526 | var $alink = $that.find('a'); |
527 | var _href = $alink.attr('href'); | 527 | var _href = $alink.attr('href'); |
528 | - var hottag = $alink.attr('hot') === 'true' ? true : false; | 528 | + var hottag = $alink.attr('hot') === 'hot' ? true : false; |
529 | var objt = {}; | 529 | var objt = {}; |
530 | 530 | ||
531 | if ($that.hasClass('category-title')) { | 531 | if ($that.hasClass('category-title')) { |
@@ -721,7 +721,6 @@ function actionNav() { | @@ -721,7 +721,6 @@ function actionNav() { | ||
721 | } | 721 | } |
722 | 722 | ||
723 | 723 | ||
724 | - | ||
725 | /** | 724 | /** |
726 | * 查询跳转后保留关键字 | 725 | * 查询跳转后保留关键字 |
727 | * @return {[type]} [description] | 726 | * @return {[type]} [description] |
@@ -1172,7 +1171,7 @@ function actionExeTemplate() { | @@ -1172,7 +1171,7 @@ function actionExeTemplate() { | ||
1172 | * @return {[type]} [description] | 1171 | * @return {[type]} [description] |
1173 | */ | 1172 | */ |
1174 | function actionSearch() { | 1173 | function actionSearch() { |
1175 | - var searchDomain = 'http://search.yohobuy.com/api/suggest'; | 1174 | + var searchDomain = 'http://search.yohobuy.com/product/search/suggest'; |
1176 | 1175 | ||
1177 | $('#query_key').search(searchDomain); | 1176 | $('#query_key').search(searchDomain); |
1178 | } | 1177 | } |
@@ -14,9 +14,11 @@ var $cr = $('#country-code-hide'), | @@ -14,9 +14,11 @@ var $cr = $('#country-code-hide'), | ||
14 | emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/, | 14 | emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/, |
15 | acAccount = [ | 15 | acAccount = [ |
16 | ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com', | 16 | ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com', |
17 | - 'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序 | 17 | + 'sohu.com', 'hotmail.com', '139.com', '189.com' |
18 | + ], //数字顺序 | ||
18 | ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com', | 19 | ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com', |
19 | - 'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序 | 20 | + 'sohu.com', 'hotmail.com', '139.com', '189.com' |
21 | + ] //组合顺序 | ||
20 | ], | 22 | ], |
21 | $ccList = $('#country-code-list'), | 23 | $ccList = $('#country-code-list'), |
22 | $cc = $('#country-code'), | 24 | $cc = $('#country-code'), |
@@ -44,6 +46,7 @@ function imgcode() { | @@ -44,6 +46,7 @@ function imgcode() { | ||
44 | var time = new Date(), | 46 | var time = new Date(), |
45 | $captchaImg = $('#captcha-img'), | 47 | $captchaImg = $('#captcha-img'), |
46 | captchaImgSrc = $captchaImg.attr('src').split('?')[0]; | 48 | captchaImgSrc = $captchaImg.attr('src').split('?')[0]; |
49 | + | ||
47 | $('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime()); | 50 | $('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime()); |
48 | 51 | ||
49 | //getSource('yoho_family_web', '换一张', 'homepage_man'); | 52 | //getSource('yoho_family_web', '换一张', 'homepage_man'); |
@@ -44,4 +44,75 @@ | @@ -44,4 +44,75 @@ | ||
44 | line-height: 48px; | 44 | line-height: 48px; |
45 | } | 45 | } |
46 | } | 46 | } |
47 | + | ||
48 | + .floor-title { | ||
49 | + margin: 80px auto 40px; | ||
50 | + width: 300px; | ||
51 | + font-size: 16px; | ||
52 | + line-height: 30px; | ||
53 | + text-align: center; | ||
54 | + border: 1px solid #000; | ||
55 | + } | ||
56 | + | ||
57 | + .brand-sale { | ||
58 | + | ||
59 | + .sale-group-big { | ||
60 | + .item { | ||
61 | + width: 377px; | ||
62 | + margin-right: 10px; | ||
63 | + | ||
64 | + &.first, | ||
65 | + &.last { | ||
66 | + width: 376px; | ||
67 | + } | ||
68 | + | ||
69 | + &.last { | ||
70 | + margin-right: 0; | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | + .pic { | ||
75 | + position: relative; | ||
76 | + height: 400px; | ||
77 | + } | ||
78 | + | ||
79 | + .time { | ||
80 | + @include box-sizing(border-box); | ||
81 | + position: absolute; | ||
82 | + left: 0; | ||
83 | + bottom: 0; | ||
84 | + width: 100%; | ||
85 | + padding: 0 10px; | ||
86 | + font-size: 16px; | ||
87 | + line-height: 30px; | ||
88 | + text-align: right; | ||
89 | + color: #fff; | ||
90 | + background: #4e4e4e; | ||
91 | + } | ||
92 | + | ||
93 | + .detail { | ||
94 | + background: #f5f5f5; | ||
95 | + } | ||
96 | + | ||
97 | + .brand { | ||
98 | + margin: 24px 10px; | ||
99 | + } | ||
100 | + | ||
101 | + .text { | ||
102 | + padding: 24px 10px 24px 0; | ||
103 | + font-size: 14px; | ||
104 | + color: #fd5659; | ||
105 | + } | ||
106 | + | ||
107 | + .discount { | ||
108 | + font-size: 28px; | ||
109 | + font-weight: bold; | ||
110 | + | ||
111 | + .num { | ||
112 | + font-size: 40px; | ||
113 | + } | ||
114 | + } | ||
115 | + | ||
116 | + } | ||
117 | + } | ||
47 | } | 118 | } |
@@ -50,6 +50,35 @@ class Sale1Controller extends WebAction | @@ -50,6 +50,35 @@ class Sale1Controller extends WebAction | ||
50 | 'desc' => 'Off Price', | 50 | 'desc' => 'Off Price', |
51 | 'link' => 'http://www.yohobuy.com' | 51 | 'link' => 'http://www.yohobuy.com' |
52 | ) | 52 | ) |
53 | + ), | ||
54 | + 'brandSale' => array( | ||
55 | + 'big' => array( | ||
56 | + array( | ||
57 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400', | ||
58 | + 'link' => 'http://www.yohobuy.com', | ||
59 | + 'time' => '低于1小时', | ||
60 | + 'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62', | ||
61 | + 'title' => '2015春夏海量大促!', | ||
62 | + 'discount' => '70%', | ||
63 | + ), | ||
64 | + array( | ||
65 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400', | ||
66 | + 'link' => 'http://www.yohobuy.com', | ||
67 | + 'time' => '低于1小时', | ||
68 | + 'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62', | ||
69 | + 'title' => '2015春夏海量大促!', | ||
70 | + 'discount' => '70%', | ||
71 | + ), | ||
72 | + array( | ||
73 | + 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/03/31/07/02c9f302b6a633d7fac1a08655633a45d3.jpg?imageView/1/w/376/h/400', | ||
74 | + 'link' => 'http://www.yohobuy.com', | ||
75 | + 'time' => '低于1小时', | ||
76 | + 'brand' => 'http://img11.static.yhbimg.com/yhb-img01/2015/12/22/09/0168ae2421d5283414ff5b873fa4a1c16a.jpg?imageView/1/w/185/h/62', | ||
77 | + 'title' => '2015春夏海量大促!', | ||
78 | + 'discount' => '70%', | ||
79 | + ) | ||
80 | + ), | ||
81 | + 'normal' => array() | ||
53 | ) | 82 | ) |
54 | ); | 83 | ); |
55 | $this->setWebNavHeader(); | 84 | $this->setWebNavHeader(); |
-
Please register or login to post a comment