filesbox/web/dist/design/designstatic/newJS/home/home.js

12 lines
33 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
window.tsnfors=getPar("targetServerNameForOverride")||getPar("host")?"?targetServerNameForOverride="+(getPar("targetServerNameForOverride")||getPar("host")):"";function getPar(y,I){var S=I||document.location.href,v=S.indexOf(y+"=");if(v==-1)return"";var f=S.slice(y.length+v+1),p=f.indexOf("&");return p!=-1&&(f=f.slice(0,p)),f}if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent))document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/home/waphome/js/module.js?my_version="></script>');else{let y=function(o,d){var t=document.createElement("script");t.type="text/javascript",t.readyState?t.onreadystatechange=function(){(t.readyState=="loaded"||t.readyState=="complete")&&(t.onreadystatechange=null,d(window.wxFocus))}:t.onload=function(){d(window.wxFocus)},t.src=o,document.body.appendChild(t)},I=function(o){var d=document.createElement("div"),t=document.createTextNode(o);return d.appendChild(t),d.innerHTML},S=function(o,d){switch(o){case 0:return d?"\u661F\u671F\u5929":"sunday";case 1:return d?"\u661F\u671F\u4E00":"monday";case 2:return d?"\u661F\u671F\u4E8C":"Tuesday";case 3:return d?"\u661F\u671F\u4E09":"Wednesday";case 4:return d?"\u661F\u671F\u56DB":"Thursday";case 5:return d?"\u661F\u671F\u4E94":"Friday";case 6:return d?"\u661F\u671F\u516D":"saturday"}},v=function(o,d){if(new Date(parseInt(o))=="Invalid Date"&&new Date(parseInt(o)*1e3)=="Invalid Date")return"--";new Date(parseInt(d))=="Invalid Date"&&new Date(parseInt(d)*1e3)=="Invalid Date"&&(d=Date.parse(new Date));var t=d-o;if(t<0)return"\u521A\u521A";if(t<6e4)return parseInt(t/1e3,10)+" \u79D2\u524D";if(t<3600*1e3)return parseInt(t/1e3/60,10)+" \u5206\u949F\u524D";if(t<24*3600*1e3)return parseInt(t/1e3/3600,10)+" \u5C0F\u65F6\u524D";if(t<30*24*3600*1e3)return parseInt(t/1e3/3600/24,10)+" \u5929\u524D";var n=new Date(parseInt(o)),e=parseInt(n.getMonth()+1)<10?"0"+(n.getMonth()+1):n.getMonth()+1,a=parseInt(n.getDate())<10?"0"+n.getDate():n.getDate(),i=parseInt(n.getHours())<10?"0"+n.getHours():n.getHours(),r=parseInt(n.getMinutes())<10?"0"+n.getMinutes():n.getMinutes();return n.getFullYear()+"-"+e+"-"+a+"-"+i+"-"+r},f=function(o,d,t){var n=this,e=document.createElement("script");e.type="text/javascript",e.readyState?e.onreadystatechange=function(){(e.readyState=="loaded"||e.readyState=="complete")&&(e.onreadystatechange=null,d.bind(n)(t))}:e.onload=function(){d.bind(n)(t)},e.src=o,document.body.appendChild(e)},p=function(o){for(var d=window.location.search.substring(1),t=d.split("&"),n=0;n<t.length;n++){var e=t[n].split("=");if(e[0]==o)return e[1]}return!1},h=function(){var o=!!$("#bgVideoBox").html();if(o){var d=$("#recordNumber"),t=d.find("p");d.css({position:"fixed",bottom:0,height:"auto",width:"100%",backgroundColor:"#fff"}),t.css({marginBottom:0,lineHeight:"16px"})}};var loadWxFocusScript=y,escape=I,getWeek=S,getTimeZhCN=v,loadScriptmin=f,getQueryVariable=p,bgVideoBox=h;-[1]||(location.href="/pages/nocompatible.html"),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/home/js/ase.min.js"></script>'),document.write('<link rel="stylesheet" href="/design/designstatic/common/css/user.css?my_version=">'),document.write('<link rel="stylesheet" href="/design/designstatic/design/css/select2.min.css">'),document.write('<script type="text/javascript" charset="utf-8" src="/js/ddlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/js/wwlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/js/wxlogin.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/home/js/layer/layer.js"></script>'),document.write('<script type="text/javascript" charset="utf-8" src="/design/designstatic/common/js/jquery.qrcode.min.js"></script>');var scriptUrl="/design/designstatic/common/js/user.js?my_version=",wxFocusUrl="/design/designstatic/common/js/wxFocus.js";f(scriptUrl,function(){var o=window.user,d={loginCount:0,init:function(){if(p("errorCode")){var t=parseInt(p("errorCode")),n=""
<option value="zh-CN">CN \u7B80\u4F53\u4E2D\u6587</option>
<option value="zh-TW">HK \u7E41\u9AD4\u4E2D\u6587</option>
<option value="en-US">US English</option>
<option value="ja-JP">JP \u65E5\u672C\u8A9E</option>
<option value="fr-FR">FR Fran\xE7ais</option>
<option value="es-ES">ES Espa\xF1ol</option>
<option value="ru-RU">RU Ruso</option>
<option value="it-IT">IT Italia</option>
</select>`);var b=$(".languageBox .language").select2({minimumResultsForSearch:-1,width:"100%"});b.val([localStorage.getItem("umi_locale")||"zh-CN"]).trigger("change")},200)}),t.on("keydown",function(b){b.keyCode==13&&t.find(".submit").click()}),t.find(".submit").on("click",function(){var b=e.find("input").val(),C=a.find("input").val();if(e.find(".tip").remove(),a.find(".tip").remove(),!b)return e.append('<span class="tip" style="margin-left: 39px;display: block;color: red;font-size: 14px;">\u8BF7\u8F93\u5165\u8D26\u53F7</span>'),!1;if(!C)return a.append('<span class="tip" style="margin-left: 39px;display: block;color: red;font-size: 14px;">\u8BF7\u8F93\u5165\u5BC6\u7801</span>'),!1;o.login(b,C,function(w){if(w.success)n.getLoginUser(!0);else{var x=t.find(".password"),k=w.message;switch(parseInt(w.code)){case 200:k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165";break;case 400:k="\u8BE5\u7F51\u6821\u9700\u8981\u4F7F\u7528\u9501\u5C4F\u6D4F\u89C8\u5668\u767B\u5F55";break;case 403:k="\u8D26\u53F7\u7C7B\u578B\u4E0D\u6B63\u786E";break;case 503:k="\u5DF2\u88AB\u9650\u5236\u767B\u5F55";break;case 707:k="\u60A8\u5DF2\u88AB\u7981\u6B62\u767B\u5F55";break}if(w.success){var E=w.data;if(E){var P=E.errCode;P=="4012"?k="\u8D85\u8FC7\u9650\u5236\u6B21\u6570"+E.limitCount+"\u6B21\uFF0C\u8BF7"+E.denyTime/60+"\u5206\u949F\u540E\u91CD\u8BD5":k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}else k="\u5BC6\u7801\u6216\u8D26\u53F7\u4E0D\u6B63\u786E\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165"}x.append('<span class="tip" style="margin-left: 39px;color: red;font-size: 12px;clear:both; line-height: 15px;text-align: center;height: 30px;display: flex;justify-content: center;align-items: center;">'+k+"</span>")}})})},handleClickHref:function(){var t=this,n=$(".module[data-clickhref][data-type=group]");n.on("click",function(e){designUploadPoint($(this));for(var a=$(e.target),i=a.parents(),r=!0,c=0,s=i.length;c<s;c++){var l=i.eq(c);if(a.attr("href")||l.attr("href")||l.attr("data-handle")){r=!1;break}}if(r){var u=$(this),g=u.attr("data-clickhref");if(g.indexOf("/aroom/#")>-1||g.indexOf("/myroom/#")>-1||g.indexOf("/pay/#")>-1){var m=window.user,b=function(w){w=="STUDENT"?g.indexOf("/pay/#")>-1?window.location.href=g.indexOf("/pay/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=g.indexOf("/myroom/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/":window.location.href=g.indexOf("/aroom/#/")>-1?g:window.basePath?"/"+window.basePath+"#/":"/#/"},C=function(){m.loginLayer(function(w){w.success&&m.isLogin(function(x){x.success&&b(x.data.userTypeExact)})})};getCookie("token")||getCookie("stoken")?m.isLogin(function(w){w.success?b(w.data.userTypeExact):C()}):C()}else u.attr("data-clicktarget")=="_blank"?location.open=g:location.href=g}})},handleBtn:function(){for(var t=this,n=$(".module[data-handle=login]"),e=0,a=n.length;e<a;e++){var i=n.eq(e);t.bindLoginBtnEvent(i)}for(var r=$(".module[data-type=registerLogin] .loginEvent"),e=0,a=r.length;e<a;e++){var i=r.eq(e);t.bindLoginBtnEvent(i)}for(var c=$(".module[data-handle=register]"),e=0,a=c.length;e<a;e++){var i=c.eq(e);t.bindRegisterEvent(i)}for(var s=$(".module[data-type=registerLogin] .registerEvent"),e=0,a=s.length;e<a;e++){var i=s.eq(e);t.bindRegisterEvent(i)}for(var l=$(".module[data-handle=registerSchool]"),e=0,a=l.length;e<a;e++){var i=l.eq(e);t.bindRegisterSchoolEvent(i)}for(var u=$(".module[data-handle=QQlogin]"),e=0,a=u.length;e<a;e++){var i=u.eq(e);t.bindQQloginEvent(i)}for(var g=$(".module[data-handle=wechatLogin]"),e=0,a=g.length;e<a;e++){var i=g.eq(e);t.bindWechatLoginEvent(i)}for(var m=$(".module[data-handle=enwechatLogin]"),e=0,a=m.length;e<a;e++){var i=m.eq(e);t.bindenWechatLoginEvent(i)}for(var b=$(".module[data-handle=dingdingLogin]"),e=0,a=b.length;e<a;e++){var i=b.eq(e);t.binddingdingLoginEvent(i)}for(var C=$(".module[data-handle=appLogin]"),e=0,a=C.length;e<a;e++){var i=C.eq(e);t.bindappLoginEvent(i)}for(var w=$(".module[data-handle=dialogBtn]"),e=0,a=w.length;e<a;e++){var i
`);for(var f="",p=0;p<v.length;p++){var h=v.charCodeAt(p);h<128?f+=String.fromCharCode(h):h>127&&h<2048?(f+=String.fromCharCode(h>>6|192),f+=String.fromCharCode(h&63|128)):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128),f+=String.fromCharCode(h&63|128))}return f},S=function(v){for(var f="",p=0,h=0,o=0,d=0,t=0;p<v.length;)h=v.charCodeAt(p),h<128?(f+=String.fromCharCode(h),p++):h>191&&h<224?(d=v.charCodeAt(p+1),f+=String.fromCharCode((h&31)<<6|d&63),p+=2):(d=v.charCodeAt(p+1),t=v.charCodeAt(p+2),f+=String.fromCharCode((h&15)<<12|(d&63)<<6|t&63),p+=3);return f}}