|
|
@ -12,6 +12,7 @@
|
|
|
|
var sdk = new WSDK();
|
|
|
|
var sdk = new WSDK();
|
|
|
|
|
|
|
|
|
|
|
|
var queryParam = getQueryString();
|
|
|
|
var queryParam = getQueryString();
|
|
|
|
|
|
|
|
|
|
|
|
function login() {
|
|
|
|
function login() {
|
|
|
|
sdk.Base.login({
|
|
|
|
sdk.Base.login({
|
|
|
|
uid: queryParam['uid'],
|
|
|
|
uid: queryParam['uid'],
|
|
|
@ -21,7 +22,6 @@
|
|
|
|
success: function (data) {
|
|
|
|
success: function (data) {
|
|
|
|
initUnreadMsgAndContact();
|
|
|
|
initUnreadMsgAndContact();
|
|
|
|
console.log('login success', data);
|
|
|
|
console.log('login success', data);
|
|
|
|
sdk.Base.startListenAllMsg();
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: function (error) {
|
|
|
|
error: function (error) {
|
|
|
|
console.log('get login msg count fail', error);
|
|
|
|
console.log('get login msg count fail', error);
|
|
|
@ -116,6 +116,16 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return args;
|
|
|
|
return args;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateContractList(data) {
|
|
|
|
|
|
|
|
var msg =data.msgs[0];
|
|
|
|
|
|
|
|
var msg_uid = sdk.Base.getNick(msg.from);
|
|
|
|
|
|
|
|
if(unreadMap[msg_uid]){
|
|
|
|
|
|
|
|
unreadMap[msg_uid] = unreadMap[msg_uid]+1;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
unreadMap[msg_uid] = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
loadContactList();
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
window.onload = function () {
|
|
|
|
window.onload = function () {
|
|
|
|