Commit 10483aff by 施宇

213213

parent 855e12e6
......@@ -143,7 +143,7 @@
num: "100,000",
hq: "现货",
}
Util.setCookie('template', JSON.stringify(obj), 1)
Util.setCookie('template', JSON.stringify(obj), 1,cookieHostname)
window.location.href = '/chat'
})
</script>
......
......@@ -7,7 +7,6 @@ $(function () {
this.ieFun()
this.connection();
this.connListen();
this.bindFunction();
this.getUserInfo();
},
......@@ -46,14 +45,14 @@ $(function () {
}, )
$.ajax({
type: 'post',
url: 'http://a1.easemob.com/1113190618181018/icsales/token',
url: 'http://a1.easemob.com/'+self.orgName+'/'+self.appName+'/token',
data: data,
contentType: "application/json",
success: function (data) {
var token = data.access_token;
$.ajax({
type: 'get',
url: 'http://a1.easemob.com/1113190618181018/icsales/users/' + user,
url: 'http://a1.easemob.com/'+self.orgName+'/'+self.appName+'/users/' + user,
headers: {
Authorization: 'Bearer ' + token
},
......@@ -86,7 +85,7 @@ $(function () {
if (JSON.stringify(templateObj) !== '{}') {
this.addUser(templateObj.userId, false)
this.sendCmd(templateObj);
Util.delCookie('template');
Util.delCookie('template',cookieHostname);
}
......@@ -129,7 +128,7 @@ $(function () {
https: typeof WebIM.config.https === 'boolean' ? WebIM.config.https : location.protocol ===
'https:',
url: WebIM.config.xmppURL,
isAutoLogin: true,
isAutoLogin: false,
heartBeatWait: WebIM.config.heartBeatWait,
autoReconnectNumMax: WebIM.config.autoReconnectNumMax,
autoReconnectInterval: WebIM.config.autoReconnectInterval
......@@ -385,6 +384,7 @@ $(function () {
// listern,添加回调函数;
self.conn.listen({
onOpened: function (message) {
console.log('登入成功')
self.defaultUser();
self.singleChat();
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment