← Back
Editing: index-legacy390.js
System.register(["./validator-legacy.js?v=1765440387","./utils-lib-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./column-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387"],function(e,t){"use strict";var l,a,n,o,s,r,i,u,c,x,d,p,f,v,m;return{setters:[function(e){l=e.b},null,function(e){a=e.c,n=e.r,o=e.g,s=e.p,r=e.a5,i=e.q,u=e.v,c=e.y,x=e.z,d=e.J,p=e.B,f=e.F,v=e.a$,m=e.K},null,null,null],execute:function(){var t={class:"relative bg-white rounded-[16px] overflow-hidden shadow-2xl transform transition-all duration-500 scale-100"},b={class:"py-[40px] px-[20px]"},g={class:"flex flex-col items-center mb-[24px]"},F={class:"flex items-end"},h={class:"text-[#FF8C00] text-[50px] font-bold -mb-[12px]"},y={class:"bg-[#F5F5F5] rounded-[8px] p-[12px] mb-[20px]"},w={class:"flex justify-center space-x-[8px] items-center"},C=["disabled"],S="bt-coupon-countdown",j="bt-coupon-open-time";e("default",a({__name:"index",emits:["close"],setup:function(e,a){var I=a.emit,M=n(600),k=n(99),D=n(!1),_=n(!1),z=n([]),B=n("200~400"),T=I,J=null,q=function(){var e={totalSeconds:M.value,milliseconds:k.value,timestamp:Date.now()};localStorage.setItem(S,JSON.stringify(e))},A=function(){localStorage.removeItem(S),localStorage.removeItem(j)},H=function(){var e=localStorage.getItem(j),t=Date.now();if(e)try{var l=parseInt(e,10),a=l+6e5-t;return a>0?(M.value=Math.floor(a/1e3),void(k.value=Math.floor(a%1e3/10))):(A(),void T("close"))}catch(n){A()}M.value=600,k.value=99,localStorage.setItem(j,Date.now().toString())},K=o(function(){return Math.floor(M.value/60).toString().padStart(2,"0")}),N=o(function(){return(M.value%60).toString().padStart(2,"0")}),O=o(function(){return k.value.toString().padStart(2,"0")}),$=o(function(){return M.value<=0&&k.value<=0}),E=function(){$.value||(G(),A(),T("close"),l("绑定宝塔账号,享受更多服务","/?model=bind-cupon"))},G=function(){_.value=!0,z.value=[];for(var e=function(e){setTimeout(function(){var t={id:Date.now()+e,x:100*Math.random(),y:100*Math.random(),size:8*Math.random()+4,color:L()};z.value.push(t),setTimeout(function(){var e=z.value.findIndex(function(e){return e.id===t.id});e>-1&&z.value.splice(e,1)},1e3)},50*e)},t=0;t<50;t++)e(t);setTimeout(function(){_.value=!1,z.value=[]},3e3)},L=function(){var e=["#FF8C00","#FFB84D","#FFA500","#FFCC80","#FF9500"];return e[Math.floor(Math.random()*e.length)]};return s(function(){H(),J=setInterval(function(){if(k.value-=1,k.value<0&&(k.value=99,M.value--),M.value<=0&&k.value<=0)return J&&(clearInterval(J),J=null),A(),void T("close");q()},10)}),r(function(){J&&clearInterval(J),q()}),function(e,l){return i(),u("div",null,[c("div",{ref:"couponModal",class:d(["w-full relative overflow-hidden rounded-[16px]",{"scale-95 opacity-0":D.value}])},[c("div",t,[c("div",b,[l[7]||(l[7]=c("div",{class:"flex items-center justify-center mb-[16px]"},[c("i",{class:"fa fa-ticket text-[#FF8C00] text-[24px] mr-[8px]"}),c("h2",{class:"text-[clamp(1.2rem,2.5vw,1.8rem)] font-bold text-[#333333] text-shadow"},"绑定账号领取限时优惠券")],-1)),c("div",g,[l[2]||(l[2]=c("p",{class:"text-gray-500 text-[12px] mb-[4px]"},"领取随机金额优惠券",-1)),c("div",F,[l[0]||(l[0]=c("span",{class:"text-[#FF8C00] text-[24px] font-bold mr-[4px]"},"¥",-1)),c("span",h,x(B.value),1),l[1]||(l[1]=c("span",{class:"text-[#FF8C00] text-[16px] font-bold ml-[4px] mb-[4px]"},"元",-1))]),l[3]||(l[3]=c("p",{class:"text-gray-500 text-[12px] mt-[8px]"},"满1399元可用",-1))]),c("div",y,[l[6]||(l[6]=c("p",{class:"text-center text-gray-600 text-[14px] mb-[8px]"},"优惠券将在以下时间后过期",-1)),c("div",w,[c("div",{class:d(["text-white rounded-[8px] w-[56px] h-[40px] flex items-center justify-center font-bold text-[16px]",M.value<10?"bg-red-500":"bg-[#FF8C00]"])},[c("span",null,x(K.value),1)],2),l[4]||(l[4]=c("span",{class:"text-[#FF8C00] font-bold"},":",-1)),c("div",{class:d(["text-white rounded-[8px] w-[56px] h-[40px] flex items-center justify-center font-bold text-[16px]",M.value<10?"bg-red-500":"bg-[#FF8C00]"])},[c("span",null,x(N.value),1)],2),l[5]||(l[5]=c("span",{class:"text-[#FF8C00] font-bold"},":",-1)),c("div",{class:d(["text-white rounded-[8px] w-[56px] h-[40px] flex items-center justify-center font-bold text-[16px]",M.value<10?"bg-red-500":"bg-[#FF8C00]"])},[c("span",null,x(O.value),1)],2)])]),l[8]||(l[8]=c("div",{class:"mb-5"},[c("h3",{class:"text-gray-700 font-semibold text-[14px] mb-[8px] flex items-center"},[c("i",{class:"fa fa-info-circle text-[#FF8C00] mr-2"}),p(" 使用规则 ")]),c("ul",{class:"text-gray-600 text-[12px] space-y-1 pl-[20px] list-disc"},[c("li",null,"用户绑定账号专属优惠"),c("li",null,"有效期10分钟")])],-1)),c("button",{disabled:$.value,class:d(["w-full py-[10px] rounded-[8px] font-bold text-[16px] shadow-lg transform transition-all duration-300 flex items-center justify-center",$.value?"bg-gray-400 text-gray-600 opacity-50 cursor-not-allowed":"bg-gradient-to-r from-[#FF8C00] to-[#FFB84D] text-white hover:shadow-xl hover:-translate-y-1"]),onClick:E},[c("i",{class:d($.value?"fa fa-clock-o mr-[8px]":"fa fa-gift mr-[8px]")},null,2),p(" "+x($.value?"已过期":"立即领取优惠券"),1)],10,C)])]),l[9]||(l[9]=c("div",{class:"absolute -top-[20px] -right-[20px] w-[64px] h-[64px] bg-[#FFB84D] rounded-full opacity-20 animate-pulse-slow"},null,-1)),l[10]||(l[10]=c("div",{class:"absolute -bottom-[24px] -left-[24px] w-[96px] h-[96px] bg-[#FF8C00] rounded-full opacity-10 animate-pulse-slow"},null,-1))],2),c("div",{ref:"fireworksContainer",class:d(["fixed inset-0 pointer-events-none",{hidden:!_.value}])},[(i(!0),u(f,null,v(z.value,function(e){return i(),u("div",{key:e.id,class:"absolute rounded-full",style:m({width:e.size+"px",height:e.size+"px",backgroundColor:e.color,left:e.x+"%",top:e.y+"%",animation:"firework 1s ease-out forwards"})},null,4)}),128))],2)])}}}))}}});
Save File
Cancel