Authored by 毕凯

Merge branch 'release/6.2' of git.yoho.cn:fe/yohobuywap-node into release/6.2

... ... @@ -2,7 +2,7 @@
const orderModel = require('../../home/models/order');
const crypto = global.yoho.crypto;
const imApi = require('../models/im-api');
const userApi = require('../../passport/models/auth-helper');
const userModel = require('../models/user');
const imModel = require('../models/im');
const helpers = global.yoho.helpers;
... ... @@ -16,7 +16,7 @@ exports.appAdapter = (req, res, next) => {
exports.page = (req, res, next) => {
let uid = req.user.uid || req.query.uid;
userApi.profile(req.user.uid)
req.ctx(userModel).profile(req.user.uid)
.then(userinfo => {
userinfo = userinfo.data || {};
... ...
'use strict';
const api = global.yoho.API;
class UserModel extends global.yoho.BaseModel {
constructor(ctx) {
super(ctx);
}
profile(uid) {
let param = {
uid: uid,
method: 'app.passport.profile'
};
return api.get('', param);
}
}
module.exports = UserModel;
... ...