...
|
...
|
@@ -14,6 +14,9 @@ const clientService = require('../models/client-service'); |
|
|
* 在线客服客户端
|
|
|
*/
|
|
|
const index = (req, res) => {
|
|
|
let reg = /MSIE\s?[987]\.0/i;
|
|
|
let userAgent = req.headers['user-agent'];
|
|
|
let unSupport = reg.test(userAgent);
|
|
|
let type = 2;
|
|
|
let imgSize = '86x120';
|
|
|
let encryptedUid = aes.encryptionUid(req.user.uid);
|
...
|
...
|
@@ -22,10 +25,16 @@ const index = (req, res) => { |
|
|
layout: false
|
|
|
};
|
|
|
|
|
|
if(unSupport) {
|
|
|
res.render('unsupport', {
|
|
|
layout: false
|
|
|
});
|
|
|
} else {
|
|
|
clientService.getClientData(type, encryptedUid, imgSize)
|
|
|
.then(result => {
|
|
|
res.render('client', Object.assign(data, result));
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
|
|
|
/**
|
...
|
...
|
|