PageSourceSearch

https://aquadevita.ru/_nuxt/7cWLa0VN.js

js aquadevita.ru collected 2026-10-09 21:34:43 UTC 2,586 bytes, 1 lines download raw bytes

1import{_ as b}from"./DxbhVtJ0.js";import{_ as p}from"./DOaOhO2r.js";import{u as k}from"./DJ-1eQUi.js";import{u as Y,b as $}from"./C_VRLBnz.js";import{d as w,c as m,y as D,L as u,M as f,U as t,H as M,a5 as S,u as j,J as i,V as c,X as r,R as N,W as g}from"./ttsv_MrL.js";const B={class:"container px-2"},T={class:"flex justify-between items-center"},V={class:"text-right"},F=["onClick"],R={class:"flex justify-between"},q={class:"text-right"},A={key:1},E={class:"flex justify-between"},L={class:"text-right"},U={class:"flex justify-between"},G={class:"text-right"},H={class:"flex justify-between"},J={class:"text-right"},P=w({__name:"promo_codes",setup(W){const v=k();Y(),$();const d=m([]),_=m(""),y=n=>{navigator.clipboard.writeText(n).then(()=>{_.value="success"}).catch(e=>{_.value="error",console.error("Ошибка при копировании промокода: ",e)})},x=(n,e="DD.MM.YYYY")=>{if(!n)return"";const o=new Date(n);if(isNaN(o.getTime()))return"";const a=String(o.getDate()).padStart(2,"0"),l=String(o.getMonth()+1).padStart(2,"0"),s=String(o.getFullYear());return e==="DD.MM.YYYY"?`${a}.${l}.${s}`:`${a}.${l}.${s}`};return D(()=>{v("/api/user/promo_codes",{method:"GET",headers:{"Content-Type":"application/json"}}).then(n=>{n.status==="ok"&&(d.value=n.promo_codes)}).catch(n=>{console.error(n)})}),(n,e)=>{const o=b,a=p,l=p;return i(),u("div",B,[f(o,{path:[{title:"Кабинет",url:"/profile"}],"current-page":"Промокоды"}),e[6]||(e[6]=t("h1",{class:"my-3 font-bold text-2xl"}," Промокоды ",-1)),t("div",null,[t("ul",null,[(i(!0),u(M,null,S(j(d),(s,h)=>(i(),u("li",{class:"border-b border-gray-500 py-4 max-w-lg",key:h},[t("div",T,[e[1]||(e[1]=t("div",null,[t("strong",null,"Промокод:")],-1)),t("div",V,[c(r(s.code)+" (",1),t("span",{onClick:X=>y(s.code),class:"text-aqua-accent-blue cursor-pointer hover:underline"}," Копировать ",8,F),e[0]||(e[0]=c(") "))])]),t("div",R,[e[2]||(e[2]=t("div",null,[t("strong",null,"Скидка:")],-1)),t("div",q,[c(r(s.discount)+" ",1),s.discount_type=="sum"?(i(),N(a,{key:0})):g("",!0),s.discount_type=="percent"?(i(),u("span",A,"%")):g("",!0)])]),t("div",E,[e[3]||(e[3]=t("div",null,[t("strong",null,"Минимальная сумма:")],-1)),t("div",L,[c(r(s.min_price),1),f(l)])]),t("div",U,[e[4]||(e[4]=t("div",null,[t("strong",null,"Использован:")],-1)),t("div",G,r(s.usage_count)+" / "+r(s.usage_limit),1)]),t("div",H,[e[5]||(e[5]=t("div",null,[t("strong",null,"Действует до:")],-1)),t("div",J,r(x(s.expired_at)),1)])]))),128))])])])}}});export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.