发布v2.6.8版本

This commit is contained in:
雨中磐石
2025-03-31 20:54:32 +08:00
parent 0701e2a8b4
commit d41bd27082
122 changed files with 9827 additions and 9132 deletions

View File

@@ -15,8 +15,9 @@ js.dw = {
//开始定位
init:function(isgzh){
var dws = navigator.userAgent;
if(dws.indexOf('REIMPLAT')>0)return;
var dws = navigator.userAgent;
this.ISAPP = dws.indexOf('XINHUOA')>0;
if(dws.indexOf('REIMPLAT')>0 || this.ISAPP)return;
if(openfrom=='nppandroid' || openfrom=='nppios')return;
if(isgzh==1){
js.jssdkwxgzh();
@@ -36,10 +37,9 @@ js.dw = {
start:function(){
if(this.dwbool)return;
this.successbo = false;
this.dwbool = true;
this.chaoshi();
this.ondwstart(js.jssdkstate);
if(js.jssdkstate != 1){
if(js.jssdkstate != 1 || this.ISAPP){
this.htmldingw(0);
}else{
this.wxdingw();
@@ -72,17 +72,19 @@ js.dw = {
var msg;
if(appobj1('startLocation','appbacklocation')){
this.wait('原生app定位中...');
this.dwbool = true;
return;
}
if(window['api'] && api.startLocation){
js.msg();
this.dwbool = true;
if(api.systemType=='ios'){
this.wait(''+api.systemType+'APP定位中...');
api.startLocation({},function(ret,err){
js.dw.appLocationSuc(ret,err);
});
return;
}else if(lx==0){
}else if(lx==0){ //这个是旧版的app里弃用了
this.wait(''+api.systemType+'百度地图定位中...');
if(!this.baiduLocation)this.baiduLocation = api.require('baiduLocation');
if(this.baiduLocation){
@@ -113,7 +115,7 @@ js.dw = {
return;
}
}
if(this.ISAPP)return;
if(!navigator.geolocation){
msg = '不支持浏览器定位';
js.msg('msg',msg);
@@ -137,11 +139,11 @@ js.dw = {
if(ret.success && ret.data){
js.dw.showPosition({coords:ret.data});
}else{
js.dw.showErrors('跳转定位错误:'+ret.msg);
js.dw.showcuowu('跳转定位错误:'+ret.msg);
}
},
error:function(){
js.dw.showErrors('跳转定位错误');
js.dw.showcuowu('跳转定位错误');
}
});
return;
@@ -201,7 +203,17 @@ js.dw = {
var lat = parseFloat(res.latitude); // 纬度浮点数范围为90 ~ -90
var lng = parseFloat(res.longitude); // 经度浮点数范围为180 ~ -180。
var jid = parseFloat(res.accuracy); // 位置精度
this.geocoder(lat,lng, jid);
var address = res.address;
if(address){
js.msg('none');
res.addressinfo = address+'(精确'+js.float(jid,1)+'米)';
res.latitude = lat;
res.longitude = lng;
res.accuracy = jid;
this.ondwcall(res);
}else{
this.geocoder(lat,lng, jid);
}
},
showError:function (error){
@@ -222,29 +234,29 @@ js.dw = {
msg="未知错误。"
break;
}
if(NOWURL.substr(0,5)!='https'){
msg+='必须使用https访问';
js.confirm('点确定继续去定位', function(jg){
if(jg=='yes'){
setTimeout('js.dw.gotodingw()',100);
}else{
js.dw.showErrors(msg);
}
});
}else{
js.dw.showErrors(msg);
}
},
showErrors:function(msg){
clearTimeout(js.dw.timeerrbo)
if(NOWURL.substr(0,5)!='https')msg+='必须使用https访问';
js.dw.timeerrbo = setTimeout(function(){
if(!js.dw.successbo){
js.msg('msg', msg);
js.dw.ondwerr(msg);
js.dw.showErrorss(msg);
}else{
js.msg();
}
},1000);
},
showcuowu:function(msg){
js.msg('msg', msg);
js.dw.ondwerr(msg);
},
showErrorss:function(msg){
js.confirm('点确定继续去定位('+msg+')', function(jg){
if(jg=='yes'){
setTimeout('js.dw.gotodingw()',100);
}else{
js.dw.showcuowu(msg);
}
});
},
gotodingw:function(){
js.alert('跳转在定位中,可点确定读取定位内容。','', function(){
js.reload();
@@ -262,6 +274,7 @@ js.dw = {
},
showPosition:function(position){
js.dw.successbo = true;
js.tanclose('confirm');
clearTimeout(js.dw.timeerrbo);
js.msg();
var res = position.coords;

View File

@@ -1,5 +1,5 @@
var MODE = '',ACTION = '',DIR='',PROJECT='',HOST='',PARAMS='',QOM='xinhu_',apiurl='',token='',device='',CFROM='pc',ISDEMO=false,NOWURL='',nwjsgui=false,apicloud=false,isapp=false,homestyle=0,maincolor='#1389D3';
var windows = null,ismobile=0;
var windows = null,ismobile=0,clientbool = false;;
function initbody(){}
function bodyunload(){}
function globalbody(){}
@@ -21,6 +21,8 @@ $(document).ready(function(){
if(nwjsgui)window.focus=function(){nw.Window.get().focus()}
if(winobj!='')opener.js.openarr[winobj]=window;
}catch(e){}
var llq = navigator.userAgent;
if(llq.indexOf('REIMCLIENT')>0)clientbool = true;
globalbody();
initbody();
$('body').click(function(e){
@@ -37,7 +39,7 @@ $(document).ready(function(){
var msg = '文件:'+e.filename+'\n行'+e.lineno+'\n错误<font color=red>'+e.message+'</font>';
js.alert(msg,'js错误');
});
if(navigator.userAgent.indexOf('XINHUOA')<0){
if(llq.indexOf('XINHUOA')<0){
if(typeof(api)=='undefined')api={};
}
setTimeout(function(){
@@ -204,7 +206,14 @@ js.open=function(url,w,h,wina,can,wjcan){
for(var o1 in a1)s+=','+o1+'='+a1[o1]+'';
var ja=(url.indexOf('?')>=0)?'&':'?';
if(wina)url+=''+ja+'winobj='+wina+'';
if(typeof(nw)=='undefined'){
if(clientbool){
if(url.substr(0,4)!='http')url=NOWURL+url;
rockclient.rockFun("openWin",{
url:url,
width:w,
height:h
});
}else if(typeof(nw)=='undefined'){
var opar=window.open(url,'',s);
}else{
var ocsn=js.apply({'frame':true,width:w,height:h,x:l,y:t,icon:'images/logo.png'},wjcan);
@@ -775,7 +784,7 @@ js.alertclose=function(){
}
js.tanstyle = 0;
js.confirm = function(txt,fun, tcls, tis, lx,ostr,bstr){
if(!lx)lx=0;
if(!lx)lx=0;js.alertclose();
var h = '<div style="padding:20px;line-height:30px" align="center">',w=320;
if(lx==1)w= 350;
if(w>winWb())w=winWb()-10;
@@ -1234,4 +1243,21 @@ js.ling = function(w){
var sve = 'style="height:'+w+'px;width:'+w+'px"';
if(!w)sve='';
return '<i '+sve+' class="rock-loading"></i>';
}
js.chajian = function(type, cans){
if(!$[type]){
js.importjs('mode/plugin/jquery-'+type+'.js?'+js.getrand()+'', function(){$[type](cans);});
}else{
$[type](cans);
}
}
function showDebug(strv,col){
var obj = $('div[temp="divt"]'),hei=50;
for(var i=0;i<obj.length;i++)hei+=$(obj[i]).height()+11;
if(!col)col='red';
if(typeof(strv)!='string')strv = JSON.stringify(strv);
var str = '<div temp="divt" onclick="$(\'div[temp=divt]\').remove()" style="background:rgba(0,0,0,0.8);font-size:12px;position:fixed;right:0px;top:'+hei+'px;padding:5px;z-index:99;word-wrap:break-word;word-break:break-all;white-space:normal;color:'+col+'">['+js.now('now')+']'+strv+'</div>';
$('body').append(str);
}

View File

@@ -1,13 +1,14 @@
QOM='xinhuwx_'
js.wx={};
js.wx.alert=function(msg,fun,tit, cof1){
js.alertclose();
js.alert(msg,tit, fun);
}
js.wx.confirm=function(msg,fun,tit){
js.confirm(msg,fun,tit);
}
js.wx.prompt=function(tit,msg,fun,nr){
js.prompt(tit,msg,fun,nr);
js.prompt(tit,msg,function(jg,txt){if(jg=='yes')fun(txt)},nr);
}
js.apiurl = function(m,a,cans){
var url=''+apiurl+'api.php?m='+m+'&a='+a+'';

View File

@@ -10,6 +10,7 @@ var agentarr={},userarr={},grouparr={},cnum='',windowfocus=true,jietubool=false;
var reim={
chatobj:{},
maindata:{},
nowtabs:'home',
initci:0,
timeloads:0,
ruloadtime:5*60, //5分钟
@@ -31,7 +32,7 @@ var reim={
//if(sw)$('#centlist').css('width',''+sw+'px');
$(window).resize(this.resize);
$(window).focus(function(){windowfocus=true;im.windowfocus()});
$(window).focus(function(){windowfocus=true;im.windowfocus();reim.lastload();});
$(window).blur(function(){windowfocus=false});
//数秒
setInterval('reim.timeload()', 1000);
@@ -56,7 +57,7 @@ var reim={
inputfile:'allfileinput',
initpdbool:false,
updir:'reimchat',
urlparams:{noasyn:'yes'}, //不需要同步到文件平台上
urlparams:{noasyn:'no',shuiyin:'size'}, //不需要同步到文件平台上
onchange:function(d){
im.sendfileshow(d);
},
@@ -208,7 +209,7 @@ var reim={
getapiurl:function(m,a,lx){
if(lx=='gout')return this.outgroup.geturl(a);
if(lx=='zixun' || lx=='wait')m='rockkefu';
var dzs = 'api.php?m='+m+'&a='+a+'&cfrom=reim';
var dzs = 'api.php?m='+m+'&a='+a+'&cfrom=reim&adminid='+adminid+'&token='+token+'';
if(companynum)dzs+='&dwnum='+companynum+'';
return dzs;
},
@@ -235,6 +236,20 @@ var reim={
$('#mainreload').html(''+js.ling(12)+' 刷新中...');
this.initload(true);
},
lastload:function(){
if(!this.loadtime)this.loadtime = parseInt(js.now('time') * 0.001);
this.ajax(this.getapiurl('indexreim','loadhit'),{'time':this.loadtime}, function(ret){
var da = ret.data;
reim.lastloads(da);
});
},
lastloads:function(da){
this.loadtime = da.loadtime;
var i,ds=da.rows;
for(i=0;i<ds.length;i++){
this.showhistorys(ds[i], true);
}
},
//初始加载数据
initload:function(bo){
this.initbool = true;
@@ -248,6 +263,7 @@ var reim={
firstpid:0,
showdata:function(ret){
if(!ret.userjson)return;
this.loadtime = ret.loadtime;
this.lastloaddt = ret.loaddt;
this.maindata.darr = js.decode(ret.deptjson);
this.maindata.uarr = js.decode(ret.userjson);
@@ -339,7 +355,7 @@ var reim={
return;
}
this.searchright.setData(d);
this.searchright.showAt(off.left+1,off.top+25,$('#reim_headercenter').width()-2);
this.searchright.showAt(off.left+1,off.top+30);
},
websocketlink:function(a){
if(this.connectbool){
@@ -476,7 +492,10 @@ var reim={
this.otherlogins();
return;
}
if(d.optdt){
var time = parseInt(js.now('time', d.optdt) * 0.001);
this.loadtime = time;
}
if(lx=='user' || lx=='group'){
if(sendid!=adminid)this.receivechat(d);
}
@@ -640,7 +659,7 @@ var reim={
showhistorydata:{},
showhistorys:function(d,pad, lex, glx){
var s,ty,o=$('#historylist'),d1,st,nas=d.names,qz=d.qian;
var num = ''+d.type+'_'+d.receid+'';
var num = ''+d.type+'_'+d.receid+'';if(num==this.nowtabs)lex=true;
this.showhistorydata[num]=d;
$('#history_'+num+'').remove();
st = d.stotal;if(st=='0')st='';
@@ -1189,7 +1208,7 @@ var reim={
});
return;
}
if(nwjsgui){
if(nwjsgui || 1==1){
js.loading('退出中...');
js.ajax(this.getapiurl('login','loginexit'),{},function(ret){
js.setoption('autologin', '0');
@@ -1234,6 +1253,7 @@ var reim={
js.setoption('setchatlistw', ''+kg+'');
},
cogshow:function(){
//nw.Window.open('file:///F:/IIS/demo/webrtc_v5_latest/quick-demo-js/index.html');return;
var chs= (this.getsound())?'checked':'';
var ch1= (this.getzhuom())?'checked':'';
var num = 'userinfo_cogshow';