Authored by 李奇

客服im、图片上传url后台修改对应

... ... @@ -39,7 +39,7 @@ exports.page = (req, res, next) => {
pageStyle: 'service-chat',
width750: true,
localCss: true,
imServer: global.yoho.config.domains.imServer,
imCs: global.yoho.config.domains.imCs,
imSocket: global.yoho.config.domains.imSocket,
userData: {
uid: uid,
... ...
... ... @@ -60,7 +60,7 @@
{{> chat/leave-msg}}
{{> chat/order-list}}
<input type="hidden" id="js-im" name="im-server" value="{{imServer}}">
<input type="hidden" id="js-im" name="im-server" value="{{imCs}}">
{{#with userData}}
<input type="hidden" id="js-uid" value="{{uid}}">
<input type="hidden" id="js-eid" value="{{encrypteduid}}">
... ... @@ -70,6 +70,6 @@
<script>
var gDomains = {
imSocket: "{{imSocket}}",
imServer: "{{imServer}}",
imCs: "{{imCs}}",
};
</script>
\ No newline at end of file
... ...
... ... @@ -21,8 +21,7 @@ const domains = {
// singleApi: 'http://single.yoho.cn/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'https://im.yohobuy.com/api',
imServer: 'https://im.yohobuy.com/server'
imCs: 'http://im.yohobuy.com/api'
};
module.exports = {
... ... @@ -120,8 +119,7 @@ if (isProduction) {
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
imSocket: 'wss://imsocket.yohobuy.com:443',
imCs: 'https://imhttp.yohobuy.com/api',
imServer: 'https://imhttp.yohobuy.com/server'
imCs: 'https://imhttp.yohobuy.com/api'
},
memcache: {
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
... ... @@ -169,8 +167,7 @@ if (isProduction) {
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
imSocket: process.env.TEST_IM_SOCKET || 'ws://socket.yohobuy.com:10240',
imCs: process.env.TEST_IM_CS || 'http://im.yohobuy.com/api',
imServer: process.env.TEST_IM_SERVER || 'http://im.yohobuy.com/server'
imCs: process.env.TEST_IM_CS || 'http://im.yohobuy.com/api'
},
memcache: {
master: ['127.0.0.1:12111'],
... ...
... ... @@ -932,7 +932,7 @@ $upload.on('change', function() {
$elem.removeClass('send-fail').addClass('send-loading');
$.ajax({
type: 'POST',
url: `${gDomains.imServer}/fileManage/uploadFile`,
url: `${gDomains.imCs}/fileManage/uploadFile`,
data: formData,
processData: false, // 告诉jQuery不要去处理发送的数据
contentType: false
... ...