Authored by ccbikai

整理代码

... ... @@ -59,11 +59,11 @@ class Auth {
domain: 'yohobuy.com'
});
}
req.session._TOKEN = token; // esline-disable-line
req.session._LOGIN_UID = uid; // esline-disable-line
req.session._TOKEN = token;
req.session._LOGIN_UID = uid;
res.cookie('_TOKEN', token, {
domain: 'yohobuy.com'
}); // esline-disable-line
});
});
}
}
... ...
... ... @@ -16,7 +16,7 @@ const ALIPAY_URL = 'https://mapi.alipay.com/gateway.do';
const defaultOptions = {
service: 'alipay.auth.authorize',
_input_charset: 'utf-8', // esline-disable-line
_input_charset: 'utf-8',
sign_type: 'MD5',
target_service: 'user.auth.quick.login'
};
... ...
... ... @@ -95,7 +95,7 @@ class RegService {
};
if (shoppingKey) {
params.shopping_key = shoppingKey; // esline-disable-line
params.shopping_key = shoppingKey;
}
return api.post('', params);
... ...
... ... @@ -286,6 +286,9 @@ exports.verifyMobile = (phone) => {
return /^1[3|4|5|8|7][0-9]{9}$/.test(phone);
};
/**
* 验证密码规则
*/
exports.verifyPassword = (password) => {
if (!password) {
return false;
... ...