/** * @author wqhui */ seajs.use(['common-utils','authcode-ui'], function(Utils, AuthCodeUI) { /* $("#loginForm_img_authcode").css({display:"none"}); $("#loginForm_authcode").css("color","#AAAAAA"); $("#loginForm_authcode").focus(function() { $("#loginForm_img_authcode").show(); }); */ AuthCodeUI.getAuthcode("loginForm_authcode", "loginForm_img_authcode", "authcode_change_link"); AuthCodeUI.checkShowAuthcode(); $('#openAccoBt').click(function(){ window.top.location = Utils.getContextPath() + '/account/openacco/quickinit'; }); function getFundIncomeRate(){ var fundcode=$('#fundcode').val(); var ajaxUrl=Utils.generUrl(Utils.getContextPath()+'/query/ajax/fundincomerate'+'?fundcode='+fundcode); var data={fundcode:fundcode}; Utils.ajax(ajaxUrl,data,function(resp){ if(resp.success){ var incomeratio =resp.incomeratio; var hf_incomeratio=resp.hf_incomeratio; var navdate=resp.navdate; $("#incomeratio").html(incomeratio); $("#hf_incomeratio").html(hf_incomeratio); $("#navdate").html(navdate); }else { var tip="无法获得相关的数据"; $("#incomeratio").html(tip); $("#hf_incomeratio").html(tip); $("#navdate").html(tip); } },true,function(){ },function(){ }); }; getFundIncomeRate(); }); $(document).ready(function(){ if($("#loginForm_lognumber").val()!=""){ $("#loginForm_lognumber_tips").css("display","none").siblings('div.inputOuter').css('marginTop','0'); } if($("#loginForm_authcode").val()!=""){ $("#loginForm_authcode_tips").css("display","none").siblings('div.inputOuter').css('marginTop','0'); } if($("#loginForm_password").val()!=""){ $("#loginForm_password_tips").css("display","none").siblings('div.inputOuter').css('marginTop','0'); } }); $('#loginForm_certificatetype').change(function(){ if($(this).val() == '00') { // 基金账号 $('input[name=logtype][value=1]').attr('checked','checked'); } else { $('input[name=logtype][value=2]').attr('checked','checked'); } }).change(); $(document).click(function(e){ if(e.target.id!=""||undefined!=e.target.id){ var checkValue=e.target.id; //如果当前点击事件不是软键盘区域的隐藏软键盘 if(checkValue.indexOf("loginForm_password") ==-1){ var jianpandisplay=$('#sofPwdPadloginForm_password').css("display"); if(jianpandisplay=="block"){ $('#loginForm_password').focus(); } $('#sofPwdPadloginForm_password').hide(); } } }); //首页图片轮播 $(function(){ var timed; var index=0; var len=$("#jiaodian span").length; $("#jiaodian span").click(function(){ index=$("#jiaodian span").index(this); showimg(); }).eq(0).mouseover(); $(".s_bann").hover(function(){ clearInterval(timed); },function(){ timed=setInterval(function(){ index++; if(index==len){ index=0; }; showimg(); },6000); }).trigger("mouseleave"); function showimg(){ $(".ba_i img").stop(false,true).fadeOut(1000); $(".ba_i img").eq(index).stop(true,false).fadeIn(1000); $("#jiaodian span").removeClass("on").eq(index).addClass("on"); }; });