xuetong={ //舌标签 show_tab:function(i){ $('.lm_tab_'+i+' .list_'+i+'').click(function(){ var _index = $(this).index(); $(this).addClass('hover').siblings().removeClass('hover'); $('.lm_tab_list_'+i+'').each(function(){ $(this).find('.list_'+i+'').hide(); $(this).find('.list_'+i+'').eq(_index).show(); if($(this).find('.list_'+i+'').hasClass('auto')){ $(this).find('.list_'+i+'').css('height','auto'); } }) }); }, inputFB:function() { $('input.input_text').focus(function () { var t = $(this); if (t.attr('type') == 'text' || t.attr('type') == 'password')t.css({'border': '1px solid #EB3F3F', 'color': '#333'}); if (t.val() == t.attr('placeholder')) t.val(''); }); $('input.input_text').blur(function () { var t = $(this); if (t.attr('type') == 'text' || t.attr('type') == 'password')t.css({'box-shadow': 'none', 'border': '1px solid #f6f6f8', 'color': '#333'}); }) }, inputBian:function() { $('input.input_bian').focus(function () { var t = $(this); if (t.attr('type') == 'text' || t.attr('type') == 'password')t.css({'border': '1px solid #17ffd7', 'color': '#fff'}); if (t.val() == t.attr('placeholder')) t.val(''); }); $('input.input_bian').blur(function () { var t = $(this); if (t.attr('type') == 'text' || t.attr('type') == 'password')t.css({'box-shadow': 'none', 'border': '1px solid #132024', 'color': '#fff'}); }) }, //问号内容弹出解释 show_wen:function(){ $(".icon_wen").click(function(e){ e.stopPropagation(); $(this).next().show(); var element = $(this).next().children("span"); if(element.html()){ if(element.html().length>20){ element.html(""); } } }) $('html,body').click(function(){ $('.show_wen').hide(); }) $('.show_wen').click(function(e){ e.stopPropagation(); }) }, //右侧导航 top_rnav:function(){ $('#js-menu').on('click', function () { $('.menu,#gb-main,.head').toggleClass('gbzp'); }); $('.backBtn').on('click', function () { $('.menu,#gb-main,.head').toggleClass('gbzp'); }); $('#gb-main').on('click', function() { if ($(this).hasClass('gbzp')) { $('.menu,#gb-main,.head').toggleClass('gbzp') } }); }, //密码隐藏显示 eyes_box:function(){ $(".eyes_box").click(function(){ if($(this).attr("data-show")==1){//明文 $(this).attr("data-show","2"); $(this).children("i").toggleClass("open"); $(this).parent("div").children(".mima_dd").hide(); $(this).parent("div").children(".mima_wz").show(); $(this).parent("div").children(".mima_wz").val($(this).parent("div").children(".mima_dd").val()); return; } if($(this).attr("data-show")==2){//密文 $(this).attr("data-show","1"); $(this).children("i").removeClass("open"); $(this).parent("div").children(".mima_dd").show(); $(this).parent("div").children(".mima_wz").hide(); $(this).parent("div").children(".mima_dd").val($(this).parent("div").children(".mima_wz").val()); return; } }); $('.mima_dd').change(function(){ $(this).parent("div").children(".mima_wz").val($(this).val()); }) $('.mima_wz').change(function(){ $(this).parent("div").children(".mima_dd").val($(this).val()); }) }, //复制文本 copy:function(){ var Url2=document.getElementById("wallet_url"); Url2.select(); document.execCommand("Copy"); alert("钱包地址已复制"); }, sendsms:function(){ var wait=60; function time() { var o=document.getElementById("send_sms_1") if (wait == -1) { $('#send_sms').show(); $('#send_sms_1').hide(); wait = 60; } else { o.innerHTML=wait + " s"; wait--; mobiletimer = setTimeout(function(){time()}, 1000) } } $('#send_sms').click(function(){ $(this).hide(); $('#send_sms_1').show(); $('#send_voice').hide(); $('#send_voice_1').show(); time(); time2(); }); var wait2=60; function time2() { var o=document.getElementById("send_voice_1") if (wait2 == -1) { $('#send_voice').show(); $('#send_voice_1').hide(); wait2 = 60; } else { o.innerHTML=wait2 + " s"; wait2--; mobiletimer2 = setTimeout(function() {time2()}, 1000) } } $('#send_voice').click(function(){ $(this).hide(); $('#send_voice_1').show(); $('#send_sms').hide(); $('#send_sms_1').show(); time(); time2(); }); }, foot_download:function(id){ if(id==1){ $('#foot_download').hide(); $('#foot_download').removeAttr("id"); }else{ var nowTop = document.documentElement.scrollTop || document.body.scrollTop; $(window).scroll(function(){ scrollTop = document.documentElement.scrollTop || document.body.scrollTop; if(scrollTop < nowTop){ $('#foot_download').slideDown(); }else{ $('#foot_download').hide(); } nowTop = scrollTop; }) } }, title_tab:function(){ $(".title").click(function(e){ e.stopPropagation(); $(".trade_con_all").show(); }) $('body,html').click(function(){ $(".trade_con_all").hide(); }) }, //判断手机类型 uaFanction:function(){ var UA = window.navigator.userAgent, IsAndroid = (/Android|HTC/i.test(UA) || !! (window.navigator['platform'] + '').match(/Linux/i)), IsIPad = !IsAndroid && /iPad/i.test(UA), IsIPhone = !IsAndroid && /iPod|iPhone/i.test(UA), IsIOS = IsIPad || IsIPhone; if(IsIOS){ window.location.href='itms-services://?action=download-manifest&url=https://www.btctrade.com/upload/app/trade.plist'; } if(IsAndroid){ window.location.href='http://www.btctrade.com/upload/app/trade.apk'; } }, //弹出层 showDialog:function(id, maskclick) { // 遮罩 $('#' + id).removeClass('modal-out').addClass('styled-pane'); var dialog = Dom(id); dialog.style.display = 'block'; if (Dom('mask') == null) { $('body').prepend('
'); if (!maskclick) $('#mask').bind('click', function () {hideDialog(id)}) } var mask = Dom('mask'); mask.style.display = 'inline-block'; mask.style.width = document.body.offsetWidth + 'px'; mask.style.height = document.body.scrollHeight + 'px'; //居中 var bodyW = document.documentElement.clientWidth; var bodyH = document.documentElement.clientHeight; var elW = dialog.offsetWidth; var elH = dialog.offsetHeight; dialog.style.left = (bodyW - elW) / 2 + 'px'; dialog.style.top = (bodyH - elH) / 2 + 'px'; dialog.style.position = 'fixed'; }, showDialog_foot:function(id, maskclick) { // 遮罩 $('#' + id).removeClass('modal-out').addClass('styled-pane'); var dialog = Dom(id); dialog.style.display = 'block'; if (Dom('mask') == null) { $('body').prepend(''); if (!maskclick) $('#mask').bind('click', function () {hideDialog(id)}) } var mask = Dom('mask'); mask.style.display = 'inline-block'; mask.style.width = document.body.offsetWidth + 'px'; mask.style.height = document.body.scrollHeight + 'px'; //居中 var bodyW = document.documentElement.clientWidth; var bodyH = document.documentElement.clientHeight; var elW = dialog.offsetWidth; var elH = dialog.offsetHeight; dialog.style.left = (bodyW - elW) / 2 + 'px'; dialog.style.bottom ='0px'; dialog.style.position = 'fixed'; }, //关闭弹出层 hideDialog:function(id, fn) { $('#' + id).removeClass('styled-pane').addClass('modal-out'); $('#mask').addClass('out'); setTimeout(function () {$('#' + id).hide(); $('#mask').remove();}, 300); if (typeof fn == 'function') fn(); }, //分享弹窗 show_share:function(){ var html=' '; $('body').prepend(html); xuetong.showDialog_foot('show_share'); }, show_deposit:function(){ var html='北京市
北京市
北京市
北京市
北京市
北京市
北京市
北京市
北京市
北京市
北京市
北京市