Authored by uedxwg

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

@@ -15,6 +15,18 @@ var $curContent = $contents.not('.hide'); @@ -15,6 +15,18 @@ var $curContent = $contents.not('.hide');
15 15
16 var navHammer, ccHammer; 16 var navHammer, ccHammer;
17 17
  18 +//初始化container高度
  19 +(function() {
  20 + var $header = $('.yoho-header'),
  21 + $search = $('#search-input');
  22 +
  23 + var h = $(window).height() - $header.outerHeight() - $search.outerHeight() - $nav.outerHeight();
  24 +
  25 + $categoryContainer.css('min-height', h);
  26 +
  27 + $contents.height(h);
  28 +}());
  29 +
18 $('#search-input').focus(function() { 30 $('#search-input').focus(function() {
19 $(this).blur(); 31 $(this).blur();
20 }); 32 });
@@ -16,7 +16,9 @@ var showErrTip = tip.show; @@ -16,7 +16,9 @@ var showErrTip = tip.show;
16 16
17 var $phoneNum = $('#phone-num'); 17 var $phoneNum = $('#phone-num');
18 18
19 -api.bindEyesEvt(); 19 +api.bindEyesEvt({
  20 + status: 'open'
  21 +});
20 22
21 $pwd.bind('input', function() { 23 $pwd.bind('input', function() {
22 if (trim($pwd.val()) === '') { 24 if (trim($pwd.val()) === '') {
@@ -54,14 +54,7 @@ $btnSure.on('touchstart', function() { @@ -54,14 +54,7 @@ $btnSure.on('touchstart', function() {
54 location.href = data.data; 54 location.href = data.data;
55 }, 1000); 55 }, 1000);
56 } else { 56 } else {
57 - if (data.code === 401 || data.code === 404 || data.code === 505) {  
58 showErrTip(data.message); 57 showErrTip(data.message);
59 - } else {  
60 - showErrTip(data.message);  
61 - setTimeout(function() {  
62 - location.href = data.data;  
63 - }, 1000);  
64 - }  
65 } 58 }
66 } 59 }
67 }); 60 });
@@ -17,7 +17,7 @@ var $tip, tipItime; @@ -17,7 +17,7 @@ var $tip, tipItime;
17 $('.yoho-page').append(tipHtml); 17 $('.yoho-page').append(tipHtml);
18 18
19 $tip = $('#yoho-tip'); 19 $tip = $('#yoho-tip');
20 - $tip.on('tap', function() { 20 + $tip.on('touchend', function() {
21 $tip.hide(); 21 $tip.hide();
22 22
23 //清除Timeout 23 //清除Timeout
@@ -140,7 +140,6 @@ @@ -140,7 +140,6 @@
140 i { 140 i {
141 display: inline-block; 141 display: inline-block;
142 margin-top: -4rem / $pxConvertRem; 142 margin-top: -4rem / $pxConvertRem;
143 - margin-left: 24rem / $pxConvertRem;  
144 width: 108rem / $pxConvertRem; 143 width: 108rem / $pxConvertRem;
145 height: 42rem / $pxConvertRem; 144 height: 42rem / $pxConvertRem;
146 text-align: center; 145 text-align: center;
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 } 32 }
33 33
34 .category-nav { 34 .category-nav {
35 - height: 71rem / $pxConvertRem; 35 + height: 70rem / $pxConvertRem;
36 border-bottom: 1px solid #e6e6e6; 36 border-bottom: 1px solid #e6e6e6;
37 37
38 li { 38 li {
@@ -40,10 +40,9 @@ @@ -40,10 +40,9 @@
40 box-sizing: border-box; 40 box-sizing: border-box;
41 float: left; 41 float: left;
42 height: 100%; 42 height: 100%;
43 - line-height: 71rem / $pxConvertRem; 43 + padding: 20rem / $pxConvertRem 0;
44 width: 25%; 44 width: 25%;
45 text-align: center; 45 text-align: center;
46 - border-right: 1px solid #e6e6e6;  
47 color: #999; 46 color: #999;
48 47
49 &:last-child { 48 &:last-child {
@@ -54,17 +53,33 @@ @@ -54,17 +53,33 @@
54 color: #000; 53 color: #000;
55 } 54 }
56 } 55 }
  56 +
  57 + span {
  58 + display: block;
  59 + width: 100%;
  60 + height: 30rem / $pxConvertRem;
  61 + line-height: 30rem / $pxConvertRem;
  62 + font-size: 30rem / $pxConvertRem;
  63 + border-right: 1px solid #e6e6e6;
  64 + }
  65 +
  66 + li:last-child span {
  67 + border-right: 0;
  68 + }
57 } 69 }
58 70
59 - .content.hide { 71 + .content {
  72 + background: #f8f8f8;
  73 +
  74 + &.hide {
60 display: none; 75 display: none;
61 } 76 }
  77 + }
62 78
63 .primary-level { 79 .primary-level {
64 float: left; 80 float: left;
65 box-sizing: border-box; 81 box-sizing: border-box;
66 width: 40%; 82 width: 40%;
67 - background: #f8f8f8;  
68 83
69 > li { 84 > li {
70 height: 69rem / $pxConvertRem; 85 height: 69rem / $pxConvertRem;
@@ -83,6 +98,8 @@ @@ -83,6 +98,8 @@
83 padding-left: 20rem / $pxConvertRem; 98 padding-left: 20rem / $pxConvertRem;
84 background: #fff; 99 background: #fff;
85 width: 60%; 100 width: 60%;
  101 + height: 100%;
  102 + overflow: auto;
86 } 103 }
87 104
88 .sub-level { 105 .sub-level {
@@ -107,10 +124,6 @@ @@ -107,10 +124,6 @@
107 height: 100%; 124 height: 100%;
108 width: 100%; 125 width: 100%;
109 color: #000; 126 color: #000;
110 -  
111 - &:visisted {  
112 - color: #000;  
113 - }  
114 } 127 }
115 } 128 }
116 } 129 }
1 .hot-brands { 1 .hot-brands {
2 - background: #fff; 2 + background: #f0f0f0;
3 border-bottom: 1px solid #e0e0e0; 3 border-bottom: 1px solid #e0e0e0;
4 4
5 a { 5 a {
@@ -8,6 +8,10 @@ @@ -8,6 +8,10 @@
8 height: 100%; 8 height: 100%;
9 } 9 }
10 10
  11 + > * {
  12 + background: #fff;
  13 + }
  14 +
11 .brand { 15 .brand {
12 float: left; 16 float: left;
13 width: 158rem / $pxConvertRem; 17 width: 158rem / $pxConvertRem;
@@ -45,6 +45,13 @@ a { @@ -45,6 +45,13 @@ a {
45 text-decoration: none; 45 text-decoration: none;
46 outline: none; 46 outline: none;
47 color: #000; 47 color: #000;
  48 +
  49 + &:link,
  50 + &:visited,
  51 + &:hover,
  52 + &:actived {
  53 + color: #000;
  54 + }
48 } 55 }
49 56
50 *:focus { 57 *:focus {
@@ -66,10 +66,6 @@ @@ -66,10 +66,6 @@
66 font-size: 28rem / $pxConvertRem; 66 font-size: 28rem / $pxConvertRem;
67 background: #f8f8f8; 67 background: #f8f8f8;
68 color: #000; 68 color: #000;
69 -  
70 - &:visited {  
71 - color: #000;  
72 - }  
73 } 69 }
74 70
75 .clear-history { 71 .clear-history {
@@ -50,10 +50,6 @@ @@ -50,10 +50,6 @@
50 font-size: 17px; 50 font-size: 17px;
51 background: #fff; 51 background: #fff;
52 color: #000; 52 color: #000;
53 -  
54 - &:visisted {  
55 - color: #000;  
56 - }  
57 } 53 }
58 54
59 .brand-thumb { 55 .brand-thumb {
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <div class="category-nav clearfix"> 10 <div class="category-nav clearfix">
11 {{# class}} 11 {{# class}}
12 <li class={{#if focus}}focus{{/if}}> 12 <li class={{#if focus}}focus{{/if}}>
13 - {{name}} 13 + <span>{{name}}</span>
14 </li> 14 </li>
15 {{/ class}} 15 {{/ class}}
16 </div> 16 </div>
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 {{> passport/header}} 3 {{> passport/header}}
4 <div class="content"> 4 <div class="content">
5 <div class="input-container row has-eye"> 5 <div class="input-container row has-eye">
6 - <input id="pwd" class="input pwd" type="password" placeholder="请输入新密码" autocomplete="off" maxlength="20"> 6 + <input id="pwd" class="input pwd" type="text" placeholder="请输入新密码" autocomplete="off" maxlength="20">
7 </div> 7 </div>
8 <span id="btn-ok" class="btn btn-ok disable">完成</span> 8 <span id="btn-ok" class="btn btn-ok disable">完成</span>
9 </div> 9 </div>
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 {{> passport/header}} 3 {{> passport/header}}
4 <div class="content"> 4 <div class="content">
5 <div class="input-container row has-eye"> 5 <div class="input-container row has-eye">
6 - <input id="pwd" class="input pwd" type="password" placeholder="请输入密码" autocomplete="off" maxlength="20"> 6 + <input id="pwd" class="input pwd" type="text" placeholder="请输入密码" autocomplete="off" maxlength="20">
7 </div> 7 </div>
8 <span id="btn-sure" class="btn btn-sure disable row">确定</span> 8 <span id="btn-sure" class="btn btn-sure disable row">确定</span>
9 </div> 9 </div>
1 <div class="header"> 1 <div class="header">
2 {{#backUrl}} 2 {{#backUrl}}
3 - <a class="go-back" href={{.}}></a> 3 + <a class="go-back" href="javascript:history.go(-1);"></a>
4 {{/backUrl}} 4 {{/backUrl}}
5 {{#showHeaderImg}} 5 {{#showHeaderImg}}
6 <div class="img-header"></div> 6 <div class="img-header"></div>
@@ -165,7 +165,7 @@ class BackController extends AbstractAction @@ -165,7 +165,7 @@ class BackController extends AbstractAction
165 */ 165 */
166 public function sendcodeAction() 166 public function sendcodeAction()
167 { 167 {
168 - $result = array('code' => 400, 'message' => '手机号码格式不正确,请重新输入', 'data' => ''); 168 + $result = array('code' => 400, 'message' => '密码只能使用数字、字母和半角标点符号,请重新输入', 'data' => '');
169 do 169 do
170 { 170 {
171 /* 判断是不是AJAX请求 */ 171 /* 判断是不是AJAX请求 */
@@ -149,7 +149,7 @@ class RegController extends AbstractAction @@ -149,7 +149,7 @@ class RegController extends AbstractAction
149 */ 149 */
150 public function verifycodeAction() 150 public function verifycodeAction()
151 { 151 {
152 - $data = array('code' => 400, 'message' => '验证码不正确', 'data' => ''); 152 + $data = array('code' => 400, 'message' => '验证码错误', 'data' => '');
153 153
154 do { 154 do {
155 /* 判断是不是AJAX请求 */ 155 /* 判断是不是AJAX请求 */
@@ -175,6 +175,8 @@ class RegController extends AbstractAction @@ -175,6 +175,8 @@ class RegController extends AbstractAction
175 if ($data['code'] == 200) { 175 if ($data['code'] == 200) {
176 $token = Helpers::makeToken($mobile); 176 $token = Helpers::makeToken($mobile);
177 $data['data'] = '/passport/reg/password?token='.$token.'&phoneNum='.$mobile.'&areaCode='.$area; 177 $data['data'] = '/passport/reg/password?token='.$token.'&phoneNum='.$mobile.'&areaCode='.$area;
  178 + } else if ($data['code'] == 404) {
  179 + $data['message'] = '验证码错误'; //统一验证提示
178 } 180 }
179 181
180 } while (false); 182 } while (false);