Authored by htoooth

fix

... ... @@ -22,6 +22,6 @@ module.exports = class extends global.yoho.BaseModel {
params.shopping_key = shoppingKey;
}
return this.api.get({data: params});
return this.get({data: params});
}
};
... ...
... ... @@ -5,14 +5,13 @@
'use strict';
const aes = require('./aes-pwd');
const logger = global.yoho.logger;
module.exports = class extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
signinByPasswordWithAes(area, profile, password, shoppingKey, clientIp) {
signinByPasswordWithAes(area, profile, password, shoppingKey) {
let param = {
method: 'sesame.flowering.higher',
area: area,
... ... @@ -24,8 +23,6 @@ module.exports = class extends global.yoho.BaseModel {
param.shopping_key = shoppingKey;
}
logger.info('login successfully by password from', clientIp);
return this.post({data: param});
}
... ...
... ... @@ -36,7 +36,7 @@ module.exports = class extends global.yoho.BaseModel {
signin(type, area, profile, password, shoppingKey, close) {
let loginBy = {
password: this.api.signinByPasswordWithAes(this.api),
password: this.api.signinByPasswordWithAes.bind(this.api),
sms: this.api.signinBySMS.bind(this.api),
qrcode: this.api.signinByQrCode.bind(this.api)
};
... ...
... ... @@ -21,7 +21,7 @@ module.exports = class extends global.yoho.BaseModel {
mobile: mobile
};
return this.api.post({data: params});
return this.post({data: params});
}
validMobileCode(area, mobile, code) {
... ... @@ -32,7 +32,7 @@ module.exports = class extends global.yoho.BaseModel {
code: code
};
return this.api.post({data: params});
return this.post({data: params});
}
regMobileAes(area, mobile, password, code, shoppingKey, inviteCode) {
... ... @@ -52,6 +52,6 @@ module.exports = class extends global.yoho.BaseModel {
params.inviteCode = inviteCode;
}
return this.api.post({data: params});
return this.post({data: params});
}
};
... ...
... ... @@ -15,7 +15,7 @@ module.exports = class extends global.yoho.BaseModel {
* 根据手机号获取用户信息
*/
findByMobileAsync(area, mobile) {
return this.api.get({
return this.get({
data: {
mobile: mobile,
area: area,
... ... @@ -59,7 +59,7 @@ module.exports = class extends global.yoho.BaseModel {
method: 'app.passport.profile'
};
return this.api.get({data: param});
return this.get({data: param});
}
... ... @@ -69,7 +69,7 @@ module.exports = class extends global.yoho.BaseModel {
uid: uid
};
return this.api.get({data: param});
return this.get({data: param});
}
};
... ...