Authored by 毕凯

取 udid 方法

... ... @@ -37,7 +37,7 @@ passport.use(new LocalStrategy({
let clientIp = req.yoho.clientIp || '';
let isSkip = req.body.isskip;
let from = req.cookies.from || 'yohobuy';
let udid = req.sessionID;
let udid = req.cookies.udid;
let captcha = req.body.captcha;
let superCapture = '';
... ...
... ... @@ -181,7 +181,7 @@ class BackNew {
sendCodeToMobileAPI(req, res, next) {
let phoneNum = req.body.phoneNum || '';
let areaCode = req.body.areaCode || '86';
let udid = req.sessionID;
let udid = req.cookies.udid;
let captcha = req.body.captcha;
let ERR = {
... ...
... ... @@ -128,7 +128,7 @@ const bind = {
sendBindMsg: (req, res, next) => {
let phoneNum = req.body.phoneNum;
let areaCode = req.body.areaCode || '86';
let udid = req.sessionID;
let udid = req.cookies.udid;
let captcha = req.body.captcha;
let superCapture = '';
... ...
... ... @@ -42,7 +42,7 @@ exports.imgCheck = (req, res, next) => {
* 验证img-check验证码
*/
exports.validate = (req, res, next) => {
// let udid = req.sessionID;
// let udid = req.cookies.udid;
// let captchaInput = req.body.captcha;
// return req.ctx(imgCheckServiceModel).check(udid, captchaInput).then(result => {
... ...
... ... @@ -178,7 +178,7 @@ class Reg {
let mobile = +req.body.phoneNum;
let area = +(req.body.areaCode || 86);
let inviteCode = req.body.inviteCode || '';
let udid = req.sessionID;
let udid = req.cookies.udid;
let captcha = req.body.captcha;
let superCapture = '';
... ...
... ... @@ -65,7 +65,7 @@ class SmsLogin {
indexCheck(req, res, next) {
let area = req.body.area = (req.body.area || '').trim();
let mobile = req.body.mobile = (req.body.mobile || '').trim();
let udid = req.sessionID;
let udid = req.cookies.udid;
let captcha = req.body.captcha;
let errorData = {
code: 400,
... ...
... ... @@ -16,7 +16,7 @@ const imgCheck = require('../models/imgcheck');
*/
const load = (req, res, next) => {
co(function* () {
let isNeedImgCheckApiData = yield req.ctx(imgCheck).isNeedImgCheck(req.sessionID);
let isNeedImgCheckApiData = yield req.ctx(imgCheck).isNeedImgCheck(req.cookies.udid);
if (_.parseInt(_.get(isNeedImgCheckApiData, 'code')) === 200) {
req.yoho.captchaShow = _.get(isNeedImgCheckApiData, 'data');
... ... @@ -52,7 +52,7 @@ const check = (req, res, next) => {
}
co(function* () {
let isNeedImgCheckApiData = yield req.ctx(imgCheck).isNeedImgCheck(req.sessionID);
let isNeedImgCheckApiData = yield req.ctx(imgCheck).isNeedImgCheck(req.cookies.udid);
req.yoho.captchaShow = true;
if (_.parseInt(_.get(isNeedImgCheckApiData, 'code')) === 200) {
... ...