...
|
...
|
@@ -21,6 +21,8 @@ const Sources = { |
|
|
douban: '豆瓣'
|
|
|
};
|
|
|
|
|
|
const DEFAULT_URL = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
|
|
|
|
|
|
const bind = {
|
|
|
indexPage: (req, res) => {
|
|
|
let openId = req.query.openId;
|
...
|
...
|
@@ -61,8 +63,6 @@ const bind = { |
|
|
bindConfirmPage: (req, res) => {
|
|
|
let thirdPart = req.query.thirdPart;
|
|
|
let user = req.query.user;
|
|
|
|
|
|
const DEFAULT_URL = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
|
|
|
let avatar = user.headImg || DEFAULT_URL;
|
|
|
|
|
|
res.display('bind/bind-confirm', Object.assign({
|
...
|
...
|
@@ -105,6 +105,27 @@ const bind = { |
|
|
}));
|
|
|
},
|
|
|
|
|
|
bindedPage: (req, res) => {
|
|
|
let thirdPart = req.query.thirdPart;
|
|
|
let user = req.query.user;
|
|
|
let avatar = user.headImg || DEFAULT_URL;
|
|
|
|
|
|
res.display('bind/bind-done', Object.assign({
|
|
|
module: 'passport',
|
|
|
page: 'bind-success',
|
|
|
title: '绑定手机号',
|
|
|
defaultHeader: false
|
|
|
}, {
|
|
|
avatar: avatar,
|
|
|
name: user.username || '咸鸭蛋',
|
|
|
loginUrl: helpers.urlFormat('/passport/login'),
|
|
|
bindUrl: helpers.urlFormat('/passport/thirdlogin/index', {
|
|
|
openId: thirdPart.openId,
|
|
|
sourceType: thirdPart.sourceType
|
|
|
})
|
|
|
}));
|
|
|
},
|
|
|
|
|
|
relateSuccessPage: (req, res) => {
|
|
|
let sourceType = _.trim(req.query.sourceType);
|
|
|
let sourceInfo = sourceType.split('_');
|
...
|
...
|
@@ -123,8 +144,6 @@ const bind = { |
|
|
relateConfirmPage: (req, res) => {
|
|
|
let thirdPart = req.query.thirdPart;
|
|
|
let user = req.query.user;
|
|
|
|
|
|
const DEFAULT_URL = 'http://img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100';
|
|
|
let avatar = user.headImg || DEFAULT_URL;
|
|
|
|
|
|
res.display('bind/relate-confirm', Object.assign({
|
...
|
...
|
|