...
|
...
|
@@ -75,7 +75,7 @@ const bind = { |
|
|
});
|
|
|
},
|
|
|
|
|
|
bindCheck: (req, res) => {
|
|
|
bindCheck: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let openId = req.body.openId;
|
|
|
let areaCode = req.body.areaCode || '86';
|
...
|
...
|
@@ -105,7 +105,7 @@ const bind = { |
|
|
}
|
|
|
|
|
|
res.json(data);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({
|
|
|
code: 400,
|
...
|
...
|
@@ -115,7 +115,7 @@ const bind = { |
|
|
}
|
|
|
},
|
|
|
|
|
|
sendBindMsg: (req, res) => {
|
|
|
sendBindMsg: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let areaCode = req.body.areaCode;
|
|
|
|
...
|
...
|
@@ -126,13 +126,13 @@ const bind = { |
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
checkBindMsg: (req, res) => {
|
|
|
checkBindMsg: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let code = req.body.code;
|
|
|
let areaCode = req.body.areaCode;
|
...
|
...
|
@@ -144,13 +144,13 @@ const bind = { |
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
bindMobile: (req, res) => {
|
|
|
bindMobile: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let openId = req.body.openId;
|
|
|
let areaCode = req.body.areaCode || '86';
|
...
|
...
|
@@ -176,13 +176,13 @@ const bind = { |
|
|
return result;
|
|
|
}).then(result => {
|
|
|
res.json(result);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
relateMobile: (req, res) => {
|
|
|
relateMobile: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let openId = req.body.openId;
|
|
|
let areaCode = req.body.areaCode || '86';
|
...
|
...
|
@@ -206,7 +206,7 @@ const bind = { |
|
|
return result;
|
|
|
}).then(result => {
|
|
|
res.json(result);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
...
|
...
|
@@ -223,20 +223,20 @@ const bind = { |
|
|
});
|
|
|
},
|
|
|
|
|
|
changeCheck: (req, res) => {
|
|
|
changeCheck: (req, res, next) => {
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let areaCode = req.body.areaCode;
|
|
|
|
|
|
if (_.isNumber(parseInt(phoneNum, 0)) && areaCode) {
|
|
|
BindService.changeCheck(phoneNum, areaCode).then(result => {
|
|
|
res.json(result);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
|
|
},
|
|
|
|
|
|
changeMobile: (req, res) => {
|
|
|
changeMobile: (req, res, next) => {
|
|
|
let uid = req.user.uid;
|
|
|
let phoneNum = req.body.phoneNum;
|
|
|
let areaCode = req.body.areaCode;
|
...
|
...
|
@@ -245,7 +245,7 @@ const bind = { |
|
|
if (_.isNumber(parseInt(phoneNum, 0)) && uid && areaCode && code) {
|
|
|
BindService.changeMobile(uid, phoneNum, areaCode, code).then(result => {
|
|
|
res.json(result);
|
|
|
});
|
|
|
}).catch(next);
|
|
|
} else {
|
|
|
res.json({ code: 400, message: '', data: '' });
|
|
|
}
|
...
|
...
|
|