...
|
...
|
@@ -13,7 +13,7 @@ const helpers = global.yoho.helpers; |
|
|
*/
|
|
|
const component = {
|
|
|
index: (req, res, next) => {
|
|
|
const uid = req.user.uid || 14459668;
|
|
|
const uid = req.user.uid;
|
|
|
|
|
|
if (!uid && req.xhr) {
|
|
|
return res.json({
|
...
|
...
|
@@ -31,14 +31,14 @@ const component = { |
|
|
head_ico: proData && proData.head_ico ? helpers.image(proData.head_ico, 200, 200) : '',
|
|
|
nickname: proData ? proData.nickname : '登录/注册',
|
|
|
userinfourl: proData ? '/home/mydetails' : '',
|
|
|
serviceUrl: 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&'
|
|
|
serviceUrl: '/home/service'
|
|
|
};
|
|
|
|
|
|
res.render('index', _.merge(result, data[1]));
|
|
|
}).catch(next);
|
|
|
},
|
|
|
mydetails: (req, res, next) => {
|
|
|
const uid = req.user.uid || 14459668;
|
|
|
const uid = req.user.uid;
|
|
|
|
|
|
homeModel.getUserProfileData(uid).then(data => {
|
|
|
data = data || {};
|
...
|
...
|
@@ -62,7 +62,7 @@ const component = { |
|
|
},
|
|
|
saveMydetails: (req, res, next) => {
|
|
|
var params = {
|
|
|
uid: req.user.uid || 14459668
|
|
|
uid: req.user.uid
|
|
|
};
|
|
|
|
|
|
if (req.body.nickname !== undefined) {
|
...
|
...
|
@@ -81,6 +81,9 @@ const component = { |
|
|
return res.json(data);
|
|
|
}).catch(next);
|
|
|
},
|
|
|
service: (req, res, next) => {
|
|
|
res.redirect('http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409')
|
|
|
},
|
|
|
help: (req, res, next) => {
|
|
|
homeModel.getHelpInfo().then(helpList => {
|
|
|
res.render('help', {
|
...
|
...
|
@@ -118,7 +121,6 @@ const component = { |
|
|
},
|
|
|
saveFeedback: (req, res, next) => {
|
|
|
let saveFeedbackPara = {
|
|
|
uid: '14459668',
|
|
|
content: req.body.content,
|
|
|
suggest_type: 2
|
|
|
};
|
...
|
...
|
|