Merge branch 'feature/passport' of http://git.dev.yoho.cn/web/yohobuy into feature/passport
Showing
19 changed files
with
1263 additions
and
27 deletions
@@ -5,35 +5,35 @@ | @@ -5,35 +5,35 @@ | ||
5 | <div class="content"> | 5 | <div class="content"> |
6 | <div class="back-header clearfix"> | 6 | <div class="back-header clearfix"> |
7 | <h2 class="title">找回密码</h2> | 7 | <h2 class="title">找回密码</h2> |
8 | - <span class="country-code"> | ||
9 | - <em>中国 +86</em> | 8 | + <span id="country-code" class="country-code"> |
9 | + <em>{{countryName}} +{{countryCode}}</em> | ||
10 | <i class="iconfont"></i> | 10 | <i class="iconfont"></i> |
11 | </span> | 11 | </span> |
12 | <ul id="country-code-list" class="country-code-list"> | 12 | <ul id="country-code-list" class="country-code-list"> |
13 | - <li data-cc="+61">澳大利亚 +61</li> | ||
14 | - <li data-cc="+82">韩国 +82</li> | ||
15 | - <li data-cc="+1">加拿大 +1</li> | ||
16 | - <li data-cc="+60">马来西亚 +60</li> | ||
17 | - <li data-cc="+1">美国 +1</li> | ||
18 | - <li data-cc="+81">日本 +81</li> | ||
19 | - <li data-cc="+65">新加坡 +65</li> | ||
20 | - <li data-cc="+44">英国 +44</li> | ||
21 | - <li data-cc="+86">中国 +86</li> | ||
22 | - <li data-cc="+853">中国澳门 +853</li> | ||
23 | - <li data-cc="+886">中国台湾 +886</li> | ||
24 | - <li data-cc="+852">中国香港 +852</li> | 13 | + {{# countryList}} |
14 | + <li data-cc="+{{code}}">{{name}} +{{code}}</li> | ||
15 | + {{/ countryList}} | ||
25 | </ul> | 16 | </ul> |
26 | </div> | 17 | </div> |
27 | <form id="back-form" class="back-form" action=""> | 18 | <form id="back-form" class="back-form" action=""> |
28 | - <input id="country-code-hide" type="hidden" name="country-code" value="+44"> | 19 | + <input id="country-code-hide" type="hidden" name="country-code" value="+86"> |
29 | <ul> | 20 | <ul> |
30 | <li class="input-container-li clearfix"> | 21 | <li class="input-container-li clearfix"> |
31 | <input id="phone-num" class="input va phone-num" type="text" name="phoneNum" placeholder="邮箱/手机号码" autocomplete="off"> | 22 | <input id="phone-num" class="input va phone-num" type="text" name="phoneNum" placeholder="邮箱/手机号码" autocomplete="off"> |
23 | + <ul id="tip-panel" class="tip-panel"></ul> | ||
24 | + <span id="account-err" class="err-tip hide"> | ||
25 | + <i></i> | ||
26 | + <em>账户名不能为空</em> | ||
27 | + </span> | ||
32 | </li> | 28 | </li> |
33 | <li class="input-container-li clearfix"> | 29 | <li class="input-container-li clearfix"> |
34 | <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="验证码" autocomplete="off" maxlength="4"> | 30 | <input id="captcha" class="input va captcha" type="text" name="captcha" placeholder="验证码" autocomplete="off" maxlength="4"> |
35 | - <img id="captcha-img" class="captcha-img" src="http://www.yohobuy.com/passport/images" alt="" onclick="imgcode()"> | ||
36 | - <a class="link change-captcha" onclick="imgcode()">换一张</a> | 31 | + <img id="captcha-img" class="captcha-img" src="http://www.yohobuy.com/passport/images" alt=""> |
32 | + <a id="change-captcha" class="link change-captcha">换一张</a> | ||
33 | + <span id="captcha-err" class="err-tip captcha-err hide"> | ||
34 | + <i></i> | ||
35 | + <em>验证码不能为空</em> | ||
36 | + </span> | ||
37 | </li> | 37 | </li> |
38 | <li class="input-container-li clearfix"> | 38 | <li class="input-container-li clearfix"> |
39 | <input name="refer" id="refer" type="hidden" value="http%3A%2F%2Fwww.yohobuy.com%2F"> | 39 | <input name="refer" id="refer" type="hidden" value="http%3A%2F%2Fwww.yohobuy.com%2F"> |
1 | +{{> layout/simple-header}} | ||
2 | +<div class="reset-pwd-page back-page passport-page yoho-page clearfix"> | ||
3 | +{{# resetPwd}} | ||
4 | + {{> passport/cover}} | ||
5 | + <div class="content"> | ||
6 | + <h2 class="title2">重置密码</h2> | ||
7 | + <form id="reset-pwd-form" class="reset-pwd-form" method="POST" action="/passport/back/update"> | ||
8 | + <ul> | ||
9 | + <li class="input-container-li po-re"> | ||
10 | + <input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="新密码" maxlength="20"> | ||
11 | + <div class="pwd-intensity-container"> | ||
12 | + <span class="pwd-intensity low">低</span> | ||
13 | + <span class="pwd-intensity mid">中</span> | ||
14 | + <span class="pwd-intensity high">高</span> | ||
15 | + </div> | ||
16 | + <div id="pwd-tips" class="pwd-tips hide"> | ||
17 | + <div class="default" id="pwd-tip1">密码只支持6-20位字符</div> | ||
18 | + <div class="default" id="pwd-tip2">建议由字母、 数字、 符号两种以上组合</div> | ||
19 | + </div> | ||
20 | + <span id="pwd-err" class="err-tip hide"> | ||
21 | + <i></i> | ||
22 | + <em>请输入密码</em> | ||
23 | + </span> | ||
24 | + </li> | ||
25 | + <li class="input-container-li clearfix po-re"> | ||
26 | + <input id="re-input" class="input va re-input repwd" type="password" name="re-input" placeholder="再次输入" maxlength="20"> | ||
27 | + <span id="repwd-err" class="err-tip hide"> | ||
28 | + <i></i> | ||
29 | + <em>请输入密码确认</em> | ||
30 | + </span> | ||
31 | + </li> | ||
32 | + <li class="input-container-li clearfix"> | ||
33 | + <input type="hidden" name="code" value="159bI6arxsuaPBxG2iV9OE9BrgDnAPiTecUqYh2iUC3ntt6S0eOtxXpVu+jWIlveXx9NRuwS9zdrXzcUyOd+d3ikzYBAo0k"> | ||
34 | + <input id="reset-pwd-btn" class="btn reset-pwd-btn" type="submit" value="提交" disabled=""> | ||
35 | + </li> | ||
36 | + </ul> | ||
37 | + </form> | ||
38 | + </div> | ||
39 | +{{/ resetPwd}} | ||
40 | +</div> | ||
41 | +{{> layout/footer}} |
1 | +{{> layout/simple-header}} | ||
2 | +<div class="reset-success-page back-page passport-page yoho-page clearfix"> | ||
3 | +{{# resetSuccess}} | ||
4 | + {{> passport/cover}} | ||
5 | + <div class="content"> | ||
6 | + <div class="success-text"> | ||
7 | + <i class="iconfont"></i><span>恭喜!</span>密码修改成功, <span id="count-down">5</span> 秒后将跳转至首页 | ||
8 | + </div> | ||
9 | + <a class="success-btn" href="/">随便逛逛</a> | ||
10 | + </div> | ||
11 | +{{/ resetSuccess}} | ||
12 | +</div> | ||
13 | +{{> layout/footer}} |
1 | +{{> layout/simple-header}} | ||
2 | +<div class="send-email-page passport-page yoho-page clearfix"> | ||
3 | +{{# sendEmail}} | ||
4 | + {{> passport/cover}} | ||
5 | + <div class="content"> | ||
6 | + <div class="send-tips"><i class="iconfont"></i>我们已经把验证邮件发送至您的邮箱,请在24小时内通过邮件内的<br>链接继续设置新的密码。</div> | ||
7 | + <div class="no-find">没有收到?到您邮箱的垃圾邮件里找找。</div> | ||
8 | + <div class="to-my-email"> | ||
9 | + <a href="http://mail.qq.com" target="_blank" class="btn_b_ar_r">去我的邮箱></a> | ||
10 | + </div> | ||
11 | + | ||
12 | + </div> | ||
13 | +{{/ sendEmail}} | ||
14 | +</div> | ||
15 | +{{> layout/footer}} |
1 | +{{> layout/simple-header}} | ||
2 | +<div class="verification-page back-page passport-page yoho-page clearfix"> | ||
3 | +{{# verification}} | ||
4 | + {{> passport/cover}} | ||
5 | + <div class="content"> | ||
6 | + <form id="verification-form" class="verification-form" method="POST" action="/passport/back/backmobile"> | ||
7 | + <ul> | ||
8 | + <li class="head-title">验证身份</li> | ||
9 | + <li class="po-re"> | ||
10 | + <label class="pn-label">手机号码</label> | ||
11 | + <span class="country-code">+86</span> | ||
12 | + <span class="phone-num">18115624066</span> | ||
13 | + </li> | ||
14 | + <li class="po-re"> | ||
15 | + <input id="captcha" class="input va captcha" type="text" name="captcha"> | ||
16 | + <input id="send-captcha" class="btn send-captcha" type="button" value="发送验证码" disabled=""> | ||
17 | + <div id="captcha-tip" class="captcha-tips"><i class="iconfont"></i>验证码已发送至您的手机,请查收</div> | ||
18 | + <span id="err-tip" class="err-tip hide"> | ||
19 | + <i></i> | ||
20 | + <em>请输入验证码</em> | ||
21 | + </span> | ||
22 | + </li> | ||
23 | + <li> | ||
24 | + <input name="area" id="area" type="hidden" value="86"> | ||
25 | + <input name="mobile" id="mobile" type="hidden" value="18115624066"> | ||
26 | + <input name="captchaPic" id="captchaPic" type="hidden" value="g7ce"> | ||
27 | + <input name="refer" id="refer" type="hidden" value=""> | ||
28 | + <input id="next-step" class="btn next-step disable" type="submit" value="下一步" disabled=""> | ||
29 | + </li> | ||
30 | + </ul> | ||
31 | + </form> | ||
32 | + </div> | ||
33 | +{{/ verification}} | ||
34 | +</div> | ||
35 | +{{> layout/footer}} |
@@ -32,3 +32,24 @@ | @@ -32,3 +32,24 @@ | ||
32 | seajs.use('js/passport/login'); | 32 | seajs.use('js/passport/login'); |
33 | </script> | 33 | </script> |
34 | {{/if}} | 34 | {{/if}} |
35 | + | ||
36 | +{{!-- 找回密码--}} | ||
37 | +{{#if backPage}} | ||
38 | + <script> | ||
39 | + seajs.use('js/passport/back'); | ||
40 | + </script> | ||
41 | +{{/if}} | ||
42 | + | ||
43 | +{{!-- 重置密码--}} | ||
44 | +{{#if resetPage}} | ||
45 | + <script> | ||
46 | + seajs.use('js/passport/reset'); | ||
47 | + </script> | ||
48 | +{{/if}} | ||
49 | + | ||
50 | +{{!-- 验证手机 --}} | ||
51 | +{{#if vertificationPage}} | ||
52 | + <script> | ||
53 | + seajs.use('js/passport/vertification'); | ||
54 | + </script> | ||
55 | +{{/if}} |
No preview for this file type
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | 2 | <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > |
3 | <svg xmlns="http://www.w3.org/2000/svg"> | 3 | <svg xmlns="http://www.w3.org/2000/svg"> |
4 | <metadata> | 4 | <metadata> |
5 | -Created by FontForge 20120731 at Mon Dec 14 09:37:47 2015 | 5 | +Created by FontForge 20120731 at Mon Dec 14 13:45:36 2015 |
6 | By Ads | 6 | By Ads |
7 | </metadata> | 7 | </metadata> |
8 | <defs> | 8 | <defs> |
@@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Dec 14 09:37:47 2015 | @@ -19,7 +19,7 @@ Created by FontForge 20120731 at Mon Dec 14 09:37:47 2015 | ||
19 | bbox="0 -214 1172.1 864" | 19 | bbox="0 -214 1172.1 864" |
20 | underline-thickness="50" | 20 | underline-thickness="50" |
21 | underline-position="-100" | 21 | underline-position="-100" |
22 | - unicode-range="U+0078-E61D" | 22 | + unicode-range="U+0078-E620" |
23 | /> | 23 | /> |
24 | <missing-glyph horiz-adv-x="374" | 24 | <missing-glyph horiz-adv-x="374" |
25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> | 25 | d="M34 0v682h272v-682h-272zM68 34h204v614h-204v-614z" /> |
@@ -105,5 +105,15 @@ M982 137z" /> | @@ -105,5 +105,15 @@ M982 137z" /> | ||
105 | <glyph glyph-name="uniE61D" unicode="" | 105 | <glyph glyph-name="uniE61D" unicode="" |
106 | d="M888 620q8 8 18.5 10.5t20.5 0t18 -10.5q4 -4 6.5 -8.5t4 -9.5t1.5 -10.5t-1.5 -10t-4 -9.5t-6.5 -9l-406 -405q-12 -12 -28.5 -12t-27.5 12q-6 5 -9 12.5t-3 15.5t3 15t9 13zM539 214q3 -3 5 -6t3.5 -7t2 -7.5t0.5 -7.5t-0.5 -8t-2 -7.5t-3.5 -6.5t-5 -6 | 106 | d="M888 620q8 8 18.5 10.5t20.5 0t18 -10.5q4 -4 6.5 -8.5t4 -9.5t1.5 -10.5t-1.5 -10t-4 -9.5t-6.5 -9l-406 -405q-12 -12 -28.5 -12t-27.5 12q-6 5 -9 12.5t-3 15.5t3 15t9 13zM539 214q3 -3 5 -6t3.5 -7t2 -7.5t0.5 -7.5t-0.5 -8t-2 -7.5t-3.5 -6.5t-5 -6 |
107 | q-12 -12 -28.5 -12t-28.5 12l-406 405q-7 8 -10 18.5t0 20.5t10 18q6 6 13.5 9t15 3t15 -3t13.5 -9zM539 214z" /> | 107 | q-12 -12 -28.5 -12t-28.5 12l-406 405q-7 8 -10 18.5t0 20.5t10 18q6 6 13.5 9t15 3t15 -3t13.5 -9zM539 214z" /> |
108 | + <glyph glyph-name="uniE61E" unicode="" | ||
109 | +d="M127 769v-770h770v770h-770zM555 170h-86v86h86v-86zM555 298h-86v257h86v-257z" /> | ||
110 | + <glyph glyph-name="uniE61F" unicode="" | ||
111 | +d="M511.5 747q-72.5 0 -141 -22.5t-123.5 -64t-96 -96.5t-63.5 -123t-22.5 -141q0 -91 35 -173.5t95 -142.5t143 -95.5t173.5 -35.5t173.5 35.5t143 95.5t95 142.5t35 173.5q1 73 -22 141t-64 123t-96 96.5t-123.5 64t-141 22.5zM452 100h-1v0l-38 38l-179 180l38 37 | ||
112 | +l179 -179l318 318l38 -38zM512 -147q-91 0 -175 35q-80 34 -142 96t-96 142q-8 21 -15 42t-11 43t-6.5 44t-2.5 45q0 91 35 174q34 81 96 142.5t142 95.5q84 36 175 36q45 0 88.5 -9t85.5 -27q40 -16 75.5 -40.5t66.5 -54.5q20 -21 38 -44t32.5 -47.5t25.5 -51.5 | ||
113 | +q35 -83 35 -174t-35 -174q-34 -80 -96 -142t-142 -96q-14 -6 -28 -11t-28.5 -9t-29 -6.5t-29 -4.5t-29.5 -3t-30 -1zM511.5 747q-90.5 0 -173 -35.5t-142.5 -95.5t-95.5 -142.5t-35.5 -173.5t35.5 -173.5t95.5 -142.5t142.5 -95t173 -35t173.5 35t142.5 95t95 142.5 | ||
114 | +t35.5 173.5t-35.5 173.5t-95 142.5t-142.5 95.5t-173.5 35.5zM451 99l-38 39l-180 180l39 38l179 -180l318 318l39 -38zM414 138l37 -37l355 355l-37 37l-318 -318l-179 180l-38 -37z" /> | ||
115 | + <glyph glyph-name="uniE620" unicode="" | ||
116 | +d="M958 662q0 30 -21 51.5t-51 21.5h-749q-30 0 -51 -21.5t-21 -51.5v-748q0 -30 21 -51t51 -21h749q30 0 51 21t21 51v748zM778 358l-267 -267q-14 -14 -34 -14q-9 0 -18 3.5t-16 10.5l-168 168q-14 14 -14 34t14 34q9 10 21.5 13t25 0t21.5 -13l134 -133l233 232 | ||
117 | +q9 10 21.5 13t25 0t21.5 -13q14 -14 14 -34t-14 -34z" /> | ||
108 | </font> | 118 | </font> |
109 | </defs></svg> | 119 | </defs></svg> |
No preview for this file type
No preview for this file type
web-static/js/passport/back.js
0 → 100644
1 | +/** | ||
2 | + * 找回密码 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/14 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho.jquery'), | ||
8 | + phoneRegx = require('./mail-phone-regx').phoneRegx; | ||
9 | + | ||
10 | +var $cr = $('#country-code-hide'), | ||
11 | + $phoneNum = $('#phone-num'), | ||
12 | + $ca = $('#captcha'), | ||
13 | + $tipPanel = $('#tip-panel'), | ||
14 | + emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/, | ||
15 | + acAccount = [ | ||
16 | + ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com', | ||
17 | + 'sohu.com', 'hotmail.com', '139.com', '189.com'], //数字顺序 | ||
18 | + ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com', | ||
19 | + 'sohu.com', 'hotmail.com', '139.com', '189.com'] //组合顺序 | ||
20 | + ], | ||
21 | + $ccList = $('#country-code-list'), | ||
22 | + $cc = $('#country-code'), | ||
23 | + $btn = $('#find-btn'), | ||
24 | + $accErr = $('#account-err'), | ||
25 | + $caErr = $('#captcha-err'), | ||
26 | + time, //timeout-id | ||
27 | + caCount = 4, //验证码位数 | ||
28 | + hasPh = false, | ||
29 | + hasCa = false; | ||
30 | + | ||
31 | +require('../../plugin/jquery.placeholder'); | ||
32 | + | ||
33 | +/*function getSource(column, postition, event) { | ||
34 | + try { | ||
35 | + dataLayer.push({ | ||
36 | + louceng: column, | ||
37 | + weizhi: postition, | ||
38 | + event: event | ||
39 | + }); | ||
40 | + } catch (e) {} | ||
41 | +}*/ | ||
42 | + | ||
43 | +function imgcode() { | ||
44 | + $('#captcha-img').attr('src', 'http://www.yohobuy.com/passport/images?t=' + Math.random()); | ||
45 | + | ||
46 | + //getSource('yoho_family_web', '换一张', 'homepage_man'); | ||
47 | +} | ||
48 | + | ||
49 | +function enableBtn() { | ||
50 | + if (hasPh && hasCa) { | ||
51 | + $btn.removeClass('disable').prop('disabled', false); | ||
52 | + } else { | ||
53 | + $btn.addClass('disable').prop('disabled', true); | ||
54 | + } | ||
55 | +} | ||
56 | + | ||
57 | +function vaPn(v) { | ||
58 | + var pass = true, | ||
59 | + errTxt = ''; | ||
60 | + | ||
61 | + v = $.trim(v); | ||
62 | + if (v !== '') { | ||
63 | + if (/^[0-9]+$/.test(v)) { | ||
64 | + if (phoneRegx[$cr.val()].test(v)) { | ||
65 | + pass = true; | ||
66 | + } else { | ||
67 | + errTxt = '手机号码格式不正确, 请重新输入'; | ||
68 | + pass = false; | ||
69 | + } | ||
70 | + } else { | ||
71 | + if (emailReg.test(v)) { | ||
72 | + pass = true; | ||
73 | + } else { | ||
74 | + errTxt = '邮箱格式不正确, 请重新输入'; | ||
75 | + pass = false; | ||
76 | + } | ||
77 | + } | ||
78 | + } else { | ||
79 | + errTxt = '账户名不能为空'; | ||
80 | + pass = false; | ||
81 | + } | ||
82 | + hasPh = pass; | ||
83 | + return { | ||
84 | + pass: pass, | ||
85 | + errTxt: errTxt | ||
86 | + }; | ||
87 | +} | ||
88 | + | ||
89 | +function vaCa() { | ||
90 | + var v = $.trim($ca.val()); | ||
91 | + | ||
92 | + if (v === '' || v.length < caCount) { | ||
93 | + hasCa = false; | ||
94 | + enableBtn(); | ||
95 | + return; | ||
96 | + } else { | ||
97 | + $.ajax({ | ||
98 | + type: 'POST', | ||
99 | + url: '/passport/back/authcode', | ||
100 | + data: { | ||
101 | + code: v, | ||
102 | + mobile: $('#phone-num').val(), | ||
103 | + area: $('#country-code-hide').val() | ||
104 | + } | ||
105 | + | ||
106 | + }).then(function(data) { | ||
107 | + if (data.code === 200) { | ||
108 | + hasCa = true; | ||
109 | + } else { | ||
110 | + hasCa = false; | ||
111 | + imgcode(); | ||
112 | + } | ||
113 | + enableBtn(); | ||
114 | + }); | ||
115 | + } | ||
116 | +} | ||
117 | + | ||
118 | +$ca.attr('maxlength', caCount); | ||
119 | + | ||
120 | +//IE8 placeholder | ||
121 | +$('input').placeholder(); | ||
122 | + | ||
123 | +$('#change-captcha, #captcha-img').on('click', function() { | ||
124 | + imgcode(); | ||
125 | +}); | ||
126 | + | ||
127 | +$cc.on('click', function(e) { | ||
128 | + e.stopPropagation(); | ||
129 | + if ($ccList.css('style') === 'block') { | ||
130 | + $ccList.slideUp('fast'); | ||
131 | + } else { | ||
132 | + $ccList.slideDown('fast'); | ||
133 | + } | ||
134 | +}); | ||
135 | + | ||
136 | +$ccList.delegate('li', 'click', function(e) { | ||
137 | + var $cur = $(this), | ||
138 | + code = $cur.data('cc'), | ||
139 | + pnVa; | ||
140 | + | ||
141 | + e.stopPropagation(); | ||
142 | + $cr.val(code); | ||
143 | + $cc.find('em').html($cur.text()); | ||
144 | + | ||
145 | + //切换后验证手机号码 | ||
146 | + if ($.trim($phoneNum.val()) !== '') { | ||
147 | + pnVa = vaPn($phoneNum.val()); | ||
148 | + enableBtn(); | ||
149 | + if (hasPh) { | ||
150 | + $accErr.addClass('hide'); | ||
151 | + $phoneNum.removeClass('error'); | ||
152 | + } else { | ||
153 | + $accErr.removeClass('hide').text(pnVa.errTxt); | ||
154 | + $phoneNum.addClass('error'); | ||
155 | + } | ||
156 | + } | ||
157 | + $ccList.slideUp('fast'); | ||
158 | +}); | ||
159 | + | ||
160 | +$(document).click(function() { | ||
161 | + if ($tipPanel.css('display') === 'block') { | ||
162 | + $tipPanel.slideUp(); | ||
163 | + } | ||
164 | + if ($ccList.css('display') === 'block') { | ||
165 | + $ccList.slideUp(); | ||
166 | + } | ||
167 | +}); | ||
168 | + | ||
169 | + | ||
170 | + | ||
171 | +$phoneNum.keyup(function() { | ||
172 | + var account = $.trim($(this).val()), | ||
173 | + html = '', | ||
174 | + acs, | ||
175 | + i; | ||
176 | + | ||
177 | + //输入@时显示自动补全列表 | ||
178 | + if (account.indexOf('@') !== -1 && account.lastIndexOf('@') === account.indexOf('@')) { | ||
179 | + if (/^[0-9]*@$/.test(account)) { | ||
180 | + | ||
181 | + //数字顺序 | ||
182 | + acs = acAccount[0]; | ||
183 | + } else { | ||
184 | + acs = acAccount[1]; | ||
185 | + } | ||
186 | + for (i = 0; i < acs.length; i++) { | ||
187 | + html += '<li>' + account.slice(0, account.indexOf('@')) + '@' + acs[i] + '</li>'; | ||
188 | + } | ||
189 | + $tipPanel.html(html).slideDown(); | ||
190 | + } else { | ||
191 | + $tipPanel.slideUp(); | ||
192 | + } | ||
193 | + vaPn(account); | ||
194 | + enableBtn(); | ||
195 | +}).blur(function() { | ||
196 | + time = setTimeout(function() { | ||
197 | + var pnVa = vaPn($phoneNum.val()); | ||
198 | + | ||
199 | + if (pnVa.pass) { | ||
200 | + $accErr.addClass('hide'); | ||
201 | + $phoneNum.removeClass('error'); | ||
202 | + } else { | ||
203 | + $accErr.removeClass('hide').find('em').text(pnVa.errTxt); | ||
204 | + $phoneNum.addClass('error'); | ||
205 | + } | ||
206 | + }, 170); | ||
207 | +}).focus(function() { | ||
208 | + $(this).removeClass('error'); | ||
209 | + | ||
210 | + //focus隐藏错误提示 | ||
211 | + $accErr.addClass('hide'); | ||
212 | +}); | ||
213 | + | ||
214 | +//验证码在鼠标移开后验证, keyup时不再验证 | ||
215 | +$ca.blur(function() { | ||
216 | + var errTxt = $.trim($ca.val()) === '' ? '验证码不能为空' : '验证码不正确'; | ||
217 | + | ||
218 | + if (hasCa) { | ||
219 | + $caErr.addClass('hide'); | ||
220 | + $ca.removeClass('error'); | ||
221 | + } else { | ||
222 | + $caErr.removeClass('hide').find('em').text(errTxt); | ||
223 | + $ca.addClass('error'); | ||
224 | + | ||
225 | + //验证码错误则刷新验证码 | ||
226 | + imgcode(); | ||
227 | + } | ||
228 | +}).focus(function() { | ||
229 | + $(this).removeClass('error'); | ||
230 | + | ||
231 | + //focus隐藏错误提示 | ||
232 | + $caErr.addClass('hide'); | ||
233 | +}).keyup(function() { | ||
234 | + vaCa(); | ||
235 | +}); | ||
236 | + | ||
237 | +$tipPanel.delegate('li', 'click', function(e) { | ||
238 | + var account = $(this).text(), | ||
239 | + pnVa; | ||
240 | + | ||
241 | + e.stopPropagation(); | ||
242 | + $phoneNum.val(account); | ||
243 | + if (time) { | ||
244 | + clearTimeout(time); | ||
245 | + pnVa = vaPn(account); | ||
246 | + enableBtn(); | ||
247 | + if (pnVa.pass) { | ||
248 | + $accErr.addClass('hide'); | ||
249 | + $phoneNum.removeClass('error'); | ||
250 | + } else { | ||
251 | + $accErr.removeClass('hide').find('em').text(pnVa.errTx); | ||
252 | + $phoneNum.addClass('error'); | ||
253 | + } | ||
254 | + time = null; | ||
255 | + } | ||
256 | + $tipPanel.slideUp(); | ||
257 | +}); | ||
258 | + | ||
259 | +$('#find-btn').click(function(e) { | ||
260 | + | ||
261 | + //getSource('yoho_family_web', '下一步按钮', 'homepage_man'); | ||
262 | + if (/^[0-9]+$/.test($.trim($phoneNum.val()))) { | ||
263 | + $('#find-form').attr('action', '/passport/back/mobile'); | ||
264 | + } | ||
265 | + if ($(this).hasClass('disable')) { | ||
266 | + return; | ||
267 | + } | ||
268 | + if (!hasCa || !hasPh) { | ||
269 | + e.preventDefault(); | ||
270 | + return true; | ||
271 | + } | ||
272 | +}); |
web-static/js/passport/reset.js
0 → 100644
1 | +/** | ||
2 | + * 找回密码 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/14 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho.jquery'); | ||
8 | + | ||
9 | +var $pwd = $('#pwd'), | ||
10 | + $repwd = $('#re-input'), | ||
11 | + $next = $('#reset-pwd-btn'), | ||
12 | + $pwdErr = $('#pwd-err'), | ||
13 | + $repwdErr = $('#repwd-err'), | ||
14 | + $pwdTips = $('#pwd-tips'); | ||
15 | + | ||
16 | +var hasNoErrPw = false; | ||
17 | + | ||
18 | +var $pwdIntensity = $('.pwd-intensity'), | ||
19 | + $pwdParent = $pwdIntensity.closest('.pwd-intensity-container'), | ||
20 | + $pwdTip1 = $('#pwd-tip1'); | ||
21 | + | ||
22 | +require('../../plugin/jquery.placeholder'); | ||
23 | + | ||
24 | + | ||
25 | +/* | ||
26 | + * 计算密码复杂度 | ||
27 | + */ | ||
28 | + | ||
29 | +function gettype(str, i) { | ||
30 | + if (str.charCodeAt(i) >= 48 && str.charCodeAt(i) <= 57) { | ||
31 | + return 1; | ||
32 | + } else if (str.charCodeAt(i) >= 97 && str.charCodeAt(i) <= 122) { | ||
33 | + return 2; | ||
34 | + } else if (str.charCodeAt(i) >= 65 && str.charCodeAt(i) <= 90) { | ||
35 | + return 3; | ||
36 | + } | ||
37 | + | ||
38 | + return 4; | ||
39 | +} | ||
40 | + | ||
41 | +function isregular(cur, pre, type) { | ||
42 | + var curCode = cur.charCodeAt(0); | ||
43 | + var preCode = pre.charCodeAt(0); | ||
44 | + | ||
45 | + if (curCode - preCode === 0) { | ||
46 | + return true; | ||
47 | + } | ||
48 | + | ||
49 | + if (type !== 4 && (curCode - preCode === 1 || curCode - preCode === -1)) { | ||
50 | + return true; | ||
51 | + } | ||
52 | + | ||
53 | + return false; | ||
54 | +} | ||
55 | + | ||
56 | +function getcomplex(curType, preType) { | ||
57 | + if (preType === 0 || curType === preType) { | ||
58 | + return 0; | ||
59 | + } else if (curType === 4 || preType === 4) { | ||
60 | + return 2; | ||
61 | + } else { | ||
62 | + return 1; | ||
63 | + } | ||
64 | +} | ||
65 | + | ||
66 | +function computeComplex(password) { | ||
67 | + var complex = 0, | ||
68 | + length = password.length, | ||
69 | + pre = '', | ||
70 | + preType = 0, | ||
71 | + i = 0, | ||
72 | + cur, | ||
73 | + curType; | ||
74 | + | ||
75 | + | ||
76 | + for (i = 0; i < length; i++) { | ||
77 | + cur = password.charAt(i); | ||
78 | + curType = gettype(password, i); | ||
79 | + | ||
80 | + if (preType !== curType || !isregular(cur, pre, curType)) { | ||
81 | + complex += curType + getcomplex(curType, preType); | ||
82 | + } | ||
83 | + | ||
84 | + pre = cur; | ||
85 | + preType = curType; | ||
86 | + } | ||
87 | + | ||
88 | + return complex; | ||
89 | +} | ||
90 | + | ||
91 | +function pwdKeyupEvt() { | ||
92 | + var pwd = $pwd.val(), | ||
93 | + pwdStrength = computeComplex(pwd), | ||
94 | + level = 0; | ||
95 | + | ||
96 | + //TODO:自定义密码强度规则,需要修正 | ||
97 | + if (pwdStrength === 0) { | ||
98 | + level = 0; | ||
99 | + } else if (pwdStrength <= 10) { | ||
100 | + level = 1; | ||
101 | + } else if (pwdStrength <= 20) { | ||
102 | + level = 2; | ||
103 | + } else { | ||
104 | + level = 3; | ||
105 | + } | ||
106 | + switch (level) { | ||
107 | + case 0: | ||
108 | + $pwdParent.removeClass('red yellow green'); | ||
109 | + $pwdIntensity.removeClass('color'); | ||
110 | + break; | ||
111 | + case 1: | ||
112 | + $pwdParent.addClass('red').removeClass('yellow green'); | ||
113 | + $pwdIntensity.filter('.low').addClass('color'); | ||
114 | + $pwdIntensity.filter('.mid,.high').removeClass('color'); | ||
115 | + break; | ||
116 | + case 2: | ||
117 | + $pwdParent.addClass('yellow').removeClass('red green'); | ||
118 | + $pwdIntensity.filter('.low,.mid').addClass('color'); | ||
119 | + $pwdIntensity.filter('.high').removeClass('color'); | ||
120 | + break; | ||
121 | + case 3: | ||
122 | + $pwdParent.addClass('green').removeClass('yellow red'); | ||
123 | + $pwdIntensity.addClass('color'); | ||
124 | + break; | ||
125 | + } | ||
126 | + | ||
127 | + // | ||
128 | + if (pwd === '') { | ||
129 | + hasNoErrPw = false; | ||
130 | + $pwdTip1.removeClass('red yes no').addClass('default'); | ||
131 | + } else { | ||
132 | + if (pwd.length < 6 || pwd.length > 20) { | ||
133 | + hasNoErrPw = false; | ||
134 | + $pwdTip1.removeClass('default yes').addClass('no red'); | ||
135 | + } else { | ||
136 | + hasNoErrPw = true; | ||
137 | + $pwdTip1.removeClass('default no red').addClass('yes'); | ||
138 | + } | ||
139 | + | ||
140 | + //提示2不做验证 | ||
141 | + } | ||
142 | +} | ||
143 | + | ||
144 | +//IE8 placeholder | ||
145 | +$('input').placeholder(); | ||
146 | + | ||
147 | +$('.va').keyup(function() { | ||
148 | + var pass = true; | ||
149 | + | ||
150 | + if ($(this).hasClass('pwd')) { | ||
151 | + pwdKeyupEvt(); | ||
152 | + } else { | ||
153 | + if ($(this).val() === '') { | ||
154 | + pass = false; | ||
155 | + } | ||
156 | + } | ||
157 | + if (pass && hasNoErrPw && $pwd.val() === $repwd.val()) { | ||
158 | + pass = true; | ||
159 | + } else { | ||
160 | + pass = false; | ||
161 | + } | ||
162 | + if (pass) { | ||
163 | + $next.removeClass('disable').prop('disabled', false); | ||
164 | + } else { | ||
165 | + $next.addClass('disable').prop('disabled', true); | ||
166 | + } | ||
167 | +}).blur(function() { | ||
168 | + var v = $(this).val(); | ||
169 | + | ||
170 | + if ($(this).hasClass('pwd')) { | ||
171 | + if (v === '') { | ||
172 | + $(this).addClass('error'); | ||
173 | + $pwdErr.removeClass('hide').find('em').text('请输入密码'); | ||
174 | + } else if (v.length < 6 || v.length > 20) { | ||
175 | + $(this).addClass('error'); | ||
176 | + $pwdErr.removeClass('hide').find('em').text('密码只支持6-20位'); | ||
177 | + } else { | ||
178 | + $pwdErr.addClass('hide'); | ||
179 | + if ($repwd.val() !== '') { | ||
180 | + if (v !== $repwd.val()) { | ||
181 | + $repwd.addClass('error'); | ||
182 | + $repwdErr.removeClass('hide').find('em').text('两次密码输入不一致,请重新输入'); | ||
183 | + } else { | ||
184 | + $repwd.removeClass('error'); | ||
185 | + $repwdErr.addClass('hide'); | ||
186 | + } | ||
187 | + } | ||
188 | + } | ||
189 | + } else { | ||
190 | + if (v === '') { | ||
191 | + $(this).addClass('error'); | ||
192 | + $repwdErr.removeClass('hide').find('em').text('请输入密码确认'); | ||
193 | + } else { | ||
194 | + if ($pwd.val() !== '' && v !== $pwd.val()) { | ||
195 | + $(this).addClass('error'); | ||
196 | + $repwdErr.removeClass('hide').find('em').text('两次密码输入不一致,请重新输入'); | ||
197 | + } else { | ||
198 | + $(this).removeClass('error'); | ||
199 | + $repwdErr.addClass('hide'); | ||
200 | + } | ||
201 | + } | ||
202 | + } | ||
203 | +}).focus(function() { | ||
204 | + $(this).removeClass('error'); | ||
205 | + | ||
206 | + //focus后错误提示隐藏 | ||
207 | + if ($(this).hasClass('pwd')) { | ||
208 | + $pwdErr.addClass('hide'); | ||
209 | + } else { | ||
210 | + $repwdErr.addClass('hide'); | ||
211 | + } | ||
212 | +}); | ||
213 | + | ||
214 | +$pwd.focus(function() { | ||
215 | + $pwdErr.addClass('hide'); | ||
216 | + $pwdTips.removeClass('hide'); | ||
217 | +}).blur(function() { | ||
218 | + $pwdTips.addClass('hide'); | ||
219 | +}); | ||
220 | + | ||
221 | +$('#pwd, #repwd').keydown(function(e) { | ||
222 | + var code = e.keyCode || e.which; | ||
223 | + | ||
224 | + //空格输入过滤 | ||
225 | + if (code === 32) { | ||
226 | + e.preventDefault(); | ||
227 | + return; | ||
228 | + } | ||
229 | +}); |
web-static/js/passport/vertification.js
0 → 100644
1 | +/** | ||
2 | + * 验证手机 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/14 | ||
5 | + */ | ||
6 | + | ||
7 | +var $ = require('yoho.jquery'); | ||
8 | + | ||
9 | +var $sc = $('#send-captcha'), | ||
10 | + $msgTip = $('#captcha-tip'), | ||
11 | + $errTip = $('#err-tip'), | ||
12 | + $next = $('#next-step'), | ||
13 | + seconds, | ||
14 | + itime; | ||
15 | + | ||
16 | +$sc.click(function() { | ||
17 | + $.post('/passport/register/authcode', { | ||
18 | + mobile: $('#mobile').val(), | ||
19 | + area: $('#area').val(), | ||
20 | + captcha: $('#captchaPic').val(), | ||
21 | + project: 'repassword' | ||
22 | + }, function(jsonData) { | ||
23 | + if (jsonData.code === 200) { | ||
24 | + $errTip.hide(); | ||
25 | + if ($(this).hasClass('disable')) { | ||
26 | + return; | ||
27 | + } | ||
28 | + seconds = 60; | ||
29 | + | ||
30 | + //$sc.addClass('disable').prop('disabled', true); | ||
31 | + $sc.addClass('disable').attr('disabled', true); | ||
32 | + $msgTip.removeClass('hide'); | ||
33 | + | ||
34 | + $sc.val(seconds-- + '秒后可重新操作'); | ||
35 | + itime = setInterval(function() { | ||
36 | + if (seconds === 0) { | ||
37 | + clearInterval(itime); | ||
38 | + | ||
39 | + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false); | ||
40 | + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled'); | ||
41 | + } else { | ||
42 | + $sc.val(seconds-- + '秒后可重新操作'); | ||
43 | + } | ||
44 | + }, 1000); | ||
45 | + } else { | ||
46 | + $(this).addClass('error'); | ||
47 | + $errTip.removeClass('hide').text('发送失败'); | ||
48 | + } | ||
49 | + }); | ||
50 | +}); | ||
51 | + | ||
52 | +if ($(this).hasClass('disable')) { | ||
53 | + return; | ||
54 | +} | ||
55 | +seconds = 60; | ||
56 | + | ||
57 | +//$sc.addClass('disable').prop('disabled', true); | ||
58 | +$sc.addClass('disable').attr('disabled', true); | ||
59 | +$msgTip.removeClass('hide'); | ||
60 | + | ||
61 | +$sc.val(seconds-- + '秒后可重新操作'); | ||
62 | +itime = setInterval(function() { | ||
63 | + if (seconds === 0) { | ||
64 | + clearInterval(itime); | ||
65 | + | ||
66 | + //$sc.val('发送验证码').removeClass('disable').prop('disabled', false); | ||
67 | + $sc.val('发送验证码').removeClass('disable').removeAttr('disabled'); | ||
68 | + } else { | ||
69 | + $sc.val(seconds-- + '秒后可重新操作'); | ||
70 | + } | ||
71 | +}, 1000); | ||
72 | + | ||
73 | + | ||
74 | +$('#captcha').keyup(function() { | ||
75 | + var v = $.trim($(this).val()); | ||
76 | + | ||
77 | + if (v !== '') { | ||
78 | + | ||
79 | + //添加验证码正确验证 | ||
80 | + //$next.removeClass('disable').prop('disabled', false); | ||
81 | + $next.removeClass('disable').removeAttr('disabled'); | ||
82 | + } else { | ||
83 | + | ||
84 | + //$next.addClass('disable').prop('disabled', true); | ||
85 | + $next.addClass('disable').attr('disabled', true); | ||
86 | + } | ||
87 | +}).blur(function() { | ||
88 | + var v = $.trim($(this).val()); | ||
89 | + | ||
90 | + if (v === '') { | ||
91 | + | ||
92 | + //添加验证码正确验证 | ||
93 | + $(this).addClass('error'); | ||
94 | + $errTip.removeClass('hide'); | ||
95 | + } else { | ||
96 | + $(this).removeClass('error'); | ||
97 | + $errTip.addClass('hide'); | ||
98 | + } | ||
99 | +}).focus(function() { | ||
100 | + $(this).removeClass('error'); | ||
101 | +}); |
@@ -16,7 +16,8 @@ | @@ -16,7 +16,8 @@ | ||
16 | "yoho.lazyload": "1.0.0", | 16 | "yoho.lazyload": "1.0.0", |
17 | "yoho.handlebars": "3.0.3", | 17 | "yoho.handlebars": "3.0.3", |
18 | "yoho.jquery": "1.8.3", | 18 | "yoho.jquery": "1.8.3", |
19 | - "json2": "1.0.0" | 19 | + "json2": "1.0.0", |
20 | + "placeholders.js": "3.0.3" | ||
20 | }, | 21 | }, |
21 | "devDependencies": { | 22 | "devDependencies": { |
22 | "expect.js": "0.3.1" | 23 | "expect.js": "0.3.1" |
web-static/plugin/jquery.placeholder.js
0 → 100644
1 | +/*! | ||
2 | + * HTML5 Placeholder jQuery Plugin v1.8.3 | ||
3 | + * @link http://mths.be/placeholder | ||
4 | + * @author Mathias Bynens <http://mathiasbynens.be/> | ||
5 | + */ | ||
6 | + | ||
7 | + var jQuery = require('yoho.jquery'); | ||
8 | +(function(f){var e='placeholder' in document.createElement('input'),a='placeholder' in document.createElement('textarea');if(e&&a){f.fn.placeholder=function(){return this};f.fn.placeholder.input=f.fn.placeholder.textarea=true}else{f.fn.placeholder=function(){return this.filter((e?'textarea':':input')+'[placeholder]').bind('focus.placeholder',b).bind('blur.placeholder',d).trigger('blur.placeholder').end()};f.fn.placeholder.input=e;f.fn.placeholder.textarea=a;f(function(){f('form').bind('submit.placeholder',function(){var g=f('.placeholder',this).each(b);setTimeout(function(){g.each(d)},10)})});f(window).bind('unload.placeholder',function(){f('.placeholder').val('')})}function c(h){var g={},i=/^jQuery\d+$/;f.each(h.attributes,function(k,j){if(j.specified&&!i.test(j.name)){g[j.name]=j.value}});return g}function b(){var g=f(this);if(g.val()===g.attr('placeholder')&&g.hasClass('placeholder')){if(g.data('placeholder-password')){g.hide().next().attr('id',g.removeAttr('id').data('placeholder-id')).show().focus()}else{g.val('').removeClass('placeholder')}}}function d(h){var l,k=f(this),g=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=f('<input>').attr(f.extend(c(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',b);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(jQuery)); |
@@ -10,20 +10,37 @@ | @@ -10,20 +10,37 @@ | ||
10 | width: 268px; | 10 | width: 268px; |
11 | line-height: 40px; | 11 | line-height: 40px; |
12 | margin-bottom: 5px; | 12 | margin-bottom: 5px; |
13 | + | ||
14 | + .country-code { | ||
15 | + float: right; | ||
16 | + cursor: pointer; | ||
17 | + color: #b9b9b9; | ||
18 | + .iconfont { | ||
19 | + font-size: 14px; | ||
20 | + vertical-align: middle; | ||
21 | + } | ||
22 | + } | ||
13 | } | 23 | } |
14 | 24 | ||
15 | .title { | 25 | .title { |
16 | float: left; | 26 | float: left; |
17 | margin: 0px; | 27 | margin: 0px; |
18 | font-size: 22px; | 28 | font-size: 22px; |
29 | + line-height: 40px; | ||
30 | + color: #000; | ||
31 | + font-weight: normal; | ||
32 | + } | ||
33 | + .title2 { | ||
34 | + margin: 0 0 5px; | ||
35 | + font-size: 22px; | ||
36 | + line-height: 40px; | ||
19 | color: #000; | 37 | color: #000; |
20 | font-weight: normal; | 38 | font-weight: normal; |
21 | } | 39 | } |
22 | 40 | ||
23 | - .country-code { | ||
24 | - float: right; | ||
25 | - cursor: pointer; | ||
26 | - color: #b9b9b9; | 41 | + .err-tip.captcha-err { |
42 | + top: 10px; | ||
43 | + left: 326px; | ||
27 | } | 44 | } |
28 | 45 | ||
29 | .country-code-list { | 46 | .country-code-list { |
@@ -47,7 +64,182 @@ | @@ -47,7 +64,182 @@ | ||
47 | } | 64 | } |
48 | 65 | ||
49 | input { | 66 | input { |
67 | + padding: 0; | ||
68 | + outline: none; | ||
69 | + font-family: Regular, arial, 'Microsoft YaHei'; | ||
70 | + } | ||
71 | + | ||
72 | + .input-container-li { | ||
73 | + position: relative; | ||
74 | + margin-bottom: 22px; | ||
75 | + | ||
76 | + .btn { | ||
77 | + width: 270px; | ||
78 | + height: 45px; | ||
79 | + line-height: 45px; | ||
80 | + cursor: pointer; | ||
81 | + font-size: 20px; | ||
82 | + border: none; | ||
83 | + letter-spacing: 0; | ||
84 | + } | ||
85 | + | ||
86 | + .captcha { | ||
87 | + width: 160px; | ||
88 | + } | ||
89 | + | ||
90 | + .captcha-img { | ||
91 | + height: 37px; | ||
92 | + width: 90px; | ||
93 | + border: 0; | ||
94 | + margin-left: 10px; | ||
95 | + vertical-align: middle; | ||
50 | outline: none; | 96 | outline: none; |
51 | - font-family: Regular, 'SimHei'; | 97 | + cursor: pointer; |
98 | + } | ||
99 | + .change-captcha { | ||
100 | + color: #ff1901; | ||
101 | + font-size: 12px; | ||
102 | + text-decoration: underline; | ||
103 | + margin-left: 10px; | ||
104 | + cursor: pointer; | ||
105 | + } | ||
106 | + | ||
107 | + } | ||
108 | +} | ||
109 | + | ||
110 | +.send-email-page { | ||
111 | + font-size: 14px; | ||
112 | + | ||
113 | + .content { | ||
114 | + margin: 216px 0 0 !important; | ||
115 | + } | ||
116 | + | ||
117 | + .send-tips { | ||
118 | + line-height: 28px; | ||
119 | + color: #4c4c4c; | ||
120 | + text-align: center; | ||
121 | + font-size: 15px; | ||
122 | + | ||
123 | + .iconfont { | ||
124 | + margin: 0 8px 0 0; | ||
125 | + } | ||
126 | + } | ||
127 | + | ||
128 | + .no-find { | ||
129 | + margin: 10px 0 0 0; | ||
130 | + line-height: 20px; | ||
131 | + color: #a5a4a4; | ||
132 | + text-align: center; | ||
133 | + } | ||
134 | + | ||
135 | + .to-my-email { | ||
136 | + a { | ||
137 | + display: block; | ||
138 | + margin: 53px auto 0; | ||
139 | + width: 270px; | ||
140 | + height: 45px; | ||
141 | + line-height: 45px; | ||
142 | + background: #ff1901; | ||
143 | + text-align: center; | ||
144 | + color: #fff; | ||
145 | + letter-spacing: 2px; | ||
146 | + } | ||
147 | + } | ||
148 | +} | ||
149 | + | ||
150 | +.verification-page .content{ | ||
151 | + li { | ||
152 | + position: relative; | ||
153 | + margin-bottom: 43px; | ||
154 | + } | ||
155 | + | ||
156 | + .btn { | ||
157 | + @include inline-block; | ||
158 | + border: none; | ||
159 | + } | ||
160 | + | ||
161 | + .head-title { | ||
162 | + font-size: 24px; | ||
163 | + color: #000; | ||
164 | + } | ||
165 | + | ||
166 | + .pn-label { | ||
167 | + color: #828282; | ||
168 | + font-size: 16px; | ||
169 | + } | ||
170 | + | ||
171 | + .country-code { | ||
172 | + margin: 0 10px; | ||
173 | + } | ||
174 | + | ||
175 | + .country-code, .phone-num { | ||
176 | + color: #000; | ||
177 | + font-size: 16px; | ||
178 | + } | ||
179 | + | ||
180 | + .captcha { | ||
181 | + width: 160px !important; | ||
182 | + } | ||
183 | + | ||
184 | + .send-captcha { | ||
185 | + width: 133px; | ||
186 | + font-size: 12px; | ||
187 | + position: relative; | ||
188 | + top: -1px; | ||
189 | + letter-spacing: 0; | ||
190 | + } | ||
191 | + | ||
192 | + .err-tip { | ||
193 | + left: 310px; | ||
194 | + } | ||
195 | + | ||
196 | + .captcha-tips { | ||
197 | + position: absolute; | ||
198 | + top: 50px; | ||
199 | + color: #a5a4a4; | ||
200 | + | ||
201 | + .iconfont { | ||
202 | + color: #0F9ACD; | ||
203 | + font-size: 14px; | ||
204 | + margin: 0 8px 0 0; | ||
205 | + vertical-align: 12%; | ||
206 | + } | ||
207 | + } | ||
208 | +} | ||
209 | + | ||
210 | +.reset-success-page { | ||
211 | + .content { | ||
212 | + margin: 255px 0 0 !important; | ||
213 | + } | ||
214 | + | ||
215 | + .success-text { | ||
216 | + line-height: 35px; | ||
217 | + | ||
218 | + .iconfont { | ||
219 | + font-size: 30px; | ||
220 | + color: #ee3f14; | ||
221 | + } | ||
222 | + | ||
223 | + span { | ||
224 | + font-size: 24px; | ||
225 | + margin: 0 18px; | ||
226 | + } | ||
227 | + | ||
228 | + #count-down { | ||
229 | + color: #ee3f14; | ||
230 | + } | ||
231 | + } | ||
232 | + | ||
233 | + .success-btn { | ||
234 | + display: block; | ||
235 | + margin: 43px auto 0; | ||
236 | + width: 269px; | ||
237 | + line-height: 269px; | ||
238 | + height: 45px; | ||
239 | + line-height: 45px; | ||
240 | + font-size: 14px; | ||
241 | + color: #fff; | ||
242 | + text-align: center; | ||
243 | + background-color: #ff1901; | ||
52 | } | 244 | } |
53 | } | 245 | } |
1 | @import "login", "register", "back"; | 1 | @import "login", "register", "back"; |
2 | 2 | ||
3 | $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | 3 | $tip: sprite-map("passport/tip/*.png", $spacing: 10px); |
4 | +/**/ | ||
4 | 5 | ||
5 | .passport-page { | 6 | .passport-page { |
6 | width: 1150px; | 7 | width: 1150px; |
@@ -17,6 +18,7 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | @@ -17,6 +18,7 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | ||
17 | height: 43px; | 18 | height: 43px; |
18 | font-size: 16px; | 19 | font-size: 16px; |
19 | line-height: 1.2; | 20 | line-height: 1.2; |
21 | + line-height: 43px\9; | ||
20 | width: 268px; | 22 | width: 268px; |
21 | border: 1px solid #dbdbdb; | 23 | border: 1px solid #dbdbdb; |
22 | text-indent: 10px; | 24 | text-indent: 10px; |
@@ -39,8 +41,75 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | @@ -39,8 +41,75 @@ $tip: sprite-map("passport/tip/*.png", $spacing: 10px); | ||
39 | letter-spacing: 10px; | 41 | letter-spacing: 10px; |
40 | font-size: 20px; | 42 | font-size: 20px; |
41 | cursor: pointer; | 43 | cursor: pointer; |
44 | + | ||
45 | + &.disable { | ||
46 | + background-color: #555; | ||
47 | + cursor: default; | ||
48 | + } | ||
49 | + } | ||
50 | + | ||
51 | + .pwd-intensity-container { | ||
52 | + width: 270px; | ||
53 | + text-align: right; | ||
54 | + padding-top: 5px; | ||
55 | + | ||
56 | + &.red { | ||
57 | + .pwd-intensity { | ||
58 | + color: #ee0011; | ||
59 | + } | ||
60 | + .color { | ||
61 | + background: #ee0011; | ||
62 | + color: #fff; | ||
63 | + } | ||
64 | + } | ||
65 | + | ||
66 | + &.yellow { | ||
67 | + .pwd-intensity { | ||
68 | + color: #ff0; | ||
69 | + } | ||
70 | + .color { | ||
71 | + background: #ff0; | ||
72 | + color: #fff; | ||
73 | + } | ||
42 | } | 74 | } |
43 | 75 | ||
76 | + &.green { | ||
77 | + .pwd-intensity { | ||
78 | + color: #0f0; | ||
79 | + } | ||
80 | + .color { | ||
81 | + background: #0f0; | ||
82 | + color: #fff; | ||
83 | + } | ||
84 | + } | ||
85 | + .pwd-intensity { | ||
86 | + height: 15px; | ||
87 | + font-size: 12px; | ||
88 | + background-color: #e8e8e8; | ||
89 | + padding: 0px 10px; | ||
90 | + text-align: center; | ||
91 | + color: #b9b9b9; | ||
92 | + } | ||
93 | + } | ||
94 | + | ||
95 | + .tip-panel { | ||
96 | + position: absolute; | ||
97 | + display: none; | ||
98 | + width: 248px; | ||
99 | + padding: 0 10px; | ||
100 | + z-index: 100; | ||
101 | + background-color: #161616; | ||
102 | + border: 1px solid rgba(255, 255, 255, 0.7); | ||
103 | + margin-top: 5px; | ||
104 | + cursor: pointer; | ||
105 | + @include border-radius(5px); | ||
106 | + | ||
107 | + li { | ||
108 | + height: 20px; | ||
109 | + line-height: 20px; | ||
110 | + color: #b9b9b9; | ||
111 | + } | ||
112 | + } | ||
44 | .err-tip { | 113 | .err-tip { |
45 | position: absolute; | 114 | position: absolute; |
46 | font-size: 14px; | 115 | font-size: 14px; |
@@ -50,13 +50,241 @@ class BackController extends AbstractAction | @@ -50,13 +50,241 @@ class BackController extends AbstractAction | ||
50 | ); | 50 | ); |
51 | $data = array( | 51 | $data = array( |
52 | 'simpleHeader' => $simpleHeader, | 52 | 'simpleHeader' => $simpleHeader, |
53 | - 'loginPage' => true, | 53 | + 'backPage' => true, |
54 | 'back' => array( | 54 | 'back' => array( |
55 | 'coverHref' => '/passport', | 55 | 'coverHref' => '/passport', |
56 | 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | 56 | 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', |
57 | - 'countrys' => array() | 57 | + 'countryCode' => '86', |
58 | + 'countryName' => '中国', | ||
59 | + 'countryList' => array( | ||
60 | + array( | ||
61 | + 'code' => '61', | ||
62 | + 'name' => '澳大利亚' | ||
63 | + ), | ||
64 | + array( | ||
65 | + 'code' => '82', | ||
66 | + 'name' => '韩国' | ||
67 | + ), | ||
68 | + array( | ||
69 | + 'code' => '1', | ||
70 | + 'name' => '加拿大' | ||
71 | + ), | ||
72 | + array( | ||
73 | + 'code' => '86', | ||
74 | + 'name' => '中国' | ||
75 | + ) | ||
76 | + ) | ||
58 | ) | 77 | ) |
59 | ); | 78 | ); |
60 | $this->_view->display('index', $data); | 79 | $this->_view->display('index', $data); |
61 | } | 80 | } |
81 | + | ||
82 | + /** | ||
83 | + * 发送邮件 | ||
84 | + */ | ||
85 | + public function sendemailAction() { | ||
86 | + $simpleHeader = array( | ||
87 | + 'logo' => array( | ||
88 | + 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', | ||
89 | + 'url' => 'http://www.yohobuy.com' | ||
90 | + ), | ||
91 | + 'tool' => array( | ||
92 | + array( | ||
93 | + 'title' => 'Hi~', | ||
94 | + 'loginUrl' => 'www.yoho.com', | ||
95 | + 'regUrl' => '' | ||
96 | + ), | ||
97 | + array( | ||
98 | + 'title' => 'MY有货', | ||
99 | + 'options' => array( | ||
100 | + array( | ||
101 | + 'textCn' => '我的收藏', | ||
102 | + 'url' => '' | ||
103 | + ), | ||
104 | + array( | ||
105 | + 'textCn' => '优惠券', | ||
106 | + 'url' => '' | ||
107 | + ), | ||
108 | + ) | ||
109 | + ), | ||
110 | + array( | ||
111 | + 'title' => '订单中心', | ||
112 | + 'url' => 'http://www.yohobuy.com/home/orders?t=1449801433.5294' | ||
113 | + ), | ||
114 | + array( | ||
115 | + 'title' => '帮助中心', | ||
116 | + 'url' => 'http://www.yohobuy.com/help' | ||
117 | + ), | ||
118 | + array( | ||
119 | + 'title' => '400-9889-9646', | ||
120 | + 'tell' => true | ||
121 | + ) | ||
122 | + ) | ||
123 | + ); | ||
124 | + $data = array( | ||
125 | + 'simpleHeader' => $simpleHeader, | ||
126 | + 'sendEmail' => array( | ||
127 | + 'coverHref' => '/passport', | ||
128 | + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | ||
129 | + 'countrys' => array() | ||
130 | + ) | ||
131 | + ); | ||
132 | + $this->_view->display('send-email', $data); | ||
133 | + } | ||
134 | + | ||
135 | + /** | ||
136 | + * 重置密码 | ||
137 | + */ | ||
138 | + public function resetPwdAction() { | ||
139 | + $simpleHeader = array( | ||
140 | + 'logo' => array( | ||
141 | + 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', | ||
142 | + 'url' => 'http://www.yohobuy.com' | ||
143 | + ), | ||
144 | + 'tool' => array( | ||
145 | + array( | ||
146 | + 'title' => 'Hi~', | ||
147 | + 'loginUrl' => 'www.yoho.com', | ||
148 | + 'regUrl' => '' | ||
149 | + ), | ||
150 | + array( | ||
151 | + 'title' => 'MY有货', | ||
152 | + 'options' => array( | ||
153 | + array( | ||
154 | + 'textCn' => '我的收藏', | ||
155 | + 'url' => '' | ||
156 | + ), | ||
157 | + array( | ||
158 | + 'textCn' => '优惠券', | ||
159 | + 'url' => '' | ||
160 | + ), | ||
161 | + ) | ||
162 | + ), | ||
163 | + array( | ||
164 | + 'title' => '订单中心', | ||
165 | + 'url' => 'http://www.yohobuy.com/home/orders?t=1449801433.5294' | ||
166 | + ), | ||
167 | + array( | ||
168 | + 'title' => '帮助中心', | ||
169 | + 'url' => 'http://www.yohobuy.com/help' | ||
170 | + ), | ||
171 | + array( | ||
172 | + 'title' => '400-9889-9646', | ||
173 | + 'tell' => true | ||
174 | + ) | ||
175 | + ) | ||
176 | + ); | ||
177 | + $data = array( | ||
178 | + 'simpleHeader' => $simpleHeader, | ||
179 | + 'resetPage' => true, | ||
180 | + 'resetPwd' => array( | ||
181 | + 'coverHref' => '/passport', | ||
182 | + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | ||
183 | + 'countrys' => array() | ||
184 | + ) | ||
185 | + ); | ||
186 | + $this->_view->display('reset-pwd', $data); | ||
187 | + } | ||
188 | + | ||
189 | + public function resetSuccessAction() { | ||
190 | + $simpleHeader = array( | ||
191 | + 'logo' => array( | ||
192 | + 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', | ||
193 | + 'url' => 'http://www.yohobuy.com' | ||
194 | + ), | ||
195 | + 'tool' => array( | ||
196 | + array( | ||
197 | + 'title' => 'Hi~', | ||
198 | + 'loginUrl' => 'www.yoho.com', | ||
199 | + 'regUrl' => '' | ||
200 | + ), | ||
201 | + array( | ||
202 | + 'title' => 'MY有货', | ||
203 | + 'options' => array( | ||
204 | + array( | ||
205 | + 'textCn' => '我的收藏', | ||
206 | + 'url' => '' | ||
207 | + ), | ||
208 | + array( | ||
209 | + 'textCn' => '优惠券', | ||
210 | + 'url' => '' | ||
211 | + ), | ||
212 | + ) | ||
213 | + ), | ||
214 | + array( | ||
215 | + 'title' => '订单中心', | ||
216 | + 'url' => 'http://www.yohobuy.com/home/orders?t=1449801433.5294' | ||
217 | + ), | ||
218 | + array( | ||
219 | + 'title' => '帮助中心', | ||
220 | + 'url' => 'http://www.yohobuy.com/help' | ||
221 | + ), | ||
222 | + array( | ||
223 | + 'title' => '400-9889-9646', | ||
224 | + 'tell' => true | ||
225 | + ) | ||
226 | + ) | ||
227 | + ); | ||
228 | + $data = array( | ||
229 | + 'simpleHeader' => $simpleHeader, | ||
230 | + 'resetSuccess' => array( | ||
231 | + 'coverHref' => '/passport', | ||
232 | + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | ||
233 | + 'countrys' => array() | ||
234 | + ) | ||
235 | + ); | ||
236 | + $this->_view->display('reset-success', $data); | ||
237 | + } | ||
238 | + | ||
239 | + public function verificationAction() { | ||
240 | + $simpleHeader = array( | ||
241 | + 'logo' => array( | ||
242 | + 'img' => 'http://static.yohobuy.com/newheader/img/logo_e.png', | ||
243 | + 'url' => 'http://www.yohobuy.com' | ||
244 | + ), | ||
245 | + 'tool' => array( | ||
246 | + array( | ||
247 | + 'title' => 'Hi~', | ||
248 | + 'loginUrl' => 'www.yoho.com', | ||
249 | + 'regUrl' => '' | ||
250 | + ), | ||
251 | + array( | ||
252 | + 'title' => 'MY有货', | ||
253 | + 'url' => 'http://www.yohobuy.com/home?t=1450070066.9024', | ||
254 | + 'options' => array( | ||
255 | + array( | ||
256 | + 'textCn' => '我的收藏', | ||
257 | + 'url' => '' | ||
258 | + ), | ||
259 | + array( | ||
260 | + 'textCn' => '优惠券', | ||
261 | + 'url' => '' | ||
262 | + ), | ||
263 | + ) | ||
264 | + ), | ||
265 | + array( | ||
266 | + 'title' => '订单中心', | ||
267 | + 'url' => 'http://www.yohobuy.com/home/orders?t=1449801433.5294' | ||
268 | + ), | ||
269 | + array( | ||
270 | + 'title' => '帮助中心', | ||
271 | + 'url' => 'http://www.yohobuy.com/help' | ||
272 | + ), | ||
273 | + array( | ||
274 | + 'title' => '400-9889-9646', | ||
275 | + 'tell' => true | ||
276 | + ) | ||
277 | + ) | ||
278 | + ); | ||
279 | + $data = array( | ||
280 | + 'simpleHeader' => $simpleHeader, | ||
281 | + 'vertificationPage' => true, | ||
282 | + 'verification' => array( | ||
283 | + 'coverHref' => '/passport', | ||
284 | + 'coverImg' => 'http://img12.static.yhbimg.com/yhb-img01/2015/12/01/07/020a0b6e7ff908d0c2bc4045b4fef42b9f.png?imageView/2/w/252/h/190', | ||
285 | + 'countrys' => array() | ||
286 | + ) | ||
287 | + ); | ||
288 | + $this->_view->display('verification', $data); | ||
289 | + } | ||
62 | } | 290 | } |
-
Please register or login to post a comment