Authored by xuqi

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

framework @ 75bbc3b0
1 -Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec 1 +Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
@@ -102,14 +102,14 @@ class HelperSearch @@ -102,14 +102,14 @@ class HelperSearch
102 $result['opts']['pageCount'] = $data['product']['page_total']; 102 $result['opts']['pageCount'] = $data['product']['page_total'];
103 $result['opts']['nextHref'] = ($next = self::next($data['product']['page_total'],$data['product']['filter'])) ? $next['href'] : ''; 103 $result['opts']['nextHref'] = ($next = self::next($data['product']['page_total'],$data['product']['filter'])) ? $next['href'] : '';
104 $result['hasNextPage'] = self::next($data['product']['page_total']); 104 $result['hasNextPage'] = self::next($data['product']['page_total']);
  105 + //全部折扣
  106 + $result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array();
105 //分类条件 107 //分类条件
106 $result['filters']['sort'] = isset($data['sort']) ? self::searchSort($data['sort']['sort']) : array(); 108 $result['filters']['sort'] = isset($data['sort']) ? self::searchSort($data['sort']['sort']) : array();
107 //左侧分类分类 109 //左侧分类分类
108 $result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array(); 110 $result['leftContent'][]['allSort'] = isset($data['sort']) ? self::groupSort($data['sort']['sort']) : array();
109 //一周新品上架 111 //一周新品上架
110 $result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']['recent']) : array(); 112 $result['leftContent'][]['newSales'] = isset($data['recent']) ? self::recentShelve($data['recent']['recent']) : array();
111 - //全部折扣  
112 - $result['leftContent'][]['allDiscount'] = isset($data['discount']) ? self::getDiscount($data['discount']['discount']) : array();  
113 //总记录数 113 //总记录数
114 $result['totalCount'] = $data['product']['total']; 114 $result['totalCount'] = $data['product']['total'];
115 //品牌店铺信息 115 //品牌店铺信息
@@ -86,6 +86,7 @@ $('.invoice').on('touchend', '.checkbox', function() { @@ -86,6 +86,7 @@ $('.invoice').on('touchend', '.checkbox', function() {
86 if ($this.hasClass('icon-checkbox')) { 86 if ($this.hasClass('icon-checkbox')) {
87 $('.invoice').removeClass('focus'); 87 $('.invoice').removeClass('focus');
88 } 88 }
  89 + return false;
89 }); 90 });
90 91
91 function orderCompute(firstEnter) { 92 function orderCompute(firstEnter) {
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 {{! 新品速报}} 9 {{! 新品速报}}
10 {{# newReport}} 10 {{# newReport}}
11 - <div class="new-report clearfix"> 11 + <div class="new-report imgopacity clearfix">
12 {{> index/floor-header}} 12 {{> index/floor-header}}
13 13
14 <ul class="report-list clearfix"> 14 <ul class="report-list clearfix">
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 <div class="preference-brand"> 40 <div class="preference-brand">
41 {{> index/floor-header}} 41 {{> index/floor-header}}
42 <div class="img-brand"> 42 <div class="img-brand">
43 - <ul class="img-list clearfix"> 43 + <ul class="img-list imgopacity clearfix">
44 {{# imgBrand}} 44 {{# imgBrand}}
45 <li class="img-item"> 45 <li class="img-item">
46 <a href="{{href}}" target= "_blank"> 46 <a href="{{href}}" target= "_blank">
@@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
58 </a> 58 </a>
59 </div> 59 </div>
60 </div> 60 </div>
61 - <div class="logo-brand" data-url="{{brandUrl}}"></div> 61 + <div class="logo-brand imgopacity" data-url="{{brandUrl}}"></div>
62 </div> 62 </div>
63 {{/ preferenceBrands}} 63 {{/ preferenceBrands}}
64 64
@@ -14,14 +14,14 @@ @@ -14,14 +14,14 @@
14 {{/ category}} 14 {{/ category}}
15 </div> 15 </div>
16 </div> 16 </div>
17 - <div class="tpl-brands clearfix"> 17 + <div class="tpl-brands imgopacity clearfix">
18 <ul> 18 <ul>
19 {{#each brands}} 19 {{#each brands}}
20 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li> 20 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li>
21 {{/each}} 21 {{/each}}
22 </ul> 22 </ul>
23 </div> 23 </div>
24 - <div class="tpl-types clearfix"> 24 + <div class="tpl-types imgopacity clearfix">
25 <ul> 25 <ul>
26 {{#each types}} 26 {{#each types}}
27 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li> 27 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 </ul> 29 </ul>
30 </div> 30 </div>
31 </div> 31 </div>
32 - <div class="tpl-products clearfix"> 32 + <div class="tpl-products imgopacity clearfix">
33 <ul> 33 <ul>
34 {{#each products}} 34 {{#each products}}
35 <li><a href="{{href}}" title="{{name}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li> 35 <li><a href="{{href}}" title="{{name}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li>
1 <div class="singlehot clearfix"> 1 <div class="singlehot clearfix">
2 {{> index/floor-header}} 2 {{> index/floor-header}}
3 - <ul class="g-list"> 3 + <ul class="g-list imgopacity">
4 {{#each imgHot}} 4 {{#each imgHot}}
5 <li><a class="impo{{@index}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li> 5 <li><a class="impo{{@index}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li>
6 {{/each}} 6 {{/each}}
1 {{> index/floor-header}} 1 {{> index/floor-header}}
2 -<div class="categorys-list"> 2 +<div class="categorys-list imgopacity">
3 <ul class="clearfix"> 3 <ul class="clearfix">
4 {{# list}} 4 {{# list}}
5 <li class="cate-item{{@index}}"> 5 <li class="cate-item{{@index}}">
@@ -14,12 +14,12 @@ @@ -14,12 +14,12 @@
14 {{/ category}} 14 {{/ category}}
15 </div> 15 </div>
16 </div> 16 </div>
17 - <div class="tpl-brands clearfix"> 17 + <div class="tpl-brands imgopacity clearfix">
18 {{#each brands}} 18 {{#each brands}}
19 <a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a> 19 <a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a>
20 {{/each}} 20 {{/each}}
21 </div> 21 </div>
22 - <div class="tpl-types clearfix"> 22 + <div class="tpl-types imgopacity clearfix">
23 <ul> 23 <ul>
24 {{#each types}} 24 {{#each types}}
25 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li> 25 <li><a title="{{name}}" href="{{href}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a></li>
1 <div class="commodity clearfix"> 1 <div class="commodity clearfix">
2 {{> index/floor-header}} 2 {{> index/floor-header}}
3 <div class="commodity-list"> 3 <div class="commodity-list">
4 - <ul class="g-list clearfix"> 4 + <ul class="g-list imgopacity clearfix">
5 {{#each imgHot}} 5 {{#each imgHot}}
6 <li> 6 <li>
7 <a href="{{href}}" target= "_blank"><div class="commodity-img"> 7 <a href="{{href}}" target= "_blank"><div class="commodity-img">
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 {{/each}} 16 {{/each}}
17 </ul> 17 </ul>
18 </div> 18 </div>
19 - <div class="commodity-brands clearfix"> 19 + <div class="commodity-brands imgopacity clearfix">
20 {{#each brands}} 20 {{#each brands}}
21 <a href="{{href}}" title="{{name}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a> 21 <a href="{{href}}" title="{{name}}" target= "_blank"><img class="lazy" data-original="{{img}}"/></a>
22 {{/each}} 22 {{/each}}
1 {{> index/floor-header}} 1 {{> index/floor-header}}
2 -<div class="preference-brand"> 2 +<div class="preference-brand imgopacity">
3 <div class="img-slider-wrapper clearfix"> 3 <div class="img-slider-wrapper clearfix">
4 <div class="img-brand-switch"> 4 <div class="img-brand-switch">
5 <a class="prev iconfont" href="javascript:;">&#xe60f;</a> 5 <a class="prev iconfont" href="javascript:;">&#xe60f;</a>
@@ -15,6 +15,6 @@ @@ -15,6 +15,6 @@
15 </ul> 15 </ul>
16 </div> 16 </div>
17 </div> 17 </div>
18 - <div class="logo-brand" data-url="{{brandUrl}}"> 18 + <div class="logo-brand " data-url="{{brandUrl}}">
19 </div> 19 </div>
20 </div> 20 </div>
1 <div class="register-page"> 1 <div class="register-page">
2 - <!--<form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off">-->  
3 <ul> 2 <ul>
4 <li class="clearfix"> 3 <li class="clearfix">
5 <select id="region" class="region" name="region"> 4 <select id="region" class="region" name="region">
@@ -49,7 +48,7 @@ @@ -49,7 +48,7 @@
49 {{# loginUrl}} 48 {{# loginUrl}}
50 <li class="quick-login-container"> 49 <li class="quick-login-container">
51 我已注册YOHO!有货账号 50 我已注册YOHO!有货账号
52 - <a class="link go-login" href="{{.}}">完善信息</a> 51 + <a class="link go-login" href="{{.}}">快速登录</a>
53 </li> 52 </li>
54 {{/loginUrl}} 53 {{/loginUrl}}
55 54
@@ -64,5 +63,4 @@ @@ -64,5 +63,4 @@
64 <span></span> 63 <span></span>
65 <b></b> 64 <b></b>
66 </div> 65 </div>
67 - <!--</form>-->  
68 </div> 66 </div>
@@ -39,12 +39,12 @@ @@ -39,12 +39,12 @@
39 <div class="good-detail-text"> 39 <div class="good-detail-text">
40 <a href="{{url}}">{{name}}</a> 40 <a href="{{url}}">{{name}}</a>
41 <p class="price"> 41 <p class="price">
42 - <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">  
43 - ¥{{salePrice}}  
44 - </span>  
45 {{# marketPrice}} 42 {{# marketPrice}}
46 <span class="market-price">¥{{.}}</span> 43 <span class="market-price">¥{{.}}</span>
47 {{/ marketPrice}} 44 {{/ marketPrice}}
  45 + <span class="sale-price{{#unless marketPrice}}prime-cost{{/unless}}">
  46 + ¥{{salePrice}}
  47 + </span>
48 </p> 48 </p>
49 </div> 49 </div>
50 </div> 50 </div>
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <span>{{updateNum}}</span> 9 <span>{{updateNum}}</span>
10 </li> 10 </li>
11 {{#each list}} 11 {{#each list}}
12 - <li {{#if active}}active{{/if}}> 12 + <li {{#if active}}class="active"{{/if}}>
13 <a href="{{href}}">{{name}}</a> 13 <a href="{{href}}">{{name}}</a>
14 <span>{{num}}</span> 14 <span>{{num}}</span>
15 </li> 15 </li>
@@ -165,7 +165,7 @@ module.exports = function(data) { @@ -165,7 +165,7 @@ module.exports = function(data) {
165 165
166 166
167 load.tpl = '{{#each this}}'; 167 load.tpl = '{{#each this}}';
168 - load.tpl += '<div class="good-info" data-skn="{{skn}}">'; 168 + load.tpl += '<div class="good-info imgopacity" data-skn="{{skn}}">';
169 load.tpl += ' <div class="tag-container clearfix">'; 169 load.tpl += ' <div class="tag-container clearfix">';
170 load.tpl += ' {{# tags}}'; 170 load.tpl += ' {{# tags}}';
171 load.tpl += ' {{# isNew}}'; 171 load.tpl += ' {{# isNew}}';
@@ -16,6 +16,13 @@ require('../common/logo-brand'); @@ -16,6 +16,13 @@ require('../common/logo-brand');
16 16
17 require('../common/accordion'); 17 require('../common/accordion');
18 18
  19 +$(document).on('mouseenter', '.imgopacity a img', function() {
  20 + $(this).css('opacity', 0.8);
  21 +});
  22 +$(document).on('mouseout', '.imgopacity a img', function() {
  23 + $(this).css('opacity', 1);
  24 +});
  25 +
19 if (homePage === 'brands') { 26 if (homePage === 'brands') {
20 require('./brands'); 27 require('./brands');
21 } 28 }
@@ -29,7 +29,9 @@ var $pwdIntensity = $('.pwd-intensity'), @@ -29,7 +29,9 @@ var $pwdIntensity = $('.pwd-intensity'),
29 29
30 //signup验证 30 //signup验证
31 var $region = $('#country-code'), 31 var $region = $('#country-code'),
32 - $regionSelect = $('#region'); 32 + $regionSelect = $('#region'),
  33 + isPwd = false,
  34 + pwdVal;
33 35
34 setTimeout(function() { 36 setTimeout(function() {
35 $pn.val(''); 37 $pn.val('');
@@ -43,10 +45,13 @@ setTimeout(function() { @@ -43,10 +45,13 @@ setTimeout(function() {
43 $ca.attr('maxlength', caCount); 45 $ca.attr('maxlength', caCount);
44 46
45 //密码规则提示 47 //密码规则提示
46 -$pwd.focus(function() { 48 +$pwd.focus(function(event) {
47 $pwdTips.removeClass('hide'); 49 $pwdTips.removeClass('hide');
  50 + isPwd = true;
  51 + pwdVal = $(this).val();
48 }).blur(function() { 52 }).blur(function() {
49 $pwdTips.addClass('hide'); 53 $pwdTips.addClass('hide');
  54 + isPwd = false;
50 }); 55 });
51 56
52 57
@@ -509,6 +514,23 @@ exports.init = function(page) { @@ -509,6 +514,23 @@ exports.init = function(page) {
509 }); 514 });
510 }); 515 });
511 516
  517 + // 防止粘贴密码
  518 + /*$('#pwd, #repwd').keydown(function (event) {
  519 +
  520 + console.log(event.ctrlKey);
  521 + console.log(isPwd);
  522 + console.log(event.keyCode);
  523 +
  524 + if (event.ctrlKey && isPwd && event.keyCode === 86) {
  525 + $(this).val(pwdVal);
  526 + }
  527 +
  528 + });*/
  529 +
  530 + $pwd[0].onpaste = function() {
  531 + return false;
  532 + };
  533 +
512 //ajax表单提交 534 //ajax表单提交
513 $registerBtn.click(function() { 535 $registerBtn.click(function() {
514 536
@@ -221,6 +221,7 @@ @@ -221,6 +221,7 @@
221 background-color: rgb(255,87,92); 221 background-color: rgb(255,87,92);
222 color: #fff; 222 color: #fff;
223 border-radius: 30px; 223 border-radius: 30px;
  224 + z-index: 2;
224 } 225 }
225 .commodity-img{ 226 .commodity-img{
226 position: relative; 227 position: relative;
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 outline: none; 27 outline: none;
28 } 28 }
29 29
30 - input { 30 + input.input {
31 height: 43px; 31 height: 43px;
32 line-height: 43px; 32 line-height: 43px;
33 font-size: 16px; 33 font-size: 16px;
@@ -53,7 +53,12 @@ @@ -53,7 +53,12 @@
53 float: left; 53 float: left;
54 } 54 }
55 55
56 - &.send-captcha { 56 + &.agree-terms {
  57 + vertical-align: middle;
  58 + }
  59 + }
  60 +
  61 + input.send-captcha {
57 top: 0; 62 top: 0;
58 background: #ff1901; 63 background: #ff1901;
59 position: absolute; 64 position: absolute;
@@ -68,13 +73,6 @@ @@ -68,13 +73,6 @@
68 } 73 }
69 } 74 }
70 75
71 - &.agree-terms {  
72 - width: initial;  
73 - height: initial;  
74 - vertical-align: middle;  
75 - }  
76 - }  
77 -  
78 .link { 76 .link {
79 text-decoration: underline; 77 text-decoration: underline;
80 color: #ff1901; 78 color: #ff1901;
@@ -52,6 +52,11 @@ @@ -52,6 +52,11 @@
52 > .price { 52 > .price {
53 margin-top: 10px; 53 margin-top: 10px;
54 } 54 }
  55 +
  56 + .market-price {
  57 + text-decoration: line-through;
  58 + color: #999;
  59 + }
55 } 60 }
56 61
57 .col-btn { 62 .col-btn {
@@ -102,9 +102,6 @@ class SearchModel @@ -102,9 +102,6 @@ class SearchModel
102 if (!isset($condition['order']) || empty($condition['order'])) { 102 if (!isset($condition['order']) || empty($condition['order'])) {
103 $condition['order'] = 's_n_desc'; 103 $condition['order'] = 's_n_desc';
104 } 104 }
105 - if (!isset($condition['p_d']) || empty($condition['p_d'])) {  
106 - $condition['p_d'] = '0,0.9';  
107 - }  
108 $options = array( 105 $options = array(
109 'imgSize' => $imgSize, 106 'imgSize' => $imgSize,
110 'minImgSize' => $minImgSize, 107 'minImgSize' => $minImgSize,
@@ -168,8 +165,10 @@ class SearchModel @@ -168,8 +165,10 @@ class SearchModel
168 // 组合搜索分类url 165 // 组合搜索分类url
169 $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']); 166 $urlList['sort'] = HelperSearch::getClassesUrl($searchCondition['condition']);
170 // 组合搜索店铺url 167 // 组合搜索店铺url
  168 + if (isset($param['keyword'])) {
171 $param['keyword'] = $searchCondition['condition']['query']; 169 $param['keyword'] = $searchCondition['condition']['query'];
172 $urlList['shop'] = HelperSearch::getShopUrl($param); 170 $urlList['shop'] = HelperSearch::getShopUrl($param);
  171 + }
173 //用户浏览记录 172 //用户浏览记录
174 //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']); 173 //$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
175 $result = Yohobuy::getMulti($urlList, array(), true); 174 $result = Yohobuy::getMulti($urlList, array(), true);
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 4
5 -class RegisterController extends AbstractAction 5 +class Register1Controller extends AbstractAction
6 { 6 {
7 /** 7 /**
8 * 登录页 8 * 登录页
@@ -49,7 +49,7 @@ class RegisterController extends AbstractAction @@ -49,7 +49,7 @@ class RegisterController extends AbstractAction
49 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190' 49 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190'
50 ) 50 )
51 ); 51 );
52 - $this->_view->display('index', $data); 52 + $this->_view->display('../register/index', $data);
53 } 53 }
54 54
55 public function checkmobileAction() 55 public function checkmobileAction()
@@ -17,7 +17,11 @@ class ListController extends WebAction @@ -17,7 +17,11 @@ class ListController extends WebAction
17 */ 17 */
18 public function saleAction() 18 public function saleAction()
19 { 19 {
20 - $list = SearchModel::getListData(); 20 + //排序
  21 + $condition['order'] = 's_n_desc';
  22 + //打折
  23 + $condition['p_d'] = '0,0.9';
  24 + $list = SearchModel::getListData($condition);
21 $data = array( 25 $data = array(
22 //初始化js 26 //初始化js
23 'productListPage' => true, 27 'productListPage' => true,