Authored by 陈轩

im 改写gDomain的读法

... ... @@ -28,6 +28,7 @@ exports.page = (req, res) => {
width750: true,
localCss: true,
imServer: global.yoho.config.domains.imServer,
imSocket: global.yoho.config.domains.imSocket,
userData: {
uid: req.user.uid,
encrypteduid: req.user.ENCRYPTION_UID || (crypto.encryption(null, req.user.uid + '' || '0')),
... ...
... ... @@ -63,4 +63,10 @@
<input type="hidden" id="js-eid" value="{{encrypteduid}}">
<input type="hidden" id="js-avatar" value="{{avatar}}">
<input type="hidden" id="js-uname" value="{{uname}}">
{{/with}}
\ No newline at end of file
{{/with}}
<script>
var gDomains = {
imSocket: "{{imSocket}}",
imServer: "{{imServer}}",
};
</script>
\ No newline at end of file
... ...
/* global gAssetURI */
module.exports = function(path) {
return gAssetURI + path;
return window.STATIC_RESOURCE_PATH + path;
};
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@
var config = {
servers: [gDomains.imSocket],
defaultUserHead: '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif',
rebotUserHead: `${gAssetURI}/img/service/chat/im-robot.png`,
rebotUserHead: `${window.STATIC_RESOURCE_PATH}/img/service/chat/im-robot.png`,
recType: {
ENTER: 1, // 用户进入
LINK_SUCCESS: 2, // 连线人工客服回应
... ...
... ... @@ -9,9 +9,6 @@
const webpack = require('webpack');
const path = require('path');
const _ = require('lodash');
const config = require('../config/common');
const domains = config.domains;
const assetURI = config.assetUrl;
const shelljs = require('shelljs');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
... ... @@ -77,10 +74,6 @@ module.exports = {
$: 'yoho-jquery',
jQuery: 'yoho-jquery',
'window.jQuery': 'yoho-jquery'
}),
new webpack.DefinePlugin({
gDomains: JSON.stringify(domains),
gAssetURI: JSON.stringify(assetURI)
})
]
};
... ...