Authored by 王水玲

Merge branch 'feature/passport' into release/4.8

... ... @@ -58,8 +58,6 @@ const bind = {
let isReg = req.query.isReg;
let phoneNum = req.query.phoneNum;
console.log(typeof isReg);
res.render('bind/code', {
backUrl: helpers.urlFormat('passport/login'),
showHeaderImg: true,
... ... @@ -198,7 +196,7 @@ const bind = {
if (_.isNumber(parseInt(phoneNum, 0)) && openId && areaCode && sourceType && code) {
BindService.checkBindCode(areaCode, phoneNum, code).then(result => {
if (result && result.code && result.code === 200) {
return BindService.relateMobile(openId, sourceType, phoneNum, code);
return BindService.relateMobile(openId, sourceType, phoneNum, areaCode);
} else {
return { code: 400, message: '短信验证码错误', data: '' };
}
... ...
... ... @@ -32,7 +32,7 @@ function doPassportCallback(openId, nickname, sourceType, req, res) {
}
if (openId && nickname) {
return AuthHelper.signinByOpenID(nickname, openId, sourceType, shoppingKey).then((result) => {
if (result.data['is_bind'] && result.data['is_bind'] === 'N') { //eslint-disable-line
if (result && result.data['is_bind'] && result.data['is_bind'] === 'N') { //eslint-disable-line
return helpers.urlFormat('/passport/bind/index', {
openId: openId,
sourceType: sourceType,
... ...
... ... @@ -115,7 +115,6 @@ $btnNext.on('touchstart', function() {
// message: 'xxxx',
// }
if (res.code === 200) {
if (res.data.isReg === 1) {
dialog.showDialog({
... ...