123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913 |
-
-
-
- function versionStringCompare(preVersion, lastVersion){
- var sources = preVersion.split('.');
- var dests = lastVersion.split('.');
- var maxL = Math.max(sources.length, dests.length);
- var result = 0;
- for (var i = 0; i < maxL; i++) {
- var preValue = sources.length>i ? sources[i]:0;
- var preNum = isNaN(Number(preValue)) ? preValue.charCodeAt() : Number(preValue);
- var lastValue = dests.length>i ? dests[i]:0;
- var lastNum = isNaN(Number(lastValue)) ? lastValue.charCodeAt() : Number(lastValue);
- if (preNum < lastNum) {
- result = -1;
- break;
- } else if (preNum > lastNum) {
- result = 1;
- break;
- }
- }
- return result;
- }
-
-
-
-
- function getCookie_v378141(c_name)
- {
- if (document.cookie.length>0)
- {
- c_start = document.cookie.indexOf(c_name + "=")
- if (c_start!=-1)
- {
- c_start=c_start + c_name.length+1
- c_end=document.cookie.indexOf(";",c_start)
- if (c_end==-1) c_end=document.cookie.length
- return unescape(document.cookie.substring(c_start,c_end))
- }
- }
- return "";
- }
-
- if ("undefined" != typeof tag_userinfo_json) {
- tag_userinfo_1608459452(tag_userinfo_json);
- } else {
- if ("undefined" != typeof tag_user_login_json) {
- tag_user(tag_user_login_json);
- }
- if ("undefined" != typeof tag_user_reg_json) {
- tag_user(tag_user_reg_json);
- }
- if ("undefined" != typeof tag_user_logout_json) {
- tag_user(tag_user_logout_json);
- }
- if ("undefined" != typeof tag_user_cart_json) {
- tag_user(tag_user_cart_json);
- }
- }
- if ("undefined" != typeof tag_user_collect_json) {
- tag_collect_1608459452(tag_user_collect_json);
- }
- if ("undefined" != typeof tag_user_info_json) {
- tag_user_info(tag_user_info_json);
- }
-
-
- function tag_userinfo_1608459452(result)
- {
- var users_id = getCookie_v378141('users_id');
-
- var before_display = '';
- var htmlObj = document.getElementById(result.htmlid);
- if (!htmlObj) {
- return true;
- } else {
- before_display = htmlObj.style.display;
- }
-
- if (users_id > 0 && htmlObj) {
- var box = document.querySelectorAll('[id^=ey_htmlid_v]');
- if (box && box.length > 0) {
- for (var i = box.length - 1; i >= 0; i--) {
- box[i].style.display = 'none';
- }
- } else {
- htmlObj.style.display = 'none';
- }
- }
-
-
- var ey_login_vertify_display = '';
- if (document.getElementById('ey_login_vertify')) {
- ey_login_vertify_display = document.getElementById('ey_login_vertify').style.display;
- document.getElementById('ey_login_vertify').style.display = 'none';
- }
-
-
-
- var third_party_login_display = third_party_wxlogin_display = third_party_wblogin_display = third_party_qqlogin_display = '';
- if (document.getElementById('ey_third_party_login')) {
- third_party_login_display = document.getElementById('ey_third_party_login').style.display;
- document.getElementById('ey_third_party_login').style.display = 'none';
- if (document.getElementById('ey_third_party_wxlogin')) {
- third_party_wxlogin_display = document.getElementById('ey_third_party_wxlogin').style.display;
- document.getElementById('ey_third_party_wxlogin').style.display = 'none';
- }
- if (document.getElementById('ey_third_party_wblogin')) {
- third_party_wblogin_display = document.getElementById('ey_third_party_wblogin').style.display;
- document.getElementById('ey_third_party_wblogin').style.display = 'none';
- }
- if (document.getElementById('ey_third_party_qqlogin')) {
- third_party_qqlogin_display = document.getElementById('ey_third_party_qqlogin').style.display;
- document.getElementById('ey_third_party_qqlogin').style.display = 'none';
- }
- }
-
-
- if (window.jQuery) {
- $.ajax({
- type : 'post',
- url : result.root_dir+"/index.php?m=api&c=Diyajax&a=check_userinfo",
- data : {aid:ey_aid},
- dataType : 'json',
- success : function(res){
- loginafter_1610585975(res, htmlObj, before_display, ey_login_vertify_display, third_party_login_display, third_party_wxlogin_display, third_party_wblogin_display, third_party_qqlogin_display);
- }
- });
- } else {
-
- var ajax = new XMLHttpRequest();
-
- ajax.open("post", result.root_dir+"/index.php?m=api&c=Diyajax&a=check_userinfo", true);
-
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-
- ajax.send("aid="+ey_aid);
-
- ajax.onreadystatechange = function () {
-
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- loginafter_1610585975(res, htmlObj, before_display, ey_login_vertify_display, third_party_login_display, third_party_wxlogin_display, third_party_wblogin_display, third_party_qqlogin_display);
- }
- }
- }
- }
-
- function loginafter_1610585975(res, htmlObj, before_display, ey_login_vertify_display, third_party_login_display, third_party_wxlogin_display, third_party_wblogin_display, third_party_qqlogin_display)
- {
- var box = document.querySelectorAll('[id^=ey_htmlid_v]');
- if (box && box.length > 0) {
- for (var i = box.length - 1; i >= 0; i--) {
- box[i].style.display = before_display;
- }
- } else if (htmlObj) {
- htmlObj.style.display = before_display;
- }
- if (1 == res.code) {
- if (1 == res.data.ey_is_login) {
- if (box && box.length > 0) {
- for (var i = box.length - 1; i >= 0; i--) {
- box[i].innerHTML = res.data.html;
- }
- } else if (htmlObj) {
- htmlObj.innerHTML = res.data.html;
- }
- try {
- executeScript_1610585974(res.data.html);
- } catch (e) {}
- } else {
-
- if (1 == res.data.ey_login_vertify && document.getElementById('ey_login_vertify')) {
- document.getElementById('ey_login_vertify').style.display = ey_login_vertify_display;
- }
-
-
-
- if (1 == res.data.ey_third_party_login && document.getElementById('ey_third_party_login')) {
- document.getElementById('ey_third_party_login').style.display = third_party_login_display;
- if (1 == res.data.ey_third_party_wxlogin && document.getElementById('ey_third_party_wxlogin')) {
- document.getElementById('ey_third_party_wxlogin').style.display = third_party_wxlogin_display;
- }
- if (1 == res.data.ey_third_party_wblogin && document.getElementById('ey_third_party_wblogin')) {
- document.getElementById('ey_third_party_wblogin').style.display = third_party_wblogin_display;
- }
- if (1 == res.data.ey_third_party_qqlogin && document.getElementById('ey_third_party_qqlogin')) {
- document.getElementById('ey_third_party_qqlogin').style.display = third_party_qqlogin_display;
- }
- }
-
- }
- }
- }
-
-
- function executeScript_1610585974(html)
- {
- var reg = /<script[^>]*>([^\x00]+)$/i;
-
- var htmlBlock = html.split("<\/script>");
- for (var i in htmlBlock)
- {
- var blocks;
- if (blocks = htmlBlock[i].match(reg))
- {
-
- var code = blocks[1].replace(/<!--/, '');
- try {
- eval(code)
- } catch (e) {}
- }
- }
- }
-
-
- function tag_user(result)
- {
- var obj = document.getElementById(result.id);
- var txtObj = document.getElementById(result.txtid);
- var cartObj = document.getElementById(result.cartid);
- var before_display = document.getElementById(result.id) ? document.getElementById(result.id).style.display : '';
- var before_cart_display = document.getElementById(result.cartid) ? document.getElementById(result.cartid).style.display : '';
- var before_html = '';
- var before_txt_html = '';
- if (cartObj) {
- cartObj.style.display="none";
- }
- if (txtObj) {
- before_txt_html = txtObj.innerHTML;
- if ('login' == result.type) {
- txtObj.innerHTML = 'Loading…';
- }
- } else if (obj) {
- before_html = obj.innerHTML;
- if ('login' == result.type) {
- obj.innerHTML = 'Loading…';
- }
- }
- if (obj) {
- obj.style.display="none";
- } else {
- obj = txtObj;
- }
-
-
- var ey_login_vertify_display = '';
- if (document.getElementById('ey_login_vertify')) {
- ey_login_vertify_display = document.getElementById('ey_login_vertify').style.display;
- document.getElementById('ey_login_vertify').style.display = 'none';
- }
-
-
- if ('login' == result.type){
-
- var third_party_login_display = '';
- if (document.getElementById('ey_third_party_login')) {
- third_party_login_display = document.getElementById('ey_third_party_login').style.display;
- document.getElementById('ey_third_party_login').style.display = 'none';
- if (document.getElementById('ey_third_party_wxlogin')) {
- var third_party_wxlogin_display = '';
- third_party_wxlogin_display = document.getElementById('ey_third_party_wxlogin').style.display;
- document.getElementById('ey_third_party_wxlogin').style.display = 'none';
- }
- if (document.getElementById('ey_third_party_wblogin')) {
- var third_party_wblogin_display = '';
- third_party_wblogin_display = document.getElementById('ey_third_party_wblogin').style.display;
- document.getElementById('ey_third_party_wblogin').style.display = 'none';
- }
- if (document.getElementById('ey_third_party_qqlogin')) {
- var third_party_qqlogin_display = '';
- third_party_qqlogin_display = document.getElementById('ey_third_party_qqlogin').style.display;
- document.getElementById('ey_third_party_qqlogin').style.display = 'none';
- }
- }
-
- }
-
- var send_data = "type="+result.type+"&img="+result.img+"&afterhtml="+result.afterhtml;
- if (result.currentstyle != '') {
- send_data += "¤tstyle="+result.currentstyle;
- }
-
- var ajax = new XMLHttpRequest();
-
- ajax.open("post", result.root_dir+"/index.php?m=api&c=Ajax&a=check_user", true);
-
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-
- ajax.send(send_data);
-
- ajax.onreadystatechange = function () {
-
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- if (1 == res.code) {
- if (1 == res.data.ey_is_login) {
- if (obj) {
- if ('login' == result.type) {
- if (result.txt.length > 0) {
- res.data.html = result.txt;
- }
- if (txtObj) {
- txtObj.innerHTML = res.data.html;
- } else {
- if (result.afterhtml) {
- obj.insertAdjacentHTML('afterend', res.data.html);
- obj.remove();
- } else {
- obj.innerHTML = res.data.html;
- }
- }
- try {
- obj.setAttribute("href", result.url);
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- } else if ('logout' == result.type) {
- if (txtObj) {
- txtObj.innerHTML = before_txt_html;
- } else {
- obj.innerHTML = before_html;
- }
- try {
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- } else if ('reg' == result.type) {
- obj.style.display="none";
- } else if ('cart' == result.type) {
- try {
- if (cartObj) {
- if (0 < res.data.ey_cart_num_20191212) {
- cartObj.innerHTML = res.data.ey_cart_num_20191212;
- cartObj.style.display = '';
-
-
-
- } else {
- cartObj.innerHTML = '';
- }
- }
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- }
- }
- } else {
-
- if (obj) {
- if (txtObj) {
- txtObj.innerHTML = before_txt_html;
- } else {
- obj.innerHTML = before_html;
- }
- if ('logout' == result.type) {
- obj.style.display="none";
- } else if ('cart' == result.type) {
- try {
- if (cartObj) {
- if (0 < res.data.ey_cart_num_20191212) {
- cartObj.innerHTML = res.data.ey_cart_num_20191212;
- if (before_cart_display) {
- cartObj.style.display = ('none' == before_cart_display) ? '' : before_cart_display;
- }
- }
- }
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- } else {
- try {
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- }
- }
-
- if (1 == res.data.ey_login_vertify && document.getElementById('ey_login_vertify')) {
- document.getElementById('ey_login_vertify').style.display = ey_login_vertify_display;
- }
-
- if ('login' == result.type) {
-
- if (1 == res.data.ey_third_party_login && document.getElementById('ey_third_party_login')) {
- document.getElementById('ey_third_party_login').style.display = third_party_login_display;
- if (1 == res.data.ey_third_party_wxlogin && document.getElementById('ey_third_party_wxlogin')) {
- document.getElementById('ey_third_party_wxlogin').style.display = third_party_wxlogin_display;
- }
- if (1 == res.data.ey_third_party_wblogin && document.getElementById('ey_third_party_wblogin')) {
- document.getElementById('ey_third_party_wblogin').style.display = third_party_wblogin_display;
- }
- if (1 == res.data.ey_third_party_qqlogin && document.getElementById('ey_third_party_qqlogin')) {
- document.getElementById('ey_third_party_qqlogin').style.display = third_party_qqlogin_display;
- }
- }
-
- }
- }
- } else {
- if (obj) {
- obj.innerHTML = 'Error';
- try {
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- }
- }
- }
- }
- }
-
- function tag_collect_1608459452(result)
- {
- var collectObj = document.getElementById(result.collectid);
- var before_collect_display = document.getElementById(result.collectid) ? document.getElementById(result.collectid).style.display : '';
- if (collectObj) {
- collectObj.style.display="none";
- }
-
- var send_data = "type="+result.type+"&img="+result.img+"&afterhtml="+result.afterhtml;
- if (result.currentstyle != '') {
- send_data += "¤tstyle="+result.currentstyle;
- }
-
- var ajax = new XMLHttpRequest();
-
- ajax.open("post", result.root_dir+"/index.php?m=api&c=Ajax&a=check_user", true);
-
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-
- ajax.send(send_data);
-
- ajax.onreadystatechange = function () {
-
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- if (1 == res.code) {
- if (1 == res.data.ey_is_login) {
- if ('collect' == result.type) {
- try {
- if (collectObj) {
- if (0 < res.data.ey_collect_num_20191212) {
- collectObj.innerHTML = res.data.ey_collect_num_20191212;
- if (!before_collect_display) {
- collectObj.style.display = ('none' == before_collect_display) ? '' : before_collect_display;
- }
- } else {
- collectObj.innerHTML = '';
- }
- }
- }catch(err){}
- }
- } else {
-
- if ('collect' == result.type) {
- try {
- if (collectObj) {
- if (0 < res.data.ey_collect_num_20191212) {
- collectObj.innerHTML = res.data.ey_collect_num_20191212;
- if (!before_collect_display) {
- collectObj.style.display = ('none' == before_collect_display) ? '' : before_collect_display;
- }
- }
- }
- }catch(err){}
- }
- }
- }
- }
- }
- }
-
- function tag_user_info(result)
- {
- var obj = document.getElementById(result.t_uniqid);
- var before_display = '';
- if (obj) {
- before_display = obj.style.display;
- obj.style.display="none";
- }
-
-
- var ajax = new XMLHttpRequest();
-
- ajax.open("post", result.root_dir+"/index.php?m=api&c=Ajax&a=get_tag_user_info", true);
-
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-
- ajax.send("t_uniqid="+result.t_uniqid);
-
- ajax.onreadystatechange = function () {
-
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- if (1 == res.code) {
- if (1 == res.data.ey_is_login) {
- var dtypes = res.data.dtypes;
- var users = res.data.users;
- for (var key in users) {
- var subobj = document.getElementById(key);
- if (subobj) {
- if ('img' == dtypes[key]) {
- subobj.setAttribute("src", users[key]);
- } else if ('href' == dtypes[key]) {
- subobj.setAttribute("href", users[key]);
- } else {
- subobj.innerHTML = users[key];
- }
- }
- }
- if (obj) {
- try {
- if (!before_display) {
- obj.style.display=before_display;
- }
- }catch(err){}
- }
- } else {
- if (obj) {
- obj.style.display="none";
- }
- }
- }
- }
- }
- }
-
-
-
-
- function tag_arcclick(aids)
- {
- if (document.getElementsByClassName('eyou_arcclick')[0]) {
- var obj = document.getElementsByClassName('eyou_arcclick');
- var type = obj[0].getAttribute('data-type');
- var root_dir = obj[0].getAttribute('data-root_dir');
-
- if (window.jQuery) {
- $.ajax({
- type : 'GET',
- url : root_dir+"/index.php?m=api&c=Ajax&a=arcclick&type="+type+"&aids="+aids,
- data : {},
- dataType : 'json',
- success : function(res){
- for (var i = 0; i < obj.length; i++) {
- obj[i].innerHTML = res[obj[i].getAttribute('data-aid')]['click'];
- }
- }
- });
- } else {
- var ajax = new XMLHttpRequest();
- ajax.open("get", root_dir+"/index.php?m=api&c=Ajax&a=arcclick&type="+type+"&aids="+aids, true);
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.send();
- ajax.onreadystatechange = function () {
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- for (var i = 0; i < obj.length; i++) {
- obj[i].innerHTML = res[obj[i].getAttribute('data-aid')]['click'];
- }
- }
- }
- }
- }
- }
-
- if (document.getElementsByClassName('eyou_arcclick')[0]) {
- var arr_1653059625 = [];
- var obj_1653059625 = document.getElementsByClassName('eyou_arcclick');
- for (var i = 0; i < obj_1653059625.length; i++) {
- arr_1653059625.push(obj_1653059625[i].getAttribute('data-aid'));
- }
- var aids_1653059625 = arr_1653059625.toString();
- tag_arcclick(aids_1653059625);
- }
-
- function tag_getQueryString(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- var r = window.location.search.substr(1).match(reg);
- if (r != null) return unescape(r[2]);
- return null;
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function footprint_1606269933(aid, root_dir)
- {
- var users_id = getCookie_v378141('users_id');
- if (!users_id || aid == 0) {
- return false;
- }
-
-
- var ajax = new XMLHttpRequest();
-
- ajax.open("post", root_dir+'/index.php?m=api&c=Ajax&a=footprint_save', true);
-
- ajax.setRequestHeader("X-Requested-With","XMLHttpRequest");
-
- ajax.setRequestHeader("Content-type","application/x-www-form-urlencoded");
-
- ajax.send('aid='+aid+'&_ajax=1');
-
- ajax.onreadystatechange = function () {
-
- if (ajax.readyState==4 && ajax.status==200) {
- var json = ajax.responseText;
- var res = JSON.parse(json);
- if (1 == res.code) {
-
- }
- }
- }
- }
-
- footprint_1606269933(ey_aid,root_dir);
|