Showing
38 changed files
with
362 additions
and
694 deletions
@@ -20,14 +20,14 @@ const SIGN_IN_URL = helpers.urlFormat('/signin.html'); | @@ -20,14 +20,14 @@ const SIGN_IN_URL = helpers.urlFormat('/signin.html'); | ||
20 | /** | 20 | /** |
21 | * 找回密码主页面 | 21 | * 找回密码主页面 |
22 | */ | 22 | */ |
23 | -module.exports.indexPage = (req, res) => { | 23 | +module.exports.indexPage = (req, res, next) => { |
24 | service.indexPageDataAsync().then(result => { | 24 | service.indexPageDataAsync().then(result => { |
25 | res.render('back/index', Object.assign({ | 25 | res.render('back/index', Object.assign({ |
26 | module: 'back', | 26 | module: 'back', |
27 | page: 'index', | 27 | page: 'index', |
28 | title: '找回密码' | 28 | title: '找回密码' |
29 | }, result)); | 29 | }, result)); |
30 | - }); | 30 | + }).catch(next); |
31 | }; | 31 | }; |
32 | 32 | ||
33 | /** | 33 | /** |
@@ -13,5 +13,5 @@ var serviceAPI = new ServiceAPI(); | @@ -13,5 +13,5 @@ var serviceAPI = new ServiceAPI(); | ||
13 | module.exports.getResourceAsync = (resourceCode) => { | 13 | module.exports.getResourceAsync = (resourceCode) => { |
14 | return serviceAPI.get('/operations/api/v5/resource/get', sign.apiSign({ | 14 | return serviceAPI.get('/operations/api/v5/resource/get', sign.apiSign({ |
15 | content_code: resourceCode | 15 | content_code: resourceCode |
16 | - })); | 16 | + }), true); |
17 | }; | 17 | }; |
@@ -13,8 +13,6 @@ const _ = require('lodash'); | @@ -13,8 +13,6 @@ const _ = require('lodash'); | ||
13 | 13 | ||
14 | const indexService = require('./index-service'); | 14 | const indexService = require('./index-service'); |
15 | 15 | ||
16 | -const KEY_WEB_LOGIN_LEFT_BANNER = 'key_web_login_left_banner'; // 登录页左侧的广告图 | ||
17 | - | ||
18 | module.exports.getLeftBannerAsync = (resourceCode) => { | 16 | module.exports.getLeftBannerAsync = (resourceCode) => { |
19 | const DEFAULT_VALUE = { | 17 | const DEFAULT_VALUE = { |
20 | img: 'http://img12.static.yhbimg.com/' + | 18 | img: 'http://img12.static.yhbimg.com/' + |
@@ -23,13 +21,6 @@ module.exports.getLeftBannerAsync = (resourceCode) => { | @@ -23,13 +21,6 @@ module.exports.getLeftBannerAsync = (resourceCode) => { | ||
23 | }; | 21 | }; |
24 | 22 | ||
25 | return co(function * () { | 23 | return co(function * () { |
26 | - let key = KEY_WEB_LOGIN_LEFT_BANNER + "_" + resourceCode; | ||
27 | - | ||
28 | - let value = yield Cache.get(key); | ||
29 | - | ||
30 | - if (!_.isEmpty(value)) { | ||
31 | - return value; | ||
32 | - } | ||
33 | 24 | ||
34 | let resource = yield indexService.getResourceAsync(resourceCode); | 25 | let resource = yield indexService.getResourceAsync(resourceCode); |
35 | 26 | ||
@@ -37,11 +28,11 @@ module.exports.getLeftBannerAsync = (resourceCode) => { | @@ -37,11 +28,11 @@ module.exports.getLeftBannerAsync = (resourceCode) => { | ||
37 | return DEFAULT_VALUE; | 28 | return DEFAULT_VALUE; |
38 | } | 29 | } |
39 | 30 | ||
31 | + let value = {}; | ||
40 | // 有点问题 // passport model 58 | 32 | // 有点问题 // passport model 58 |
41 | - value.img = helpers.image(resource.data[0].data.src, 252, 190); | ||
42 | - value.url = resource.data[0].data.url; | 33 | + value.img = helpers.image(resource[0].data[0].src, 252, 190); |
34 | + value.url = resource[0].data[0].url; | ||
43 | 35 | ||
44 | - Cache.set(key, value).then(()=> console.log('cache value ok')); // async | ||
45 | return value; | 36 | return value; |
46 | })(); | 37 | })(); |
47 | }; | 38 | }; |
@@ -92,6 +92,7 @@ | @@ -92,6 +92,7 @@ | ||
92 | "yoho-handlebars": "^4.0.5", | 92 | "yoho-handlebars": "^4.0.5", |
93 | "yoho-jquery": "^1.12.4", | 93 | "yoho-jquery": "^1.12.4", |
94 | "yoho-jquery-lazyload": "^1.9.7", | 94 | "yoho-jquery-lazyload": "^1.9.7", |
95 | - "yoho-slider": "0.0.2" | 95 | + "yoho-slider": "0.0.2", |
96 | + "yoho-jquery-placeholder":"^0.0.3" | ||
96 | } | 97 | } |
97 | } | 98 | } |
public/img/passport/alertclose.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/alertclose.png)
1.12 KB
public/img/passport/angle.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/angle.png)
1.02 KB
public/img/passport/arrowbottom.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/arrowbottom.png)
1013 Bytes
public/img/passport/bindsuccess.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/bindsuccess.png)
1.53 KB
public/img/passport/btnbackground.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/btnbackground.png)
1 KB
public/img/passport/choosed.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/choosed.png)
1011 Bytes
public/img/passport/edit-info.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/edit-info.png)
3.35 KB
public/img/passport/go-shopping.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/go-shopping.png)
2.77 KB
public/img/passport/third-sbf9e987704.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third-sbf9e987704.png)
4.71 KB
public/img/passport/third/alipay.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/alipay.png)
2.01 KB
public/img/passport/third/douban.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/douban.png)
1.59 KB
public/img/passport/third/qq.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/qq.png)
1.66 KB
public/img/passport/third/renren.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/renren.png)
1.94 KB
public/img/passport/third/weibo.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/weibo.png)
2.08 KB
public/img/passport/third/weixin.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/third/weixin.png)
1020 Bytes
public/img/passport/tip-sf68385e157.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip-sf68385e157.png)
2.28 KB
public/img/passport/tip/angle.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/angle.png)
1.02 KB
public/img/passport/tip/block.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/block.png)
1.33 KB
public/img/passport/tip/error.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/error.png)
1.18 KB
public/img/passport/tip/info.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/info.png)
1.2 KB
public/img/passport/tip/succ-info.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/succ-info.png)
1.17 KB
public/img/passport/tip/success-icon.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/success-icon.png)
1.58 KB
public/img/passport/tip/success.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/success.png)
1.21 KB
public/img/passport/tip/warn.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/tip/warn.png)
1.17 KB
public/img/passport/warn.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/warn.png)
1.05 KB
public/img/passport/yohofamily.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/passport/yohofamily.png)
22.6 KB
public/img/sprite.passport.png
0 → 100644
![](/fe/yohobuy-node/raw/b4916b1540283e90104d399edfd928f208c0793b/public/img/sprite.passport.png)
8.64 KB
public/js/passport/ac-email.js
0 → 100644
1 | +/** | ||
2 | + * 邮箱自动补全 | ||
3 | + * @author:xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2016/2/22 | ||
5 | + */ | ||
6 | +var $ = require('yoho-jquery'); | ||
7 | + | ||
8 | +var mailPostfix = { | ||
9 | + num: ['qq.com', '163.com', '126.com', 'sina.com', 'gmail.com', 'sohu.com', 'hotmail.com', '139.com', '189.com'], | ||
10 | + other: ['gmail.com', 'qq.com', '163.com', '126.com', 'sina.com', 'sohu.com', 'hotmail.com', '139.com', '189.com'] | ||
11 | +}; | ||
12 | + | ||
13 | +var emailAcTime; | ||
14 | + | ||
15 | +/** | ||
16 | + * @param $input 需要自动完成的$对象 | ||
17 | + * @param cb 鼠标移开/点击自动完成项后需要执行的操作(验证等) | ||
18 | + */ | ||
19 | +module.exports = function($input, cb) { | ||
20 | + var ulHtml = '<ul id="email-autocomplete" class="email-autocomplete hide"></ul>'; | ||
21 | + | ||
22 | + var $emailAutoComplete; | ||
23 | + | ||
24 | + $input.parent().append(ulHtml); | ||
25 | + | ||
26 | + $emailAutoComplete = $('#email-autocomplete'); | ||
27 | + | ||
28 | + $input.on('keyup', function() { | ||
29 | + var account = $.trim($(this).val()), | ||
30 | + html = '', | ||
31 | + accountMatch, | ||
32 | + matchStr, | ||
33 | + postfix, | ||
34 | + i; | ||
35 | + | ||
36 | + //输入@时自动补全邮箱后缀 | ||
37 | + //此处>0非错误,用于避免输入的第一个字符为@被识别为邮箱 | ||
38 | + if (account.indexOf('@') > 0) { | ||
39 | + accountMatch = account.match(/^[0-9]+@(.*)/); | ||
40 | + if (accountMatch) { | ||
41 | + | ||
42 | + //数字邮箱补全 | ||
43 | + postfix = mailPostfix.num; | ||
44 | + matchStr = accountMatch[1]; | ||
45 | + } else { | ||
46 | + postfix = mailPostfix.other; | ||
47 | + matchStr = account.match(/@(.*)/)[1]; | ||
48 | + } | ||
49 | + | ||
50 | + for (i = 0; i < postfix.length; i++) { | ||
51 | + if (postfix[i].indexOf(matchStr) > -1) { | ||
52 | + html += '<li>' + account.slice(0, account.indexOf('@')) + '@' + postfix[i] + '</li>'; | ||
53 | + } | ||
54 | + } | ||
55 | + | ||
56 | + if (html !== '' && /.com$/.test(account) === false) { | ||
57 | + $emailAutoComplete.html(html).removeClass('hide'); | ||
58 | + } else { | ||
59 | + | ||
60 | + //隐藏autocomplete | ||
61 | + $emailAutoComplete.html('').addClass('hide'); | ||
62 | + } | ||
63 | + } | ||
64 | + }).on('blur', function() { | ||
65 | + emailAcTime = setTimeout(function() { | ||
66 | + | ||
67 | + //未点击自动完成项 | ||
68 | + $emailAutoComplete.addClass('hide'); | ||
69 | + | ||
70 | + cb && cb(); | ||
71 | + }, 200); | ||
72 | + }); | ||
73 | + | ||
74 | + //邮箱自动完成列表项点击 | ||
75 | + $emailAutoComplete.on('click', 'li', function() { | ||
76 | + clearTimeout(emailAcTime); //清空默认关闭 | ||
77 | + | ||
78 | + //点击自动完成项后进行验证 | ||
79 | + $input.val($(this).text()).focus(); | ||
80 | + | ||
81 | + $emailAutoComplete.addClass('hide'); | ||
82 | + | ||
83 | + cb && cb(); | ||
84 | + }); | ||
85 | +}; |
public/js/passport/back.index.page.js
0 → 100644
public/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 | + regx = require('./mail-phone-regx'), | ||
9 | + emailReg = regx.emailRegx, | ||
10 | + phoneRegx = regx.phoneRegx; | ||
11 | + | ||
12 | +var emailAc = require('./ac-email'); //邮箱自动完成 | ||
13 | + | ||
14 | +var $cr = $('#country-code-hide'), | ||
15 | + $phoneNum = $('#phone-num'), | ||
16 | + $ca = $('#captcha'), | ||
17 | + $ccList = $('#country-code-list'), | ||
18 | + $cc = $('#country-code'), | ||
19 | + $btn = $('#find-btn'), | ||
20 | + $accErr = $('#account-err'), | ||
21 | + $caErr = $('#captcha-err'), | ||
22 | + caCount = 4, //验证码位数 | ||
23 | + hasPh = false, | ||
24 | + hasCa = false; | ||
25 | + | ||
26 | + | ||
27 | +require('yoho-jquery-placeholder'); | ||
28 | + | ||
29 | +function imgcode() { | ||
30 | + var time = new Date(), | ||
31 | + $captchaImg = $('#captcha-img'), | ||
32 | + captchaImgSrc = $captchaImg.attr('src').split('?')[0]; | ||
33 | + | ||
34 | + $('#captcha-img').attr('src', captchaImgSrc + '?t=' + time.getTime()); | ||
35 | +} | ||
36 | + | ||
37 | +function enableBtn() { | ||
38 | + if (hasPh && hasCa) { | ||
39 | + $btn.removeClass('disable').prop('disabled', false); | ||
40 | + } else { | ||
41 | + $btn.addClass('disable').prop('disabled', true); | ||
42 | + } | ||
43 | +} | ||
44 | + | ||
45 | +function authcode() { | ||
46 | + if (!hasPh || !hasCa) { | ||
47 | + enableBtn(); | ||
48 | + return; | ||
49 | + } | ||
50 | + | ||
51 | + $.ajax({ | ||
52 | + type: 'POST', | ||
53 | + url: '/passport/back/authcode', | ||
54 | + data: { | ||
55 | + verifyCode: $.trim($ca.val()), | ||
56 | + phoneNum: $phoneNum.val(), | ||
57 | + area: $cr.val() | ||
58 | + } | ||
59 | + | ||
60 | + }).then(function(data) { | ||
61 | + if (data.code === 200) { | ||
62 | + hasCa = true; | ||
63 | + } else if (data.code === 402) { | ||
64 | + hasPh = false; | ||
65 | + hasCa = true; | ||
66 | + $accErr.removeClass('hide').find('em').text('该账号不存在'); | ||
67 | + $phoneNum.addClass('error'); | ||
68 | + } else if (data.code === 400) { | ||
69 | + hasCa = false; | ||
70 | + imgcode(); | ||
71 | + } | ||
72 | + enableBtn(); | ||
73 | + }); | ||
74 | +} | ||
75 | + | ||
76 | +function vaPn(v) { | ||
77 | + var pass = true, | ||
78 | + errTxt = ''; | ||
79 | + | ||
80 | + v = $.trim(v); | ||
81 | + if (v !== '') { | ||
82 | + if (/^[0-9]+$/.test(v)) { | ||
83 | + if (phoneRegx[$cr.val()].test(v)) { | ||
84 | + pass = true; | ||
85 | + } else { | ||
86 | + errTxt = '手机号码格式不正确, 请重新输入'; | ||
87 | + pass = false; | ||
88 | + } | ||
89 | + } else { | ||
90 | + if (emailReg.test(v)) { | ||
91 | + pass = true; | ||
92 | + } else { | ||
93 | + errTxt = '邮箱格式不正确, 请重新输入'; | ||
94 | + pass = false; | ||
95 | + } | ||
96 | + } | ||
97 | + } else { | ||
98 | + errTxt = '账户名不能为空'; | ||
99 | + pass = false; | ||
100 | + } | ||
101 | + hasPh = pass; | ||
102 | + authcode(); | ||
103 | + | ||
104 | + return { | ||
105 | + pass: pass, | ||
106 | + errTxt: errTxt | ||
107 | + }; | ||
108 | +} | ||
109 | + | ||
110 | +function vaCa() { | ||
111 | + var v = $.trim($ca.val()); | ||
112 | + | ||
113 | + if (v === '' || v.length < caCount) { | ||
114 | + hasCa = false; | ||
115 | + enableBtn(); | ||
116 | + return; | ||
117 | + } | ||
118 | + | ||
119 | + hasCa = true; | ||
120 | + | ||
121 | + authcode(); | ||
122 | +} | ||
123 | + | ||
124 | +emailAc($phoneNum, function() { | ||
125 | + var pnVa = vaPn($phoneNum.val()); | ||
126 | + | ||
127 | + if (pnVa.pass) { | ||
128 | + $accErr.addClass('hide'); | ||
129 | + $phoneNum.removeClass('error'); | ||
130 | + } else { | ||
131 | + $accErr.removeClass('hide').find('em').text(pnVa.errTxt); | ||
132 | + $phoneNum.addClass('error'); | ||
133 | + } | ||
134 | + } | ||
135 | +); | ||
136 | + | ||
137 | +$ca.attr('maxlength', caCount); | ||
138 | + | ||
139 | +//IE8 placeholder | ||
140 | +$('input').placeholder(); | ||
141 | + | ||
142 | +$('#change-captcha, #captcha-img').on('click', function() { | ||
143 | + imgcode(); | ||
144 | +}); | ||
145 | + | ||
146 | +$cc.on('click', function(e) { | ||
147 | + e.stopPropagation(); | ||
148 | + if ($ccList.css('style') === 'block') { | ||
149 | + $ccList.slideUp('fast'); | ||
150 | + } else { | ||
151 | + $ccList.slideDown('fast'); | ||
152 | + } | ||
153 | +}); | ||
154 | + | ||
155 | +$ccList.delegate('li', 'click', function(e) { | ||
156 | + var $cur = $(this), | ||
157 | + code = $cur.data('cc'), | ||
158 | + pnVa; | ||
159 | + | ||
160 | + e.stopPropagation(); | ||
161 | + $cr.val(code); | ||
162 | + $cc.find('em').html($cur.text()); | ||
163 | + | ||
164 | + //切换后验证手机号码 | ||
165 | + if ($.trim($phoneNum.val()) !== '') { | ||
166 | + pnVa = vaPn($phoneNum.val()); | ||
167 | + enableBtn(); | ||
168 | + if (hasPh) { | ||
169 | + $accErr.addClass('hide'); | ||
170 | + $phoneNum.removeClass('error'); | ||
171 | + } else { | ||
172 | + $accErr.removeClass('hide').text(pnVa.errTxt); | ||
173 | + $phoneNum.addClass('error'); | ||
174 | + } | ||
175 | + } | ||
176 | + $ccList.slideUp('fast'); | ||
177 | +}); | ||
178 | + | ||
179 | +$(document).click(function() { | ||
180 | + if ($ccList.css('display') === 'block') { | ||
181 | + $ccList.slideUp(); | ||
182 | + } | ||
183 | +}); | ||
184 | + | ||
185 | +$phoneNum.keyup(function() { | ||
186 | + vaPn($.trim($(this).val())); | ||
187 | +}).focus(function() { | ||
188 | + $(this).removeClass('error'); | ||
189 | + | ||
190 | + //focus隐藏错误提示 | ||
191 | + $accErr.addClass('hide'); | ||
192 | +}); | ||
193 | + | ||
194 | +//验证码在鼠标移开后验证, keyup时不再验证 | ||
195 | +$ca.blur(function() { | ||
196 | + var errTxt = $.trim($ca.val()) === '' ? '验证码不能为空' : '验证码不正确'; | ||
197 | + | ||
198 | + if (hasCa) { | ||
199 | + $caErr.addClass('hide'); | ||
200 | + $ca.removeClass('error'); | ||
201 | + } else { | ||
202 | + $caErr.removeClass('hide').find('em').text(errTxt); | ||
203 | + $ca.addClass('error'); | ||
204 | + | ||
205 | + //验证码错误则刷新验证码 | ||
206 | + if ($ca.val() < caCount) { | ||
207 | + | ||
208 | + //防止重复刷新验证码 | ||
209 | + imgcode(); | ||
210 | + } | ||
211 | + } | ||
212 | +}).focus(function() { | ||
213 | + $(this).removeClass('error'); | ||
214 | + | ||
215 | + //focus隐藏错误提示 | ||
216 | + $caErr.addClass('hide'); | ||
217 | +}).keyup(function() { | ||
218 | + vaCa(); | ||
219 | +}); | ||
220 | + | ||
221 | +$('#find-btn').click(function(e) { | ||
222 | + | ||
223 | + if (/^[0-9]+$/.test($.trim($phoneNum.val()))) { | ||
224 | + $('#find-form').attr('action', '/passport/back/mobile'); | ||
225 | + } | ||
226 | + if ($(this).hasClass('disable')) { | ||
227 | + return; | ||
228 | + } | ||
229 | + if (!hasCa || !hasPh) { | ||
230 | + e.preventDefault(); | ||
231 | + return true; | ||
232 | + } | ||
233 | +}); |
public/js/passport/mail-phone-regx.js
0 → 100644
1 | +/** | ||
2 | + * 国家区号Map手机号码以及邮箱验证正则 | ||
3 | + * @author: xuqi<qi.xu@yoho.cn> | ||
4 | + * @date: 2015/12/11 | ||
5 | + */ | ||
6 | + | ||
7 | +var countryPhoneRegx = { | ||
8 | + '+86': /^1[35847]{1}[0-9]{9}$/, | ||
9 | + '+852': /^[965]{1}[0-9]{7}$/, | ||
10 | + '+853': /^[0-9]{8}$/, | ||
11 | + '+886': /^[0-9]{10}$/, | ||
12 | + '+65': /^[98]{1}[0-9]{7}$/, | ||
13 | + '+60': /^1[1234679]{1}[0-9]{8}$/, | ||
14 | + '+1': /^[0-9]{10}$/, | ||
15 | + '+82': /^01[0-9]{9}$/, | ||
16 | + '+44': /^7[789]{1}[0-9]{8}$/, | ||
17 | + '+81': /^0[9|8|7][0-9]{9}$/, | ||
18 | + '+61': /^[0-9]{11}$/ | ||
19 | +}; | ||
20 | + | ||
21 | +var emailRegx = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/; | ||
22 | + | ||
23 | +var pwdValidateRegx = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/; | ||
24 | + | ||
25 | +exports.phoneRegx = countryPhoneRegx; | ||
26 | + | ||
27 | +exports.emailRegx = emailRegx; | ||
28 | + | ||
29 | +exports.pwdValidateRegx = pwdValidateRegx; |
public/scss/passport/_third.css
deleted
100644 → 0
1 | -.yohobindbtn { | ||
2 | - display: block; | ||
3 | - width:210px; | ||
4 | - height: 45px; | ||
5 | - line-height: 45px; | ||
6 | - background-color: #f02200; | ||
7 | - color: #fff; | ||
8 | - font-size: 16px; | ||
9 | - text-align: center; | ||
10 | -} | ||
11 | -.hide { | ||
12 | - display: none; | ||
13 | -} | ||
14 | -.novisiable { | ||
15 | - visibility: hidden; | ||
16 | -} | ||
17 | -.actlevel { | ||
18 | - background-color: #f02200 !important; | ||
19 | - color: white !important; | ||
20 | -} | ||
21 | -.mask { | ||
22 | - position: fixed; | ||
23 | - top: 0; | ||
24 | - right: 0; | ||
25 | - bottom: 0; | ||
26 | - left: 0; | ||
27 | - z-index: 1050; | ||
28 | - overflow: hidden; | ||
29 | - -webkit-overflow-scrolling: touch; | ||
30 | - outline: 0; | ||
31 | -} | ||
32 | - | ||
33 | -.bindwrapper { | ||
34 | - margin: 0 auto; | ||
35 | - width: 980px; | ||
36 | - min-height: 450px; | ||
37 | - padding-top: 122px; | ||
38 | -} | ||
39 | -.welcomeword { | ||
40 | - width: 100%; | ||
41 | - text-align: center; | ||
42 | - font-size: 22px; | ||
43 | - line-height: 22px; | ||
44 | - color: #545454; | ||
45 | - margin-bottom: 15px; | ||
46 | - .yoho { | ||
47 | - color: #e12000; | ||
48 | - } | ||
49 | -} | ||
50 | -.safeword { | ||
51 | - width: 100%; | ||
52 | - text-align: center; | ||
53 | - font-size: 16px; | ||
54 | - line-height: 16px; | ||
55 | - color: #545454; | ||
56 | - margin-bottom: 63px; | ||
57 | -} | ||
58 | -.yohobindrow { | ||
59 | - width: 485px; | ||
60 | - margin: 0 auto 22px; | ||
61 | - height: 40px; | ||
62 | - .name { | ||
63 | - float: left; | ||
64 | - text-align: right; | ||
65 | - margin-right: 14px; | ||
66 | - width: 96px; | ||
67 | - } | ||
68 | - .areatag { | ||
69 | - height: 30px; | ||
70 | - line-height: 30px; | ||
71 | - } | ||
72 | - .phonetag, | ||
73 | - .setpwdtag { | ||
74 | - height: 47px; | ||
75 | - line-height: 47px; | ||
76 | - } | ||
77 | - .content { | ||
78 | - float: left; | ||
79 | - text-align: left; | ||
80 | - margin-top: 0; | ||
81 | - padding-left: 0; | ||
82 | - } | ||
83 | - .errinfo { | ||
84 | - color: #f02200; | ||
85 | - line-height: 49px; | ||
86 | - margin-left: 5px; | ||
87 | - } | ||
88 | - &::after { | ||
89 | - display: block; | ||
90 | - content: ''; | ||
91 | - clear: both; | ||
92 | - } | ||
93 | -} | ||
94 | -.sendnotify { | ||
95 | - width: 260px; | ||
96 | - text-align: left; | ||
97 | - margin: 0 auto 18px; | ||
98 | -} | ||
99 | -.validaterow { | ||
100 | - margin: 0 auto 22px; | ||
101 | - padding-left: 248px; | ||
102 | - .name { | ||
103 | - float: left; | ||
104 | - text-align: right; | ||
105 | - margin-right: 14px; | ||
106 | - width: 96px; | ||
107 | - } | ||
108 | - .areatag { | ||
109 | - height: 30px; | ||
110 | - line-height: 30px; | ||
111 | - } | ||
112 | - .phonetag { | ||
113 | - height: 47px; | ||
114 | - line-height: 47px; | ||
115 | - } | ||
116 | - .content { | ||
117 | - float: left; | ||
118 | - text-align: left; | ||
119 | - .err-tip { | ||
120 | - left: 430px; | ||
121 | - } | ||
122 | - } | ||
123 | - &::after { | ||
124 | - display: block; | ||
125 | - content: ''; | ||
126 | - clear: both; | ||
127 | - } | ||
128 | - .validatewrapper { | ||
129 | - float: left; | ||
130 | - height: 45px; | ||
131 | - width: 133px; | ||
132 | - text-align: center; | ||
133 | - line-height: 45px; | ||
134 | - background-color: #d8d8d8; | ||
135 | - color: #000; | ||
136 | - font-size: 13px; | ||
137 | - margin-left: 18px; | ||
138 | - .yohobindbtn{ | ||
139 | - width: 133px; | ||
140 | - font-size: 13px; | ||
141 | - } | ||
142 | - } | ||
143 | -} | ||
144 | -.validatepicrow { | ||
145 | - overflow: hidden; | ||
146 | - margin: 0 auto 22px; | ||
147 | - padding-left: 250px; | ||
148 | - .name { | ||
149 | - float: left; | ||
150 | - text-align: right; | ||
151 | - margin-right: 14px; | ||
152 | - width: 96px; | ||
153 | - } | ||
154 | - .areatag { | ||
155 | - height: 30px; | ||
156 | - line-height: 30px; | ||
157 | - } | ||
158 | - .phonetag { | ||
159 | - height: 47px; | ||
160 | - line-height: 47px; | ||
161 | - } | ||
162 | - .content { | ||
163 | - float: left; | ||
164 | - text-align: left; | ||
165 | - } | ||
166 | - &::after { | ||
167 | - display: block; | ||
168 | - content: ''; | ||
169 | - clear: both; | ||
170 | - } | ||
171 | - .validatewrapper { | ||
172 | - float: left; | ||
173 | - height: 45px; | ||
174 | - text-align: center; | ||
175 | - line-height: 45px; | ||
176 | - color: #000; | ||
177 | - font-size: 13px; | ||
178 | - margin-left: 18px; | ||
179 | - .yohobindbtn{ | ||
180 | - width: 133px; | ||
181 | - font-size: 13px; | ||
182 | - } | ||
183 | - } | ||
184 | - .change-captcha { | ||
185 | - cursor: pointer; | ||
186 | - color: #f02200; | ||
187 | - text-decoration: underline; | ||
188 | - } | ||
189 | -} | ||
190 | -.setpwdwrapper { | ||
191 | - margin-bottom: 10px; | ||
192 | - height: 45px; | ||
193 | -} | ||
194 | -.safelevel { | ||
195 | - width: 291px; | ||
196 | - height: 15px; | ||
197 | - margin: 0 auto; | ||
198 | - text-align: right; | ||
199 | - font-size: 10px; | ||
200 | - color: #000; | ||
201 | - span { | ||
202 | - width: 28px; | ||
203 | - height: 15px; | ||
204 | - line-height: 15px; | ||
205 | - background-color: #e5e5e5; | ||
206 | - font-size: 10px; | ||
207 | - color: #000; | ||
208 | - margin-right: 4px; | ||
209 | - padding: 1px 8px; | ||
210 | - } | ||
211 | -} | ||
212 | -.green .color { | ||
213 | - background-color: #0f0; | ||
214 | - color: #fff; | ||
215 | -} | ||
216 | -.yellow .color { | ||
217 | - background-color: #ff0; | ||
218 | - color: #fff; | ||
219 | -} | ||
220 | -.red .color { | ||
221 | - background-color: #f00; | ||
222 | - color: #fff; | ||
223 | -} | ||
224 | -.yohoselectarea { | ||
225 | - position: relative; | ||
226 | - box-sizing: border-box; | ||
227 | - width: 131px; | ||
228 | - height: 33px; | ||
229 | - .optionshow { | ||
230 | - width: 100%; | ||
231 | - height: 100%; | ||
232 | - padding-left: 16px; | ||
233 | - border: 1px solid #d9d9d9; | ||
234 | - .areaname { | ||
235 | - display: block; | ||
236 | - float: left; | ||
237 | - width: 110px; | ||
238 | - height: 100%; | ||
239 | - line-height: 33px; | ||
240 | - font-size: 13px; | ||
241 | - color: #000; | ||
242 | - } | ||
243 | - .righttag { | ||
244 | - display: block; | ||
245 | - float: left; | ||
246 | - width: 21px; | ||
247 | - height: 100%; | ||
248 | - line-height: 33px; | ||
249 | - background-color: #d8d8d8; | ||
250 | - background-image: resolve('passport/arrowbottom.png'); | ||
251 | - background-repeat: no-repeat; | ||
252 | - background-position: center center; | ||
253 | - } | ||
254 | - } | ||
255 | - .optionslist { | ||
256 | - background-color: white; | ||
257 | - position: absolute; | ||
258 | - top: 35px; | ||
259 | - left: 0; | ||
260 | - width: 149px; | ||
261 | - z-index: 2; | ||
262 | - .optionitem { | ||
263 | - height: 33px; | ||
264 | - line-height: 33px; | ||
265 | - padding-left: 16px; | ||
266 | - font-size: 13px; | ||
267 | - &:hover { | ||
268 | - background-color: #dfdfdf; | ||
269 | - } | ||
270 | - } | ||
271 | - } | ||
272 | -} | ||
273 | -.yohophonewrapper { | ||
274 | - width: 271px; | ||
275 | - height: 47px; | ||
276 | - border: 1px solid #d9d9d9; | ||
277 | - position: relative; | ||
278 | - .areanum { | ||
279 | - float: left; | ||
280 | - height: 100%; | ||
281 | - width: 63px; | ||
282 | - line-height: 47px; | ||
283 | - text-align: center; | ||
284 | - color: #000; | ||
285 | - background-color: #d8d8d8; | ||
286 | - } | ||
287 | - .phonenum { | ||
288 | - outline: none; | ||
289 | - box-sizing: border-box; | ||
290 | - float: left; | ||
291 | - height: 45px; | ||
292 | - width: 205px; | ||
293 | - line-height: 38px; | ||
294 | - padding-left: 8px; | ||
295 | - border: none; | ||
296 | - color: #000; | ||
297 | - } | ||
298 | - | ||
299 | - .validatenum, | ||
300 | - .pwdcontent { | ||
301 | - width: 100%; | ||
302 | - } | ||
303 | -} | ||
304 | -.protoctolwrapper{ | ||
305 | - width: 350px; | ||
306 | - margin: 38px auto 0; | ||
307 | - padding-left: 85px; | ||
308 | - overflow: hidden; | ||
309 | - .choosewrapper { | ||
310 | - float: left; | ||
311 | - width: 13px; | ||
312 | - height: 13px; | ||
313 | - background-color: #4c4c4c; | ||
314 | - background-image: resolve('passport/choosed.png'); | ||
315 | - background-position: center center; | ||
316 | - background-repeat: no-repeat; | ||
317 | - margin-right: 14px; | ||
318 | - } | ||
319 | - .choosetag { | ||
320 | - width: 110%; | ||
321 | - height: 110%; | ||
322 | - display: block; | ||
323 | - opacity: 0; | ||
324 | - margin: 0; | ||
325 | - } | ||
326 | - span { | ||
327 | - float: left; | ||
328 | - color: #666; | ||
329 | - font-size: 13px; | ||
330 | - line-height: 14px; | ||
331 | - } | ||
332 | - .protoctol { | ||
333 | - color: #f02200; | ||
334 | - text-decoration: underline; | ||
335 | - } | ||
336 | - &::after { | ||
337 | - display: block; | ||
338 | - content: ''; | ||
339 | - clear: both; | ||
340 | - } | ||
341 | -} | ||
342 | -.confirmwrapper { | ||
343 | - overflow: hidden; | ||
344 | - margin-top: 47px !important; | ||
345 | -} | ||
346 | -.btnwrapper{ | ||
347 | - width: 350px; | ||
348 | - margin: 20px auto 0; | ||
349 | - padding-left: 85px; | ||
350 | -} | ||
351 | -.thirdloginwrapper { | ||
352 | - margin: 0 auto; | ||
353 | - width: 1150px; | ||
354 | - min-height: 450px; | ||
355 | - padding-top: 160px; | ||
356 | - .safeword { | ||
357 | - margin-bottom: 30px; | ||
358 | - } | ||
359 | - .left { | ||
360 | - box-sizing: border-box; | ||
361 | - float: left; | ||
362 | - width: 450px; | ||
363 | - height: 318px; | ||
364 | - border-right: 1px solid #e5e5e5; | ||
365 | - } | ||
366 | - .right { | ||
367 | - box-sizing: border-box; | ||
368 | - float: right; | ||
369 | - width: 696px; | ||
370 | - padding-top: 64px; | ||
371 | - height: 318px; | ||
372 | - } | ||
373 | - .gobuy, | ||
374 | - .completeprofile { | ||
375 | - float: left; | ||
376 | - display: inline-block; | ||
377 | - width: 94px; | ||
378 | - height: 94px; | ||
379 | - line-height: 94px; | ||
380 | - text-align: center; | ||
381 | - border-radius: 50%; | ||
382 | - background-color: #f02200; | ||
383 | - color: white; | ||
384 | - } | ||
385 | - .gobuy { | ||
386 | - margin-left: 228px; | ||
387 | - margin-right: 80px; | ||
388 | - } | ||
389 | -} | ||
390 | -.bindsuccesswrapper { | ||
391 | - margin: 0 auto; | ||
392 | - width: 1150px; | ||
393 | - min-height: 450px; | ||
394 | - padding-top: 160px; | ||
395 | - .successwrapper { | ||
396 | - width: 320px; | ||
397 | - height: 29px; | ||
398 | - margin: 0 auto 16px; | ||
399 | - .successtag { | ||
400 | - display: inline-block; | ||
401 | - margin-right: 28px; | ||
402 | - float: left; | ||
403 | - width: 29px; | ||
404 | - height: 29px; | ||
405 | - background-image: resolve('passport/bindsuccess.png'); | ||
406 | - background-repeat: no-repeat; | ||
407 | - } | ||
408 | - .congratulation { | ||
409 | - display: inline-block; | ||
410 | - height: 29px; | ||
411 | - line-height: 29px; | ||
412 | - font-size: 22px; | ||
413 | - } | ||
414 | - } | ||
415 | - .info { | ||
416 | - text-align: center; | ||
417 | - font-size: 16px; | ||
418 | - margin-bottom: 48px; | ||
419 | - } | ||
420 | - .gobuynow { | ||
421 | - margin: 0 auto; | ||
422 | - } | ||
423 | -} | ||
424 | -.bindconfrimwrapper { | ||
425 | - width: 900px; | ||
426 | - height: 439px; | ||
427 | - margin: -217px auto; | ||
428 | - background-color: #fff; | ||
429 | - box-sizing: border-box; | ||
430 | - padding-top: 37px; | ||
431 | - .topwrapper { | ||
432 | - width: 281px; | ||
433 | - height: 90px; | ||
434 | - margin: 0 auto 32px; | ||
435 | - .userphoto { | ||
436 | - width: 90px; | ||
437 | - height: 90px; | ||
438 | - vertical-align: middle; | ||
439 | - border-radius: 50%; | ||
440 | - margin-right: 22px; | ||
441 | - } | ||
442 | - .username{ | ||
443 | - vertical-align: middle; | ||
444 | - display: inline-block; | ||
445 | - width: 160px; | ||
446 | - @mixin ellipsis; | ||
447 | - font-weight: bold; | ||
448 | - color: #545454; | ||
449 | - } | ||
450 | - } | ||
451 | - .usertaginfo { | ||
452 | - text-align: center; | ||
453 | - font-size: 18px; | ||
454 | - font-weight: bold; | ||
455 | - color: #545454; | ||
456 | - margin-bottom: 15px; | ||
457 | - } | ||
458 | - .usertagremind { | ||
459 | - text-align: center; | ||
460 | - font-size: 16px; | ||
461 | - color: #888888; | ||
462 | - margin-bottom: 47px; | ||
463 | - } | ||
464 | - .otherphone{ | ||
465 | - margin: 0 auto 64px; | ||
466 | - } | ||
467 | - .logindirectly { | ||
468 | - display: block; | ||
469 | - text-align: center; | ||
470 | - text-decoration: underline; | ||
471 | - color: #f02200; | ||
472 | - } | ||
473 | -} | ||
474 | -.yohobindbtn[disabled] { | ||
475 | - background-color: #e5e5e5; | ||
476 | - cursor: not-allowed; | ||
477 | -} | ||
478 | -.gobindwrapper { | ||
479 | - width: 100%; | ||
480 | - height: 45px; | ||
481 | - margin-bottom: 70px; | ||
482 | - &::after { | ||
483 | - display: block; | ||
484 | - content: ''; | ||
485 | - clear: both; | ||
486 | - } | ||
487 | - .myphone { | ||
488 | - float: left; | ||
489 | - margin-left: 20px; | ||
490 | - width: 193px; | ||
491 | - } | ||
492 | - .logindirectly { | ||
493 | - display: inline-block; | ||
494 | - } | ||
495 | - .validaterow { | ||
496 | - overflow: hidden; | ||
497 | - margin: 0 auto 22px; | ||
498 | - padding-left: 222px; | ||
499 | - float: left; | ||
500 | - .name { | ||
501 | - float: left; | ||
502 | - text-align: right; | ||
503 | - margin-right: 14px; | ||
504 | - width: 96px; | ||
505 | - } | ||
506 | - .areatag { | ||
507 | - height: 30px; | ||
508 | - line-height: 30px; | ||
509 | - } | ||
510 | - .phonetag { | ||
511 | - height: 47px; | ||
512 | - line-height: 47px; | ||
513 | - } | ||
514 | - .content { | ||
515 | - float: left; | ||
516 | - text-align: left; | ||
517 | - .validatacode { | ||
518 | - outline: none; | ||
519 | - box-sizing: border-box; | ||
520 | - float: left; | ||
521 | - height: 45px; | ||
522 | - width: 113px; | ||
523 | - line-height: 38px; | ||
524 | - padding-left: 8px; | ||
525 | - border: 1px solid #d9d9d9; | ||
526 | - color: #000; | ||
527 | - } | ||
528 | - } | ||
529 | - .validatewrapper { | ||
530 | - float: left; | ||
531 | - height: 45px; | ||
532 | - width: 133px; | ||
533 | - text-align: center; | ||
534 | - line-height: 45px; | ||
535 | - background-color: #d8d8d8; | ||
536 | - color: #000; | ||
537 | - font-size: 13px; | ||
538 | - margin-left: 18px; | ||
539 | - .yohobindbtn{ | ||
540 | - width: 133px; | ||
541 | - font-size: 13px; | ||
542 | - } | ||
543 | - } | ||
544 | - } | ||
545 | - | ||
546 | -} | ||
547 | -.gobindbottomwrapper { | ||
548 | - width: 100%; | ||
549 | - padding-left: 341px; | ||
550 | - .logindirectly { | ||
551 | - display: inline-block; | ||
552 | - float: left; | ||
553 | - margin-right: 36px; | ||
554 | - text-decoration: underline; | ||
555 | - color: #f02200; | ||
556 | - } | ||
557 | -} | ||
558 | -.pwd-tips { | ||
559 | - position: absolute; | ||
560 | - z-index: 1000; | ||
561 | - top: -10px; | ||
562 | - left: 285px; | ||
563 | - width: 160px !important; | ||
564 | - height: 72px; | ||
565 | - padding-top: 7px; | ||
566 | - font-size: 12px; | ||
567 | - background: #FFFFFF url(/passport/tip/block.png) no-repeat; | ||
568 | - | ||
569 | - >div { | ||
570 | - position: relative; | ||
571 | - height: 22px; | ||
572 | - line-height: 22px; | ||
573 | - margin-left: 15px; | ||
574 | - padding-left: 15px; | ||
575 | - font-size: 12px; | ||
576 | - color: #b9b9b9; | ||
577 | - | ||
578 | - i { | ||
579 | - position: absolute; | ||
580 | - width: 14px; | ||
581 | - height: 14px; | ||
582 | - left: -2px; | ||
583 | - top: 50%; | ||
584 | - margin: -7px 0 0; | ||
585 | - background: url(/passport/tip/info.png) no-repeat; | ||
586 | - } | ||
587 | - | ||
588 | - &.no { | ||
589 | - color: red; | ||
590 | - i { | ||
591 | - background: url(/passport/tip/error.png) no-repeat; | ||
592 | - } | ||
593 | - | ||
594 | - } | ||
595 | - | ||
596 | - &.yes { | ||
597 | - i { | ||
598 | - background: url(/passport/tip/success.png) no-repeat; | ||
599 | - } | ||
600 | - } | ||
601 | - } | ||
602 | -} | ||
603 | - | ||
604 | -.tip-panel { | ||
605 | - position: absolute; | ||
606 | - display: none; | ||
607 | - width: 248px; | ||
608 | - padding: 0 10px; | ||
609 | - z-index: 100; | ||
610 | - background-color: #161616; | ||
611 | - border: 1px solid rgba(255, 255, 255, 0.7); | ||
612 | - margin-top: 5px; | ||
613 | - cursor: pointer; | ||
614 | - border-radius: 5px; | ||
615 | - | ||
616 | - li { | ||
617 | - height: 20px; | ||
618 | - line-height: 20px; | ||
619 | - color: #b9b9b9; | ||
620 | - } | ||
621 | -} | ||
622 | -.err-tip { | ||
623 | - position: absolute; | ||
624 | - font-size: 14px; | ||
625 | - white-space: nowrap; | ||
626 | - top: 8px; | ||
627 | - left: 285px; | ||
628 | - padding: 6px 0; | ||
629 | - color: #f00; | ||
630 | - | ||
631 | - i { | ||
632 | - display: block; | ||
633 | - float: left; | ||
634 | - height: 14px; | ||
635 | - width: 14px; | ||
636 | - background: url(/passport/tip/error.png) no-repeat; | ||
637 | - margin-right: 5px; | ||
638 | - } | ||
639 | - | ||
640 | - a { | ||
641 | - text-decoration: underline; | ||
642 | - color: #f00; | ||
643 | - } | ||
644 | -} | ||
645 | -.backdrop { | ||
646 | - position: fixed; | ||
647 | - background: #000; | ||
648 | - width: 100%; | ||
649 | - height: 100%; | ||
650 | - left: 0 ; | ||
651 | - top: 0 ; | ||
652 | - bottom: 0; | ||
653 | - right: 0; | ||
654 | - opacity: .5; | ||
655 | -} | ||
656 | -.err-info { | ||
657 | - display: none; | ||
658 | - z-index: 1000; | ||
659 | - position: absolute; | ||
660 | - top: -41px; | ||
661 | - left: 0px; | ||
662 | - height: 30px; | ||
663 | - line-height: 30px; | ||
664 | - color: red; | ||
665 | - background-color: #ffebeb; | ||
666 | - border: 1px solid #ffbdbe; | ||
667 | - padding: 0 10px; | ||
668 | - b { | ||
669 | - background: resolve('passport/angle.png'); | ||
670 | - position: absolute; | ||
671 | - height: 9px; | ||
672 | - width: 17px; | ||
673 | - top: 30px; | ||
674 | - left: 10px; | ||
675 | - } | ||
676 | -} |
-
Please register or login to post a comment