⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auction1_common.js

📁 设置POS机资料、班次资料、收银员资料等。   2)灵活、细分的权限管理
💻 JS
📖 第 1 页 / 共 2 页
字号:
}
function showBuyMsg(msg,linkMsg,linkUrl){
	var buyMsg="";
	buyMsg='<div id="buyMsg" class="b desc lineLeft"><div style="margin-top:0">'+msg+'</div><div style="margin-top:7px"><a href="'+linkUrl+'" class="linkLine">'+linkMsg+'</a></div></div>';
	return buyMsg;
}
function showBuyOver(obj)
{
    obj.src=obj.src.replace(".gif","Over.gif");
}
function showBuyOut(obj)
{
    obj.src=obj.src.replace("Over","");
}
function buy2()
{
  countPTag(10,1,49);
  setTimeout('doSubmit()',500);
}
function showChujia(auctionType)
{
	  if(auctionType==1)
	  {
	  	   $('saleTime').style.display="";   
	  	   if($('recordcountdiv'))
	  	   {  
	  	   	//顺电等品牌店铺不显示出售数量  
	  	   	if($("sundan").value==1)
	  	   		return ;
       		if(document.itemForm.sItemid.value != document.itemForm.sSnapid.value)
       		$('recordcountdiv').innerHTML="("+document.itemForm.SoldCount.value+"件)";       	
      		else if(document.itemForm.TotalSoldCount.value >0)
        	  $('recordcountdiv').innerHTML="("+document.itemForm.TotalSoldCount.value+"件)";    
        }
	  }
	else
		{
				if($('viewCount'))
			  $('viewCount').style.display="";
			  if($('recordName1'))
        $('recordName1').innerHTML="出价";
       if($('recordcountdiv') && document.itemForm.BuyCount.value >0)
          $('recordcountdiv').innerHTML="("+document.itemForm.BuyCount.value+"次)";
          if($('recordName2'))
        $('recordName2').innerHTML="出价";
		}
}
function showBuyType2(auctionType,Flag)
{
    var buyHtml="";
    showChujia(auctionType);
    if(auctionType==1)
    {
        switch(Flag)
        {
            case 1:
            buyHtml='<img src="http://pics.paipai.com/auction1/fixupSmall.gif" onclick="buy2()" style="cursor:hand" />';
			buyHtml+='<img src="http://pics.paipai.com/auction1/fixupCarSmall.gif"  onclick="addshopcarinframe(this);countPTag(10,1,93);" style="cursor:hand" hspace="20" alt="加入购物车,可与其他商品合并购买。"/>';
            break;
            case 2:
            buyHtml='';
            break;
            default:
            buyHtml="";
            break;
        }
    
    }
    else
    {
        switch(Flag)
        {
            case 1:
            buyHtml='<img src="http://pics.paipai.com/auction1/driftSmall.gif" onclick="buy2()" style="cursor:hand" />';
            break;
            case 2:
            buyHtml='';
            break;
            default:
            buyHtml="";
            break;
        }
      
    }
    $("html_tem_buyButton").innerHTML=buyHtml;
}
function showList(showName)
{
    var showAll=['detail','record','payment',"leaveMsg"];
    if(showName=="detail") 
    {
        for(var i=0;i<showAll.length;i++)
        {
            $(showAll[i]).style.display="";
					if(i!=0)
						$(showAll[i]+"Head").style.display="";
            $(showAll[i]+"Menu").className="";
        }
        $(showName+"Menu").className="wareMenuHere";
        if($("commendSecond").innerHTML.length < 10)   
        	$("commend").style.display="";
    } else  {
        for(i=0;i<showAll.length;i++)
        {
            $(showAll[i]).style.display="none";
			if(i!=0)
			$(showAll[i]+"Head").style.display="none";
            $(showAll[i]+"Menu").className="";
        }
        if($("commend"))
			$("commend").style.display="none";
        $(showName).style.display="block";
        $(showName+"Menu").className="wareMenuHere";
    }
}
function LoadPriceInfo( srcURL)
{
    loadscript(srcURL,"PriceJs");
}
function showRateStat()
{
    $("sellRate").innerHTML=g_sRateStatStr;
}

function showCommend()
{
    try
    {
        var timeShow="";
        timeShow=$("time1").innerHTML;
        if(timeShow.indexOf("成交结束")!=-1 || timeShow.indexOf("----")!=-1 || timeShow.indexOf("将于")!=-1)
        {
        		
            $("commendSecond").innerHTML=$("commend").innerHTML;
            $("commend").style.display="none";           
            $("commendSecond").style.display="";
        }
        if($("recommendListTr") && $("recommendListTr").innerHTML.length<10)
        {
            $("commend").style.display="none";
            $("commendSecond").style.display="none";
        }
    }
    catch(e)
    {
	
    }
}
function setRefererCreditTips(t)
{
    try
    {
        var obj=$("img_reff");
        var alt='本卖家在第三方电子商务网站\n的销售参考信用度';
        var tips="";
        if(t==-1)
        tips = "加载中...";
        else
        if(t==0)
        tips="截至2006年5月-11月"
        else
        {
            tt=new Date(t*1000);
            tips="截至"+tt.getYear()+"年"+(tt.getMonth()+1)+"月";
        }
        obj.alt=alt+"("+tips+")";
    }
    catch(e)
    {
    }
}
var theRefererCreditPassDate="";
function showRefererCreditPassDate(uin)
{
    if(uin.length < 5)
    return ;
    if(theRefererCreditPassDate=="")
    {
        try
        {
            setRefererCreditTips(-1);
            loadscript("http://service.paipai.com/cgi-bin/go?pageId=10&domainId=1&linkId=46&url=http://auction.paipai.com/cgi-bin/getUserRefererCreditExt?uin="+uin+"&p="+Math.random(),"jsRefererCredit");
            setTimeout('setRefererCreditTips(theRefererCreditPassDate)',"1000");
        }
        catch(e)
        {
            setRefererCreditTips("取不到同步日期");
        }
    }
}
var DisCountInfo=0;
function DisplayDiscount()
{
    var Price=document.itemForm.Price.value;
    var DiscountPrice=document.itemForm.DiscountPrice.value;
    var PriceToPay=Price*1 - DiscountPrice * 1;
    if(DiscountPrice>=1)
    {
        if($("DiscountDiv1"))
        {
            var str="<span class='font14 b fontGray'>红 包 价:</span>&nbsp;<span class=\"fontOrange b\" style='color:#FF4E00;font:18px Arial'>"+PriceToPay.toFixed(2)+"</span>&nbsp;&nbsp;元&nbsp;<span class=\"fontOrange\">(需使用"+DiscountPrice+"元红包)</span>";
            var objPrizeTxt=$("prizeTxt");
            $("DiscountDiv1").innerHTML=str;
            $("DiscountDiv1").style.display="";
        }
    }
}
function showExchangeList(str)
{
    $("html_tem_exchangeLog").innerHTML=str;
    g_isHaveRate=true;
}
function EditCommodity()
{
    var sTitle=document.itemForm.sTitle.value;
    if(document.itemForm.sSnapid.value!=document.itemForm.sItemid.value)
    {
        alert("您所查看的是历史快照,不能编辑,谢谢!");
        return ;
    }
    if((typeof(g_buttonFlag)=="number") && (g_buttonFlag==1)) /*在架上*/
    {
       window.location.href="http://my.paipai.com/cgi-bin/commodity_update_entry?iUpdateType=2&sItemid="+document.itemForm.sItemid.value+"&PTAG=10.1.95";
        return ;
    }
	else if((typeof(g_State)=="number") && (g_sellType==2) && (g_State=6)) /*已结束的拍卖商品需要生成新商品*/
	{
       window.location.href="http://my.paipai.com/cgi-bin/commodity_update_entry?iUpdateType=3&sItemid="+document.itemForm.sItemid.value+"&PTAG=10.1.95";
        return ;	
	}
	else if((typeof(g_buttonFlag)=="number") && (g_buttonFlag==0)) /*在仓库*/
    { 
			window.location.href="http://my.paipai.com/cgi-bin/commodity_update_entry?iUpdateType=1&sItemid="+document.itemForm.sItemid.value+"&PTAG=10.1.95";
      return ;  
    }
}

function closeShopcarHint(){
	var oHintObj = document.getElementById("shopcarhintid");
	if(oHintObj){
		oHintObj.style.display = "none";
	}
}

function addshopcarinframe(objButton){
	var iNum = parseInt(readCookie("spcart"));
	if(isNaN(iNum)){
		iNum = 0; 
	}
	
	if(iNum >= 10){
		if(!confirm("你的购物车已满!是否将本商品加入购物车?\n点击“确定”后,系统将帮您移出最早加入到购物车的商品。")){
			return;
		}
	}
	
	var objFrame = document.getElementById("addshopcarframe");
	if(objFrame){
		objFrame.src = "http://auction.paipai.com/cgi-bin/add_shopcar_js?cid="+document.getElementById("itemForm").sItemid.value+"&"+Math.random();
	}
	var oResDiv = document.getElementById("shopcarhintid");
	if(oResDiv){
		var xyLocation = getPosition(objButton);
		var iLeft = xyLocation[0] - 200;
		var iTop  = xyLocation[1] + 40;	
		//alert("x:"+iLeft+" y:"+iTop);
		var sStyleString = "left:"+iLeft+"px;top:"+iTop+"px;position:absolute;z-index:2;";
		oResDiv.setAttribute("style",sStyleString);
		oResDiv.style.cssText = sStyleString;	
		oResDiv.style.display = "";
	}	
}
function doSubmitAfterLogin()
{
	document.itemForm.submit();
}
function ShowBuyLoginDiv()//用于显示登录框                                                                                                           
{                                                                                                                                                 
    if (document.readyState!="complete")                                                                                                      
		    return ;                                                                                                                                  
		                                                                                                                                              
	var xyLocation = getPosition(document.getElementById("TenpayShow"));                                                                         
	var iLeft = xyLocation[0] -10;                                                                                                                
	var iTop = xyLocation[1] - 280;                                                                                                               
	var sBackStyle = " background:transparent;";                                                                                                  
	var sFrameStyle = 'background:transparent;width:380px;z-index:1;margin-left:'+iLeft+';margin-top:'+iTop+';';                                  
	var sFrameContent = '<iframe src="http://www.paipai.com/ppdlogin.html" width="100%" height="230" frameborder="0" id="pploginframe"></iframe>';
	showpaipailogin1(2,"doSubmitAfterLogin()",sBackStyle,sFrameStyle,sFrameContent);                                                            
	return 0;
}    

function ResizeImage(obj, newW, newH)
{
    if(obj == null) return;  
    var oImg = new Image();
    oImg.src = obj.src;
    var oldW=oImg.width;
    var oldH=oImg.height;  
    if(oldW>newW || oldH>newH)
    {
        w=oldW/newW;
        h=oldH/newH;
        if(h>w) w=h;
        oldW=oldW/w;
        oldH=oldH/w;
    }
    if(oldW > 0 && oldH > 0)
    obj.width=oldW;
    obj.height=oldH;
    if(obj.width>newW || obj.height>newH)
    {
        setTimeout("ResizeImage(null,"+newW+","+newH+")",40);
    }
}                

function SetSolcount()
{
	if(g_SoldCount*1>0 || g_BuyCount*1 >0)
	{
		document.itemForm.SoldCount.value=g_SoldCount;
		document.itemForm.TotalSoldCount.value=g_SoldCount;
		document.itemForm.TotalBuyCount.value=g_BuyCount;
		document.itemForm.BuyCount.value=g_BuyCount;
		if($("soldcount_span"))
					$("soldcount_span").innerHTML=g_SoldCount;	
	}
}                                                                                                                             

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -