发布v2.5.9版本
This commit is contained in:
@@ -72,7 +72,7 @@ js.dw = {
|
||||
this.wait('原生app定位中...');
|
||||
return;
|
||||
}
|
||||
if(api.startLocation){
|
||||
if(window['api'] && api.startLocation){
|
||||
js.msg();
|
||||
if(api.systemType=='ios'){
|
||||
this.wait(''+api.systemType+'APP定位中...');
|
||||
@@ -103,7 +103,9 @@ js.dw = {
|
||||
dtes.latitude = ret.location.latitude;
|
||||
}
|
||||
js.dw.baiduLocationSuc(dtes,err);
|
||||
js.dw.bmLocation.stopLocation();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
9
js/js.js
9
js/js.js
@@ -1178,8 +1178,13 @@ js.appwin=function(na,dz){
|
||||
if(dz.substr(0,4)!='http')dz=NOWURL+dz;
|
||||
var jg = (dz.indexOf('?')==-1)?'?':'&';
|
||||
if(!na)na=' ';
|
||||
var bstr=jm.base64encode('{"name":"'+na+'","url":"openurl","dizhi":"'+dz+''+jg+'hideheader=true"}');
|
||||
var url = ''+ourl+'?bstr='+bstr+'';
|
||||
var dizhi = ''+dz+''+jg+'hideheader=true';
|
||||
if(apicloud && api.openWindcloud){
|
||||
api.openWindcloud({name:na,url:dz})
|
||||
return true;
|
||||
}
|
||||
var bstr =jm.base64encode('{"name":"'+na+'","url":"openurl","dizhi":"'+dizhi+'"}');
|
||||
var url = ''+ourl+'?bstr='+bstr+'';
|
||||
return this.apiopenWin(url);
|
||||
}
|
||||
js.sendevent=function(typ,na,d){
|
||||
|
||||
66
js/jswx.js
66
js/jswx.js
@@ -179,11 +179,13 @@ js.showmenu=function(d){
|
||||
if(!a)return;
|
||||
var h1=$(window).height(),h2=document.body.scrollHeight,s1;
|
||||
if(h2>h1)h1=h2;
|
||||
var col='';
|
||||
var s='<div onclick="$(this).remove();" align="center" id="menulistshow" style="background:rgba(0,0,0,0.6);height:'+h1+'px;width:100%;position:absolute;left:0px;top:0px;z-index:198" >';
|
||||
s+='<div id="menulistshow_s" style="width:'+d.width+'px;margin-top:'+d.top+';position:fixed;-webkit-overflow-scrolling:touch" class="menulist r-border-r r-border-l">';
|
||||
var col='',oix;
|
||||
var s='<div align="center" id="menulistshow" style="background:rgba(0,0,0,0.6);height:'+h1+'px;width:100%;position:absolute;left:0px;top:0px;z-index:198;" >';
|
||||
s+='<div id="menulistshow_s" style="width:'+d.width+'px;margin-top:'+d.top+';position:fixed;-webkit-overflow-scrolling:touch;" class="menulist">';
|
||||
for(var i=0;i<a.length;i++){
|
||||
s+='<div oi="'+i+'" style="text-align:'+d.align+';color:'+a[i].color+'" class="r-border-t">';
|
||||
oix = '0';
|
||||
if(i>0)oix='0.5';
|
||||
s+='<div oi="'+i+'" style="text-align:'+d.align+';color:'+a[i].color+';border-top:'+oix+'px solid #dddddd">';
|
||||
s1=d.renderer(a[i]);
|
||||
if(s1){s+=s1}else{s+=''+a[i].name+'';}
|
||||
s+='</div>';
|
||||
@@ -307,4 +309,60 @@ js.jssdkwxgzh = function(qxlist,afe){
|
||||
js.jssdkstate = 2;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//长按处理
|
||||
function touchclass(cans){
|
||||
var me = this;
|
||||
this.onlongclick = function(){}
|
||||
this.onclick = function(){}
|
||||
this.onlongmenu = function(){}
|
||||
this.initbool = false;
|
||||
this.islongbool = false;
|
||||
|
||||
for(var i in cans)this[i]=cans[i];
|
||||
this.touchstart=function(o1,evt){
|
||||
touchnowobj = this;
|
||||
this.islongbool = false;
|
||||
if(!this.initbool){
|
||||
o1.addEventListener('click', function(){
|
||||
me._onclick(this, event);
|
||||
}, false);
|
||||
}
|
||||
this.obj = o1;
|
||||
this.initbool = true;
|
||||
clearTimeout(this.touchtime);
|
||||
this.touchtime = setTimeout('touchnowobj=false',1000);
|
||||
return true;
|
||||
}
|
||||
this._onclick=function(o1, evt){
|
||||
if(!this.islongbool)this.onclick(o1, evt);
|
||||
}
|
||||
this.touchstring=function(){
|
||||
var rnd = 'a'+js.getrand();
|
||||
touchnowoba[rnd] = this;
|
||||
var str = ' ontouchstart="return touchnowoba.'+rnd+'.touchstart(this,event)"';
|
||||
return str;
|
||||
}
|
||||
this.reglongmenu=function(){
|
||||
touchnowobj = false;
|
||||
touchnowoba = {};
|
||||
document.addEventListener('touchstart', function(){
|
||||
clearTimeout(me.longtapv);
|
||||
me.longtapv = setTimeout(function(){me.longmenu();},300);
|
||||
}, false);
|
||||
document.addEventListener('touchmove', function(){
|
||||
clearTimeout(me.longtapv);
|
||||
}, false);
|
||||
document.addEventListener('touchend', function(){
|
||||
clearTimeout(me.longtapv);
|
||||
}, false);
|
||||
}
|
||||
this.longmenu = function(){
|
||||
setTimeout('touchnowobj=false',200);
|
||||
if(!touchnowobj)return;
|
||||
touchnowobj.islongbool = true;
|
||||
touchnowobj.onlongclick();
|
||||
this.onlongmenu();
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,8 @@ var reim={
|
||||
nwjs.serverdata=function(d){
|
||||
return reim.serverdata(d);
|
||||
}
|
||||
//var sw = js.getoption('setchatlistw');
|
||||
//if(sw)$('#centlist').css('width',''+sw+'px');
|
||||
|
||||
$(window).resize(this.resize);
|
||||
$(window).focus(function(){windowfocus=true;im.windowfocus()});
|
||||
@@ -625,7 +627,8 @@ var reim={
|
||||
if(isempt(did) || (lx && lx=='user'))return s;
|
||||
if(did=='1')s=' <span class="reimlabel">全员</span>';
|
||||
if(did=='-1')s=' <span class="reimlabel2">外部</span>';
|
||||
if(did=='-2')s=' <span class="reimlabel3">咨询</span>';
|
||||
//if(did=='-2')s=' <span class="reimlabel3">咨询</span>';
|
||||
if(did=='-2')s=' <span style="font-size:10px;color:#aaaaaa"><i class="icon-headphones"></i></span>';
|
||||
if(did>1)s=' <span class="reimlabel1">部门</span>';
|
||||
return s;
|
||||
},
|
||||
@@ -643,17 +646,22 @@ var reim={
|
||||
var cls = lex ? ' active' : '';
|
||||
var na = d.name;
|
||||
if(d.title)na = d.title;
|
||||
var tit = ''+na+'';
|
||||
if(d.type=='group'){
|
||||
var d2 = grouparr[d.receid];
|
||||
if(d2)d.deptid = d2.deptid;
|
||||
}
|
||||
if(!nas)nas='';
|
||||
if(!qz)qz='chat';
|
||||
if(d.subname){
|
||||
nas+='<span style="color:'+maincolor+';font-size:10px">@'+d.subname+'</span>';
|
||||
tit+='@'+d.subname+'';
|
||||
}
|
||||
var s1 = this.grouptype(d.deptid,d.type);
|
||||
s = '<div class="lists'+cls+'" rtype="hist" oncontextmenu="reim.historyright(this,event,\''+num+'\')" tsaid="'+d.receid+'" tsaype="'+d.type+'" temp="hist" id="history_'+num+'" onclick="reim.openchat(\''+ty+'\',\''+d.receid+'\',\''+d.name+'\',\''+d.face+'\')">';
|
||||
s+='<table cellpadding="0" border="0" width="100%"><tr>';
|
||||
s+='<td style="padding-right:8px"><div style="height:30px;overflow:hidden"><img src="'+d.face+'"></div></td>';
|
||||
s+='<td align="left" width="100%"><div title="'+na+'" id="lname_'+num+'" class="name">'+na+''+nas+''+s1+'</div><div class="huicont">'+jm.base64decode(d.cont)+'</div></td>';
|
||||
s+='<td align="left" width="100%"><div title="'+tit+'" id="lname_'+num+'" class="name">'+na+''+nas+''+s1+'</div><div class="huicont">'+jm.base64decode(d.cont)+'</div></td>';
|
||||
s+='<td align="right" nowrap><span id="'+qz+'_stotal_'+num+'" class="badge red">'+st+'</span><br><span style="color:#aaaaaa;font-size:10px">'+ops+'</span></td>';
|
||||
s+='</tr></table>';
|
||||
s+='</div>';
|
||||
@@ -912,7 +920,7 @@ var reim={
|
||||
msg = nr;
|
||||
}
|
||||
if(lx == 'zixun'){
|
||||
title = '咨询消息';
|
||||
title = d.title;
|
||||
msg = nr;
|
||||
}
|
||||
var cans = {
|
||||
@@ -1204,6 +1212,10 @@ var reim={
|
||||
notifyobj.sound = src;
|
||||
notifyobj.playsound();
|
||||
},
|
||||
setchatlistw:function(kg){
|
||||
$('#centlist').css('width',''+kg+'px');
|
||||
js.setoption('setchatlistw', ''+kg+'');
|
||||
},
|
||||
cogshow:function(){
|
||||
var chs= (this.getsound())?'checked':'';
|
||||
var ch1= (this.getzhuom())?'checked':'';
|
||||
@@ -1220,6 +1232,8 @@ var reim={
|
||||
ch1='checked';chs='';
|
||||
}
|
||||
s+=' <div style="padding:10px 0px;border-top:1px #eeeeee solid">发送快捷键:<label><input onclick="reim.setsendkkj(0)" '+chs+' type="radio" name="sendkuijie">Enter</label> <label><input onclick="reim.setsendkkj(1)" '+ch1+' type="radio" name="sendkuijie">Ctrl+Enter</label></div>';
|
||||
|
||||
//s+=' <div style="padding:10px 0px;border-top:1px #eeeeee solid">列表列宽:<label><input onclick="reim.setchatlistw(220)" checked type="radio" name="chatlistw">正常</label> <label><input onclick="reim.setchatlistw(230)" type="radio" name="chatlistw">宽点</label> <label><input onclick="reim.setchatlistw(250)" type="radio" name="chatlistw">大宽</label></div>';
|
||||
|
||||
if(nwjsgui){
|
||||
var ips = nwjs.getipmac();
|
||||
@@ -1280,7 +1294,7 @@ function chatcreate(cans){
|
||||
this.soulx = '';
|
||||
this.soukey = '';
|
||||
this.objstr = 'reim.chatobj[\''+this.num+'\']';
|
||||
var nstr = js.getoption('receinfo_'+this.num+'');
|
||||
var nstr = js.getoption('receinfo_'+this.num+'');
|
||||
if(nstr)this.setreceinfor(js.decode(nstr));
|
||||
this.sendbtn.click(function(){
|
||||
me.sendcont();
|
||||
@@ -1331,6 +1345,7 @@ function chatcreate(cans){
|
||||
s+='<td height="50" width="100%">';
|
||||
s+=' <div temp="usname_'+this.num+'"><b style="font-size:16px;">'+this.name+'</b>';
|
||||
if((this.type=='group' || this.type=='gout') && this.usershu)s+='('+this.usershu+')';
|
||||
if(od.subname)s+='<span style="color:'+maincolor+';font-size:10px">@'+od.subname+'</span>';
|
||||
s+=reim.grouptype(od.deptid,this.type);
|
||||
if(od.ranking)s+=' <span style="font-size:12px;color:#aaaaaa">('+od.ranking+')</span>';
|
||||
if(this.type=='user')s+=reim.getonlinestr(this.gid);
|
||||
@@ -1346,6 +1361,7 @@ function chatcreate(cans){
|
||||
}
|
||||
if(this.type=='zixun'){
|
||||
s+='<td title="转给其他客服" id="sharebtn_'+this.num+'" class="chattitbtn" nowrap><div style="width:30px"><i class="icon-share-alt"></i></div></td>';
|
||||
s+='<td title="加更多客服" id="addkfbtn_'+this.num+'" class="chattitbtn" nowrap><div style="width:30px"><i class="icon-plus"></i></div></td>';
|
||||
s+='<td title="咨询人员信息" id="zixunbtn_'+this.num+'" class="chattitbtn" nowrap><div style="width:30px"><i class="icon-user"></i></div></td>';
|
||||
}
|
||||
s+='</tr></table>';
|
||||
@@ -1363,7 +1379,10 @@ function chatcreate(cans){
|
||||
reim.kefu.showuser(me.gid);
|
||||
});
|
||||
$('#sharebtn_'+this.num+'').click(function(){
|
||||
reim.kefu.shareuser(me.gid);
|
||||
reim.kefu.shareuser(me.gid,0);
|
||||
});
|
||||
$('#addkfbtn_'+this.num+'').click(function(){
|
||||
reim.kefu.shareuser(me.gid,1);
|
||||
});
|
||||
};
|
||||
this.getapiurl=function(m1,a1){
|
||||
@@ -1496,6 +1515,7 @@ function chatcreate(cans){
|
||||
s+='</div>';
|
||||
if(!isbf)this.addcont(s);
|
||||
}
|
||||
if(ret.showmsg)this.addmsg(ret.showmsg);
|
||||
if(seseid>0)this.showobj.scrollTop(seseid);
|
||||
};
|
||||
this.isscrollbottom=function(){
|
||||
@@ -1739,6 +1759,7 @@ function chatcreate(cans){
|
||||
reim.showhistorys({
|
||||
'cont' : s1+d.cont,
|
||||
'name' : this.receinfo.name,
|
||||
'subname' : this.receinfo.subname,
|
||||
'face' : this.receinfo.face,
|
||||
'optdt' : d.optdt,
|
||||
'type' : this.type,
|
||||
|
||||
Reference in New Issue
Block a user