Authored by 姜枫

handle merge

... ... @@ -165,20 +165,3 @@ passport.use('alipay', new AlipayStrategy({
done(null, profile);
}));
// douban 登录
passport.use('douban', new DoubanStrategy({
clientID: '03b4e36bf13dc75a0b1eaa43d3b9560e',
clientSecret: 'f16d5913e8610672',
callbackURL: `${siteUrl}/passport/autosign/doubanback`
}, (accessToken, refreshToken, profile, done) => {
done(null, profile);
}));
// renren 登录
passport.use('renren', new RenrenStrategy({
clientID: '783130c654c94a77ace97054ae266019',
clientSecret: '05e430de8c1e40d3a1f39ca8d3f8252c',
callbackURL: `${siteUrl}/passport/login/renren/callback`
}, (accessToken, refreshToken, profile, done) => {
done(null, profile);
}));
... ...
... ... @@ -116,8 +116,8 @@ const local = {
defaultHeader: false,
passport: {
countryCode: bindArea,
countryName: areaName,
countryList: areaArr,
countryName: {text: areaName},
country: {list: areaArr},
forgetPwd: helpers.urlFormat('/passport/back/index'),
fastReg: helpers.urlFormat('/passport/reg'),
weixinLogin: helpers.urlFormat('/passport/autosign/wechat'),
... ...
... ... @@ -54,7 +54,7 @@ router.get('/thirdlogin/relateConfirm', bind.relateConfirmPage);
router.get('/thirdlogin/relateSuccess', bind.relateSuccessPage);
// 第三方已经绑定
router.get('/thirdlogin/binded', bind.bindedPage);
router.get('/thirdlogin/bindedPage', bind.bindedPage);
// 第三方登录api
router.post('/autouserinfo/bindMobile', bind.bindMobile);
... ...
... ... @@ -53,10 +53,7 @@
<input value="" id="phoneNum" class="input va phone-num" type="text" name="phoneNum"
placeholder="Phone Number" autocomplete="off">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ... @@ -68,10 +65,7 @@
placeholder="图形验证码"
autocomplete="off" maxlength="4">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<div class="left captcha-component">
... ...
... ... @@ -47,10 +47,7 @@
<input id="pwd" class="input va pwd" type="password" name="pwd" placeholder="新的登录密码"
maxlength="20">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</li>
<li class="clearfix">
... ... @@ -58,11 +55,7 @@
placeholder="确认登录密码" maxlength="20">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</li>
<li class="clearfix blank">
<input type="hidden" name="code" value="{{code}}">
... ... @@ -81,10 +74,6 @@
</form>
</ul>
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{/ resetPwd}}
</div>
... ...
... ... @@ -55,10 +55,7 @@
<input id="captcha" class="input va captcha left" type="text" name="code" maxlength="4"
placeholder="请输入短信验证码">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<a id="send-captcha" class="btn send-captcha left">获取短信验证码</a>
... ...
... ... @@ -15,10 +15,7 @@
<div class="pwd-wrapper">
<input id="pwd" class="input" type="password" placeholder="新的登录密码">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ... @@ -26,10 +23,7 @@
<div class="repwd-wrapper">
<input id="repwd" class="input" type="password" placeholder="确认登录密码">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ...
... ... @@ -26,12 +26,7 @@
<input id="phone-num" name='mobile' class="phone-num" type="text"
placeholder="Phone Number">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</div>
</li>
... ... @@ -44,10 +39,7 @@
<input id="verifyCode" name='verifyCode' class="input left" name="code" type="text"
placeholder="图形验证码">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
... ... @@ -65,10 +57,7 @@
<input id="sms-captcha-input" name='code' class="input left sms-captcha-input" type="text"
placeholder="短信验证码">
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<div class="left">
... ...
... ... @@ -6,11 +6,15 @@
<div class="title">登录 SIGN IN</div>
</li>
<li class="clearfix">
<select id="country-list" class="country-list">
{{#each countryList}}
<option {{#if selected}}selected="selected"{{/if}} value="{{areaCode}}">{{name}}</option>
{{/each}}
</select>
<!--<select id="country-list" class="country-list">-->
<!--{{#each countryList}}-->
<!--<option {{#if selected}}selected="selected"{{/if}} value="{{areaCode}}">{{name}}</option>-->
<!--{{/each}}-->
<!--</select>-->
{{> select-header}}
{{> select-list}}
<div id="phone" class="left phone needTip">
<span id="country-code" class="country-code">{{countryCode}}</span>
... ... @@ -18,10 +22,7 @@
type="text"
placeholder="Phone Number" autocomplete="off">
<div class="tips phone-num-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ... @@ -32,10 +33,7 @@
placeholder="Password"
autocomplete="off" maxlength="20">
<div class="tips pwd-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ... @@ -45,10 +43,7 @@
<input id="captcha" class="input va captcha needTip" type="text" name="captcha" placeholder="图形验证码"
autocomplete="off" maxlength="4">
<div class="tips img-captcha-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<div class="left captcha-component">
... ...
<div class="tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
\ No newline at end of file
... ...
... ... @@ -16,10 +16,7 @@
<input value="" id="phone-num" class="input phone-num" type="text" name="phoneNum"
placeholder="Phone Number" autocomplete="off">
<div class="tips phone-num-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
... ... @@ -31,10 +28,7 @@
<input id="captcha" class="input captcha" type="text" name="captcha" placeholder="图形验证码"
autocomplete="off" maxlength="4">
<div class="tips img-captcha-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<div class="left captcha-component">
... ... @@ -50,10 +44,7 @@
<input id="msg-captcha" class="input msg-captcha" type="text" name="msgCaptcha" placeholder="短信验证码"
autocomplete="off" maxlength="4">
<div class="tips sms-captcha-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
<a id="send-captcha" class="btn send-captcha disable">获取短信验证码</a>
... ... @@ -74,10 +65,7 @@
<input id="pwd" class="input pwd" name="pwd" placeholder="Password" autocomplete="off" maxlength="20"
type="password">
<div class="tips pwd-tips hide">
<div class="triangle"></div>
<div class="rectangle"></div>
</div>
{{> err-tip}}
</div>
</li>
... ... @@ -104,10 +92,6 @@
</div>
</li>
</ul>
<div id="err-tip" class="err-tip hide">
<span></span>
<b></b>
</div>
<input name="" type="hidden" id="open-id" value="{{openId}}"/>
<input name="" type="hidden" id="source-type" value="{{sourceType}}"/>
... ...
{{# countryName}}
<div id='country-select-header' class="country-select-header">
<span class="name left">{{text}}</span>
<span class="iconfont small right">&#xe617;</span>
</div>
{{/countryName}}
\ No newline at end of file
... ...
{{# country}}
<div id="country-select-list" class="country-select-list hide">
{{# each list}}
<div class="option {{#if selected}}selected{{/if}}" data-code="{{areaCode}}" data-value="{{name}}">
<span class="iconfont small left">{{#if selected}}&#xe60b;{{/if}}</span>
<span class="left">{{name}}</span>
</div>
{{/each}}
</div>
{{/country}}
\ No newline at end of file
... ...
<div id="select" class="select relative">
<div id="header" class="header">
<div class="name"> 中国</div>
<span class="iconfont">&#xe617;</span>
</div>
<div id="phone" class="phone">
<span id="country-code" class="country-code">{{countryCode}}</span>
<input id="account" class="account input phone-num va" name="account" value="{{bindMobile}}"
type="text"
placeholder="Phone Number" autocomplete="off">
</div>
</div>
<div>
<div id="options" class="options">
<div name="option" class="option" value="+1">
<span name="status" class="selected iconfont">&#xe60b;</span>
<div name="name" class="name">中国</div>
</div>
</div>
<div name="option" class="option touch" value="+1">
<span name="status" class="selected iconfont">&#xe60b;</span>
<div name="name" class="name">中国澳门</div>
</div>
</div>
\ No newline at end of file
... ... @@ -19,8 +19,8 @@ module.exports = {
},
cookieDomain: 'yohobuy.com',
domains: {
api: 'http://api.yoho.cn/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service: 'http://service.yoho.cn/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
api: 'http://devapi.yoho.cn:58078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
search: 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: false,
... ...
... ... @@ -17,7 +17,8 @@ var $loginTip = $loginBtn.siblings('.login-fail-tip'),
ep = new EventProxy();
var $regionCodeText = $('#country-code'),
$regionSelectCtrl = $('#country-list');
$regionSelectList = $('#country-select-list'),
$regionSelectHeader = $('#country-select-header');
var $emailAutoComplete = $('#email-autocomplete');
... ... @@ -37,6 +38,13 @@ var checkbox = {
unchecked: '&#xe601;'
};
var upDown = {
up: '&#xe617;',
down: '&#xe616;'
};
var selectedIcon = '&#xe60b;';
require('yoho-jquery-placeholder');
function errTip(ele, msg) {
... ... @@ -258,11 +266,40 @@ $phoneNumInput.on('focus', function() {
$('[placeholder]').placeholder();
// 选择地点
$regionSelectCtrl.change(function() {
var $this = $(this);
function changeHeader() {
var $indicator = $regionSelectHeader.find('.iconfont');
if ($regionSelectList.hasClass('hide')) {
$indicator.html(upDown.up);
} else {
$indicator.html(upDown.down);
}
}
// 选择图家列表
$regionSelectList.on('click', '.option', function() {
var $clickItem = $(this);
var areaCode = $clickItem.data('code');
var name = $clickItem.data('value');
var $selectedItem = $clickItem.siblings('.selected');
$selectedItem.find('.iconfont').html('');
$selectedItem.removeClass('selected');
$clickItem.find('.iconfont').html(selectedIcon);
$clickItem.addClass('selected');
$regionSelectHeader.find('.name').html(name);
$regionCodeText.text(areaCode);
$regionSelectList.addClass('hide');
changeHeader();
});
$regionCodeText.text($this.val());
// 选择图家头
$regionSelectHeader.on('click', function() {
$regionSelectList.toggleClass('hide');
changeHeader();
});
// 密码
... ...
... ... @@ -97,6 +97,61 @@
.focus {
border: 2px solid #000 !important;
}
.country-select-list {
position: absolute;
top: $item-height;
width: $item-width;
background-color: #f8f8f8;
border: 1px solid #eeeeee;
z-index: 100;
font-size: 10px;
.option {
height: 20px;
cursor: pointer;
span {
display: inline-block;
height: 20px;
line-height: @height;
}
}
.option:hover {
background-color: #666666;
color: white;
}
.small {
font-size: 14px;
margin: 0 3px;
width: 15px;
}
}
.country-select-header {
height: $item-height;
width: 100px;
border: 1px solid #eeeeee;
font-size: 16px;
float: left;
cursor: pointer;
.small {
font-size: 14px;
height: 40px;
width: 20px;
line-height: @height;
}
.name {
display: inline-block;
height: 40px;
line-height: @height;
margin-left: 10px;
}
}
}
@import "login";
... ...