|
@@ -18,7 +18,7 @@ exports.page = (req, res, next) => { |
|
@@ -18,7 +18,7 @@ exports.page = (req, res, next) => { |
18
|
|
18
|
|
19
|
userApi.profile(req.user.uid)
|
19
|
userApi.profile(req.user.uid)
|
20
|
.then(userinfo => {
|
20
|
.then(userinfo => {
|
21
|
- userinfo = userinfo.data;
|
21
|
+ userinfo = userinfo.data || {};
|
22
|
|
22
|
|
23
|
res.render('chat/index', {
|
23
|
res.render('chat/index', {
|
24
|
module: 'service',
|
24
|
module: 'service',
|
|
@@ -30,7 +30,7 @@ exports.page = (req, res, next) => { |
|
@@ -30,7 +30,7 @@ exports.page = (req, res, next) => { |
30
|
imSocket: global.yoho.config.domains.imSocket,
|
30
|
imSocket: global.yoho.config.domains.imSocket,
|
31
|
userData: {
|
31
|
userData: {
|
32
|
encrypteduid: crypto.encryption(null, uid + ''),
|
32
|
encrypteduid: crypto.encryption(null, uid + ''),
|
33
|
- avatar: helpers.image(userinfo.head_ico, 100, 100),
|
33
|
+ avatar: userinfo.head_ico ? helpers.image(userinfo.head_ico, 100, 100) : '',
|
34
|
uname: userinfo.profile_name
|
34
|
uname: userinfo.profile_name
|
35
|
}
|
35
|
}
|
36
|
});
|
36
|
});
|