Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
10 changed files
with
61 additions
and
11 deletions
@@ -48,6 +48,9 @@ | @@ -48,6 +48,9 @@ | ||
48 | </span> | 48 | </span> |
49 | </li> | 49 | </li> |
50 | <li class="third-party-login"> | 50 | <li class="third-party-login"> |
51 | + <a href="{{weixinLogin}}"> | ||
52 | + <span class="icon weixin"></span> | ||
53 | + </a> | ||
51 | <a href="{{qqLogin}}"> | 54 | <a href="{{qqLogin}}"> |
52 | <span class="icon qq"></span> | 55 | <span class="icon qq"></span> |
53 | </a> | 56 | </a> |
@@ -70,4 +73,4 @@ | @@ -70,4 +73,4 @@ | ||
70 | </div> | 73 | </div> |
71 | {{/ passport}} | 74 | {{/ passport}} |
72 | </div> | 75 | </div> |
73 | -{{> layout/footer}} | ||
76 | +{{> layout/footer}} |
1 | <div class="register-page"> | 1 | <div class="register-page"> |
2 | - <form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off"> | 2 | + <!--<form id="register-form" class="register-form" method="POST" action="{{actionUrl}}" autocomplete="off">--> |
3 | <ul> | 3 | <ul> |
4 | <li class="clearfix"> | 4 | <li class="clearfix"> |
5 | <select id="region" class="region" name="region"> | 5 | <select id="region" class="region" name="region"> |
@@ -64,5 +64,5 @@ | @@ -64,5 +64,5 @@ | ||
64 | <span></span> | 64 | <span></span> |
65 | <b></b> | 65 | <b></b> |
66 | </div> | 66 | </div> |
67 | - </form> | 67 | + <!--</form>--> |
68 | </div> | 68 | </div> |
3.76 KB
4.71 KB
web-static/img/passport/third/weixin.png
0 → 100644
1020 Bytes
@@ -97,8 +97,8 @@ function phoneAjaxFn(callback) { | @@ -97,8 +97,8 @@ function phoneAjaxFn(callback) { | ||
97 | validateResult[0].message = ''; | 97 | validateResult[0].message = ''; |
98 | validateResult[0].status = true; | 98 | validateResult[0].status = true; |
99 | break; | 99 | break; |
100 | - case 404: | ||
101 | - validateResult[0].message = '改账号已经存在'; | 100 | + case 400: |
101 | + validateResult[0].message = data.message; | ||
102 | validateResult[0].status = false; | 102 | validateResult[0].status = false; |
103 | break; | 103 | break; |
104 | } | 104 | } |
@@ -464,7 +464,48 @@ $registerBtn.click(function() { | @@ -464,7 +464,48 @@ $registerBtn.click(function() { | ||
464 | if ($(this).hasClass('disable')) { | 464 | if ($(this).hasClass('disable')) { |
465 | return; | 465 | return; |
466 | } else { | 466 | } else { |
467 | - ('#register-form').submit(); | 467 | + |
468 | + //ajax提交 | ||
469 | + $.ajax({ | ||
470 | + type: 'POST', | ||
471 | + url: '/passport/register/mobileregister', | ||
472 | + data: { | ||
473 | + area: $region.text().split('+')[1], | ||
474 | + mobile: $pn.val(), | ||
475 | + captcha: $ca.val(), | ||
476 | + code: $mc.val(), | ||
477 | + password: $pwd.val() | ||
478 | + } | ||
479 | + }).then(function(data) { | ||
480 | + | ||
481 | + var time = 0, | ||
482 | + t, | ||
483 | + refer = data.href; | ||
484 | + | ||
485 | + t = setTimeout(function() { | ||
486 | + time++; | ||
487 | + }, 1000); | ||
488 | + | ||
489 | + $.ajax({ | ||
490 | + type: 'POST', | ||
491 | + url: '/passport/register/mobileregister', | ||
492 | + data: { | ||
493 | + session: data.session | ||
494 | + } | ||
495 | + }).then(function(data) { | ||
496 | + | ||
497 | + if (data.code === 200 && t < 3) { | ||
498 | + clearInterval(t); | ||
499 | + location.href = refer; | ||
500 | + } | ||
501 | + }); | ||
502 | + | ||
503 | + if (t >= 3) { | ||
504 | + clearInterval(t); | ||
505 | + location.href = refer; | ||
506 | + } | ||
507 | + | ||
508 | + }); | ||
468 | } | 509 | } |
469 | }); | 510 | }); |
470 | 511 |
@@ -86,7 +86,7 @@ $third: sprite-map("passport/third/*.png"); | @@ -86,7 +86,7 @@ $third: sprite-map("passport/third/*.png"); | ||
86 | 86 | ||
87 | a { | 87 | a { |
88 | display: table-cell; | 88 | display: table-cell; |
89 | - width: 54px; | 89 | + width: 45px; |
90 | background-size: 100% 100%; | 90 | background-size: 100% 100%; |
91 | } | 91 | } |
92 | 92 | ||
@@ -97,6 +97,10 @@ $third: sprite-map("passport/third/*.png"); | @@ -97,6 +97,10 @@ $third: sprite-map("passport/third/*.png"); | ||
97 | margin: 0 auto; | 97 | margin: 0 auto; |
98 | } | 98 | } |
99 | 99 | ||
100 | + .weixin { | ||
101 | + background: sprite($third, weixin) no-repeat; | ||
102 | + } | ||
103 | + | ||
100 | .qq { | 104 | .qq { |
101 | background: sprite($third, qq) no-repeat; | 105 | background: sprite($third, qq) no-repeat; |
102 | } | 106 | } |
@@ -117,4 +121,4 @@ $third: sprite-map("passport/third/*.png"); | @@ -117,4 +121,4 @@ $third: sprite-map("passport/third/*.png"); | ||
117 | background: sprite($third, renren) no-repeat; | 121 | background: sprite($third, renren) no-repeat; |
118 | } | 122 | } |
119 | } | 123 | } |
120 | -} | ||
124 | +} |
@@ -225,7 +225,8 @@ class BindController extends AbstractAction | @@ -225,7 +225,8 @@ class BindController extends AbstractAction | ||
225 | $areaCode = $this->post('areaCode', '86'); | 225 | $areaCode = $this->post('areaCode', '86'); |
226 | $sourceType = $this->post('sourceType'); | 226 | $sourceType = $this->post('sourceType'); |
227 | // $nickname = $this->post('nickname');//nickname不同步信息 | 227 | // $nickname = $this->post('nickname');//nickname不同步信息 |
228 | - $password = !empty($this->post('password')) ? $this->post('password') : ''; | 228 | + $password = $this->post('password'); |
229 | + $password = empty($password) ? '' : $password; | ||
229 | 230 | ||
230 | if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode) { | 231 | if (!is_numeric($phoneNum) || !$openId || !$sourceType || !$areaCode) { |
231 | break; | 232 | break; |
@@ -61,6 +61,7 @@ class LoginController extends AbstractAction | @@ -61,6 +61,7 @@ class LoginController extends AbstractAction | ||
61 | 'countryList' => RegData::getAreasData(), | 61 | 'countryList' => RegData::getAreasData(), |
62 | 'forgetPwd' => Helpers::url('/passport/back/index'), | 62 | 'forgetPwd' => Helpers::url('/passport/back/index'), |
63 | 'fastReg' => Helpers::url('/reg.html'), | 63 | 'fastReg' => Helpers::url('/reg.html'), |
64 | + 'weixinLogin' => Helpers::url('/passport/autosign/weixin'), | ||
64 | 'qqLogin' => Helpers::url('/passport/autosign/qq'), | 65 | 'qqLogin' => Helpers::url('/passport/autosign/qq'), |
65 | 'weiboLogin' => Helpers::url('/passport/autosign/sina'), | 66 | 'weiboLogin' => Helpers::url('/passport/autosign/sina'), |
66 | 'alipayLogin' => Helpers::url('/passport/autosign/alipay'), | 67 | 'alipayLogin' => Helpers::url('/passport/autosign/alipay'), |
@@ -74,7 +75,7 @@ class LoginController extends AbstractAction | @@ -74,7 +75,7 @@ class LoginController extends AbstractAction | ||
74 | 75 | ||
75 | /** | 76 | /** |
76 | * 登录操作 | 77 | * 登录操作 |
77 | - * | 78 | + * |
78 | * @param string areaCode 地区编号, 不需要+号 | 79 | * @param string areaCode 地区编号, 不需要+号 |
79 | * @param string account 账号(邮箱或手机号) | 80 | * @param string account 账号(邮箱或手机号) |
80 | * @param string password 密码 | 81 | * @param string password 密码 |
-
Please register or login to post a comment