Authored by 王水玲

登录接口改成加密登录接口

... ... @@ -78,7 +78,8 @@ let index = (req, res) => {
t: Date.now()
}),
itemUrl: helpers.urlFormat('/help/detail', {
id: 25
id: 103,
contId: 239
}),
referUrl: refer,
loginUrl: helpers.urlFormat('/passport/login', {
... ...
/**
* 登录注册密码加密,uid加密
* @author: wsl<shuiling.wang@yoho.cn>
* @date: 2016/07/07
*/
'use strict';
const crypto = global.yoho.crypto;
/**
* 密码加密
**/
const aesPwd = (pwd) => {
return crypto.encryption('yoho9646yoho9646', pwd);
};
module.exports = {
aesPwd
};
... ...
... ... @@ -3,18 +3,18 @@
*/
'use strict';
const aes = require('./aes-pwd');
const api = global.yoho.API;
/**
* 手机或邮箱登录
* 手机或邮箱登录 app.passport.signin => app.passport.signinAES 加密
*/
const signinAsync = (area, profile, password, shoppingKey) => {
let param = {
method: 'app.passport.signin',
method: 'app.passport.signinAES',
area: area,
profile: profile,
password: password
password: aes.aesPwd(password)
};
if (shoppingKey) {
... ...
... ... @@ -31,7 +31,6 @@
{{/if}}
{{#if newProducts}}
{{log newProducts}}
<div class="center-content clearfix new-arrival-warp">
<div class="floor-header clearfix">
<h2 class="floor-title en-size">NEW ARRIVALS</h2>
... ...