22 lines
20 KiB
Python
22 lines
20 KiB
Python
import{c as E,d as oe,r as z,o as re,w as me,a as C,b as M,e,_ as se,u as ae,f as be,n,g as t,t as _,h as W,i as x,j as U,k as j,l as G,v as X,T as Q,m as we,F as Y,p as Z,q as R,X as ke,s as _e,x as Ce,y as L,z as Me,A as Se}from"./index-CBPNirpK.js";import{u as ze,S as Te,C as De,a as Ie,Q as Ae,E as Pe}from"./fileData-BCZGMzij.js";import{F as ee}from"./file-CNpWcMOu.js";import{H as Fe,T as $e}from"./trash-DAq3m0gp.js";/**
|
|
* @license lucide-vue-next v0.445.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Re=E("ClipboardCopyIcon",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/**
|
|
* @license lucide-vue-next v0.445.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Be=E("ClockIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
* @license lucide-vue-next v0.445.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const Ue=E("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
|
|
* @license lucide-vue-next v0.445.0 - ISC
|
|
*
|
|
* This source code is licensed under the ISC license.
|
|
* See the LICENSE file in the root directory of this source tree.
|
|
*/const je=E("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Le=oe({__name:"BorderProgressBar",props:{progress:{}},setup(w){const T=w,P=z(null),r=z(null);let d=null;const b=()=>{if(!d||!r.value||!P.value)return;const u=P.value.clientWidth,g=P.value.clientHeight;r.value.width=u,r.value.height=g;const i=4,s=8;d.lineWidth=i;const m=d.createLinearGradient(0,0,u,g);m.addColorStop(0,"#4f46e5"),m.addColorStop(.5,"#7c3aed"),m.addColorStop(1,"#db2777"),d.strokeStyle="rgba(229, 231, 235, 0.2)",h(d,i/2,i/2,u-i,g-i,s),d.stroke();const S=((u+g)*2-8*s+2*Math.PI*s)*T.progress/100;d.strokeStyle=m,d.lineCap="round",d.lineJoin="round",d.beginPath();let c=S;const v=i/2,D=u-i,F=g-i;if(c>0){const p=Math.min(D-2*s,c);d.moveTo(s+v,v),d.lineTo(p+s+v,v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(D-s+v,s+v,s,-Math.PI/2,p-Math.PI/2,!1),c-=p*s}if(c>0){const p=Math.min(F-2*s,c);d.lineTo(D+v,p+s+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(D-s+v,F-s+v,s,0,p,!1),c-=p*s}if(c>0){const p=Math.min(D-2*s,c);d.lineTo(D-p-s+v,F+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(s+v,F-s+v,s,Math.PI/2,Math.PI/2+p,!1),c-=p*s}if(c>0){const p=Math.min(F-2*s,c);d.lineTo(v,F-p-s+v),c-=p}if(c>0){const p=Math.min(Math.PI/2,c/s);d.arc(s+v,s+v,s,Math.PI,Math.PI+p,!1)}d.stroke()};function h(u,g,i,s,m,y){u.beginPath(),u.moveTo(g+y,i),u.lineTo(g+s-y,i),u.arcTo(g+s,i,g+s,i+y,y),u.lineTo(g+s,i+m-y),u.arcTo(g+s,i+m,g+s-y,i+m,y),u.lineTo(g+y,i+m),u.arcTo(g,i+m,g,i+m-y,y),u.lineTo(g,i+y),u.arcTo(g,i,g+y,i,y),u.closePath()}return re(()=>{r.value&&(d=r.value.getContext("2d"),b())}),me(()=>T.progress,b),(u,g)=>(C(),M("div",{class:"border-progress-container",ref_key:"container",ref:P},[e("canvas",{ref_key:"canvas",ref:r,class:"border-progress-canvas"},null,512)],512))}}),Ve=se(Le,[["__scopeId","data-v-2fbf5085"]]),ne=async(w,T={})=>{const{successMsg:P="复制成功",errorMsg:r="复制失败,请手动复制",showMsg:d=!0}=T,b=ae();try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(w),d&&b.showAlert(P,"success"),!0;const h=document.createElement("textarea");h.value=w,h.style.position="fixed",h.style.opacity="0",document.body.appendChild(h),h.select();const u=document.execCommand("copy");if(document.body.removeChild(h),u)return d&&b.showAlert(P,"success"),!0;throw new Error("execCommand copy failed")}catch(h){return console.error("复制失败:",h),d&&b.showAlert(r,"error"),!1}},te=async w=>{const T=`${window.location.origin}/#/?code=${w}`;return ne(T,{successMsg:"取件链接已复制到剪贴板",errorMsg:"复制失败,请手动复制取件链接"})},He=async w=>ne(w,{successMsg:"取件码已复制到剪贴板",errorMsg:"复制失败,请手动复制取件码"}),Ee=w=>w>=1024*1024*1024?Math.round(w/(1024*1024*1024))+"GB":w>=1024*1024?Math.round(w/(1024*1024))+"MB":Math.round(w/1024)+"KB",Ne={class:"min-h-screen flex items-center justify-center p-4 overflow-hidden transition-colors duration-300"},qe={class:"p-8"},We={class:"flex justify-center space-x-4 mb-6"},Ge={key:"file",class:"grid grid-cols-1 gap-8"},Qe={key:0,class:"absolute inset-0 w-full h-full"},Je={class:"block truncate"},Ke={key:"text",class:"grid grid-cols-1 gap-8"},Oe={key:0,class:"flex flex-col"},Xe={class:"flex flex-col space-y-4"},Ye=["value"],Ze={key:0,class:"flex items-center space-x-2"},et={class:"relative flex-grow"},tt=["placeholder"],ot={type:"submit",class:"w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-bold py-4 px-6 rounded-lg focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition-all duration-300 transform hover:scale-105 hover:shadow-lg relative overflow-hidden group"},rt={class:"relative z-10 flex items-center justify-center text-lg"},st={class:"mt-6 text-center"},at={class:"flex-grow overflow-y-auto p-6"},nt={class:"flex-shrink-0 mr-4"},lt={class:"flex-grow min-w-0 mr-4"},it={class:"flex-shrink-0 flex space-x-2"},ct=["onClick"],dt=["onClick"],ut=["onClick"],pt={key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"},gt={class:"space-y-4"},ht={class:"flex items-center"},ft={class:"flex items-center"},vt={class:"flex items-center"},xt={class:"flex items-center"},yt={class:"mt-6 flex justify-between items-center"},mt={class:"flex flex-col items-center w-1/2 pr-2"},bt={class:"text-2xl font-bold text-indigo-600"},wt={class:"flex flex-col items-center w-1/2 pl-2"},kt={class:"bg-white p-2 rounded-lg shadow-md"},_t=oe({__name:"SendFileView",setup(w){const T=JSON.parse(localStorage.getItem("config")||"{}"),P=Se(),r=Ce("isDarkMode"),d=ze(),b=z("file"),h=z(null),u=z(""),g=z(null),i=z("day"),s=z("1"),m=z(0),y=z(!1),S=z(null),c=ae(),v=be(()=>d.shareData),D=z(""),F=()=>{var l;(l=g.value)==null||l.click()},p=async l=>{const o=l.target;o.files&&o.files.length>0&&(h.value=o.files[0],D.value=await J(h.value),console.log(D.value))},le=async l=>{var o;(o=l.dataTransfer)!=null&&o.files&&l.dataTransfer.files.length>0&&(h.value=l.dataTransfer.files[0],D.value=await J(h.value))},J=async l=>new Promise(o=>{const a=new FileReader;let k=0;const I=Math.ceil(l.size/2097152);a.onload=async $=>{const A=new Uint8Array($.target.result),V=await crypto.subtle.digest("SHA-256",A),q=Array.from(new Uint8Array(V)).map(H=>H.toString(16).padStart(2,"0")).join("");k++,k<I?B():o(q)};const B=()=>{const $=k*2097152,A=$+2097152>=l.size?l.size:$+2097152;a.readAsArrayBuffer(l.slice($,A))};B()}),ie=(l=i.value)=>{switch(l){case"day":return"输入天数";case"hour":return"输入小时数";case"minute":return"输入分钟数";case"count":return"输入查看次数";case"forever":return"永久";default:return"输入值"}},N=(l=i.value)=>{switch(l){case"day":return"天";case"hour":return"小时";case"minute":return"分钟";case"count":return"次";case"forever":return"永久";default:return""}},ce=async l=>{var o,f;try{const k=Math.ceil(l.size/5242880),I=await L.post("/chunk/upload/init/",{file_name:l.name,file_size:l.size,chunk_size:5242880,file_hash:D.value});if(I.code!==200)throw new Error("初始化切片上传失败");if(I.detail.existed)return I;const B=I.detail.upload_id;for(let A=0;A<k;A++){const V=A*5242880,O=Math.min(V+5242880,l.size),q=l.slice(V,O),H=new FormData;if(H.append("chunk",new Blob([q],{type:l.type})),(await L.post(`/chunk/upload/chunk/${B}/${A}`,H,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:xe=>{const ye=Math.round((A*5242880+xe.loaded)*100/l.size);m.value=ye}})).code!==200)throw new Error(`切片 ${A} 上传失败`)}const $=await L.post(`/chunk/upload/complete/${B}`,{expire_value:s.value?parseInt(s.value):1,expire_style:i.value});if($.code!==200)throw new Error("完成上传失败");return $}catch(a){throw console.error("切片上传失败:",a),(f=(o=a.response)==null?void 0:o.data)!=null&&f.detail?c.showAlert(a.response.data.detail,"error"):c.showAlert("上传失败,请稍后重试","error"),a}},de=async l=>{const o=new FormData,f={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:k=>{const I=Math.round(k.loaded*100/k.total);m.value=I}};return o.append("file",l),o.append("expire_value",s.value),o.append("expire_style",i.value),await L.post("/share/file/",o,f)},ue=async()=>{var l,o;if(b.value==="file"&&!h.value){c.showAlert("请选择要上传的文件","error");return}if(b.value==="text"&&!u.value.trim()){c.showAlert("请输入要发送的文本","error");return}if(i.value!=="forever"&&!s.value){c.showAlert("请输入过期值","error");return}try{let f;if(b.value==="file")T.enableChunk?f=await ce(h.value):f=await de(h.value);else{const a=new FormData;a.append("text",u.value),a.append("expire_value",s.value),a.append("expire_style",i.value),f=await L.post("/share/text/",a)}if(f&&f.code===200){const a=f.detail.code,k=f.detail.name,I={id:Date.now(),filename:k,date:new Date().toISOString().split("T")[0],size:b.value==="text"?`${(u.value.length/1024).toFixed(2)} KB`:`${(h.value.size/(1024*1024)).toFixed(1)} MB`,expiration:i.value==="forever"?"永久":`${s.value}${N()}后过期`,retrieveCode:a};d.addShareData(I),c.showAlert(`文件发送成功!取件码:${a}`,"success"),h.value=null,u.value="",s.value="",m.value=0,y.value=!0,await te(a)}else throw new Error("服务器响应异常")}catch(f){console.error("发送失败:",f),(o=(l=f.response)==null?void 0:l.data)!=null&&o.detail?c.showAlert(f.response.data.detail,"error"):c.showAlert("发送失败,请稍后重试","error")}finally{m.value=0}},pe=()=>{P.push("/")},K=()=>{y.value=!y.value},ge=l=>{S.value=l},he=l=>{const o=d.shareData.findIndex(f=>f.id===l);o!==-1&&d.deleteShareData(o)},fe=window.location.origin+"/#/",ve=l=>`${fe}?code=${l.retrieveCode}`;return re(()=>{console.log("SendFileView mounted")}),(l,o)=>{const f=Me("router-link");return C(),M("div",Ne,[e("div",{class:n(["rounded-3xl shadow-2xl overflow-hidden border w-full max-w-md transition-colors duration-300",[t(r)?"bg-white bg-opacity-10 backdrop-filter backdrop-blur-xl border-gray-700":"bg-white border-gray-200"]])},[e("div",qe,[e("h2",{class:n(["text-3xl font-extrabold text-center mb-8 cursor-pointer transition-colors duration-300",[t(r)?"text-transparent bg-clip-text bg-gradient-to-r from-indigo-300 via-purple-300 to-pink-300":"text-indigo-600"]]),onClick:pe},_(t(T).name),3),e("form",{onSubmit:W(ue,["prevent"]),class:"space-y-8"},[e("div",We,[e("button",{type:"button",onClick:o[0]||(o[0]=a=>b.value="file"),class:n(["px-4 py-2 rounded-lg",b.value==="file"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文件 ",2),e("button",{type:"button",onClick:o[1]||(o[1]=a=>b.value="text"),class:n(["px-4 py-2 rounded-lg",b.value==="text"?"bg-indigo-600 text-white":"bg-gray-700 text-gray-300"])}," 发送文本 ",2)]),x(Q,{name:"fade",mode:"out-in"},{default:U(()=>[b.value==="file"?(C(),M("div",Ge,[e("div",{class:n(["rounded-xl p-8 flex flex-col items-center justify-center border-2 border-dashed transition-all duration-300 group cursor-pointer relative",[t(r)?"bg-gray-800 bg-opacity-50 border-gray-600 hover:border-indigo-500":"bg-gray-100 border-gray-300 hover:border-indigo-500"]]),onClick:F,onDragover:o[2]||(o[2]=W(()=>{},["prevent"])),onDrop:W(le,["prevent"])},[e("input",{id:"file-upload",type:"file",class:"hidden",onChange:p,ref_key:"fileInput",ref:g},null,544),m.value>0?(C(),M("div",Qe,[x(Ve,{progress:m.value},null,8,["progress"])])):j("",!0),x(t(Ue),{class:n(["w-16 h-16 transition-colors duration-300",t(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},null,8,["class"]),e("p",{class:n(["mt-4 text-sm transition-colors duration-300 w-full text-center",t(r)?"text-gray-400 group-hover:text-indigo-400":"text-gray-600 group-hover:text-indigo-600"])},[e("span",Je,_(h.value?h.value.name:"点击或拖放文件到此处上传"),1)],2),e("p",{class:n(["mt-2 text-xs",t(r)?"text-gray-500":"text-gray-400"])}," 支持各种常见格式,最大"+_(t(Ee)(t(T).uploadSize)),3)],34)])):(C(),M("div",Ke,[b.value==="text"?(C(),M("div",Oe,[G(e("textarea",{id:"text-content","onUpdate:modelValue":o[3]||(o[3]=a=>u.value=a),rows:"7",class:n(["flex-grow px-4 py-3 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 transition duration-300 resize-none",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"]),placeholder:"在此输入要发送的文本..."},null,2),[[X,u.value]])])):j("",!0)]))]),_:1}),e("div",Xe,[e("label",{class:n(["text-sm font-medium",t(r)?"text-gray-300":"text-gray-700"])}," 过期方式 ",2),G(e("select",{"onUpdate:modelValue":o[4]||(o[4]=a=>i.value=a),class:n(["px-4 py-2 rounded-xl focus:outline-none focus:ring-2 focus:ring-indigo-500",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},[(C(!0),M(Y,null,Z(t(T).expireStyle,a=>(C(),M("option",{value:a,key:a},_(N(a)),9,Ye))),128))],2),[[we,i.value]]),i.value!=="forever"?(C(),M("div",Ze,[e("div",et,[G(e("input",{"onUpdate:modelValue":o[5]||(o[5]=a=>s.value=a),type:"number",placeholder:ie(),class:n(["w-full px-4 py-2 pr-16 rounded-xl placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500",t(r)?"bg-gray-800 bg-opacity-50 text-white":"bg-white text-gray-900 border border-gray-300"])},null,10,tt),[[X,s.value]]),e("span",{class:n(["absolute right-3 top-1/2 transform -translate-y-1/2",t(r)?"text-gray-300":"text-gray-700"])},_(N()),3)])])):j("",!0)]),e("button",ot,[o[9]||(o[9]=e("span",{class:"absolute top-0 left-0 w-full h-full bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300"},null,-1)),e("span",rt,[x(t(je),{class:"w-6 h-6 mr-2"}),o[8]||(o[8]=e("span",null,"安全寄送",-1))])])],32),e("div",st,[x(f,{to:"/",class:"text-indigo-400 hover:text-indigo-300 transition duration-300"},{default:U(()=>o[10]||(o[10]=[R(" 需要取件?点击这里 ")])),_:1})])]),e("div",{class:n(["px-8 py-4 bg-opacity-50 flex justify-between items-center",[t(r)?"bg-gray-800":"bg-gray-100"]])},[e("span",{class:n(["text-sm flex items-center",[t(r)?"text-gray-300":"text-gray-800"]])},[x(t(Te),{class:"w-4 h-4 mr-1 text-green-400"}),o[11]||(o[11]=R(" 安全加密 "))],2),e("button",{onClick:K,class:n(["text-sm hover:text-indigo-300 transition duration-300 flex items-center",[t(r)?"text-indigo-400":"text-indigo-600"]])},[o[12]||(o[12]=R(" 发件记录 ")),x(t(De),{class:"w-4 h-4 ml-1"})],2)],2)],2),x(Q,{name:"drawer"},{default:U(()=>[y.value?(C(),M("div",{key:0,class:n(["fixed inset-y-0 right-0 w-full sm:w-120 bg-opacity-70 backdrop-filter backdrop-blur-xl shadow-2xl z-50 overflow-hidden flex flex-col",[t(r)?"bg-gray-900":"bg-white"]])},[e("div",{class:n(["flex justify-between items-center p-6 border-b",[t(r)?"border-gray-700":"border-gray-200"]])},[e("h3",{class:n(["text-2xl font-bold",[t(r)?"text-white":"text-gray-800"]])}," 发件记录 ",2),e("button",{onClick:K,class:n(["hover:text-white transition duration-300",[t(r)?"text-gray-400":"text-gray-800"]])},[x(t(ke),{class:"w-6 h-6"})],2)],2),e("div",at,[x(_e,{name:"list",tag:"div",class:"space-y-4"},{default:U(()=>[(C(!0),M(Y,null,Z(v.value,a=>(C(),M("div",{key:a.id,class:n(["bg-opacity-50 rounded-lg p-4 flex items-center shadow-md hover:shadow-lg transition duration-300 transform hover:scale-102",[t(r)?"bg-gray-800 hover:bg-gray-700":"bg-gray-100 hover:bg-white"]])},[e("div",nt,[x(t(ee),{class:n(["w-10 h-10",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])]),e("div",lt,[e("p",{class:n(["font-medium text-lg truncate",[t(r)?"text-white":"text-gray-800"]])},_(a.filename?a.filename:"Text"),3),e("p",{class:n(["text-sm truncate",[t(r)?"text-gray-400":"text-gray-600"]])},_(a.date)+" · "+_(a.size),3)]),e("div",it,[e("button",{onClick:k=>t(te)(a.retrieveCode),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-blue-400 text-blue-400":"hover:bg-blue-100 text-blue-600"]])},[x(t(Re),{class:"w-5 h-5"})],10,ct),e("button",{onClick:k=>ge(a),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-green-400 text-green-400":"hover:bg-green-100 text-green-600"]])},[x(t(Pe),{class:"w-5 h-5"})],10,dt),e("button",{onClick:k=>he(a.id),class:n(["p-2 rounded-full hover:bg-opacity-20 transition duration-300",[t(r)?"hover:bg-red-400 text-red-400":"hover:bg-red-100 text-red-600"]])},[x(t($e),{class:"w-5 h-5"})],10,ut)])],2))),128))]),_:1})])],2)):j("",!0)]),_:1}),x(Q,{name:"fade"},{default:U(()=>[S.value?(C(),M("div",pt,[e("div",{class:n(["p-8 rounded-2xl max-w-md w-full mx-4 shadow-2xl transform transition-all duration-300 ease-out backdrop-filter backdrop-blur-lg bg-opacity-70",[t(r)?"bg-gray-800":"bg-white"]])},[e("h3",{class:n(["text-2xl font-bold mb-6",[t(r)?"text-white":"text-gray-800"]])}," 文件详情 ",2),e("div",gt,[e("div",ht,[x(t(ee),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[13]||(o[13]=e("span",{class:"font-medium"},"文件名:",-1)),R(_(S.value.filename),1)],2)]),e("div",ft,[x(t(Ie),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[14]||(o[14]=e("span",{class:"font-medium"},"发送日期:",-1)),R(_(S.value.date),1)],2)]),e("div",vt,[x(t(Fe),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[15]||(o[15]=e("span",{class:"font-medium"},"文件大小:",-1)),R(_(S.value.size),1)],2)]),e("div",xt,[x(t(Be),{class:n(["w-6 h-6 mr-3",[t(r)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"]),e("p",{class:n([t(r)?"text-gray-300":"text-gray-800"])},[o[16]||(o[16]=e("span",{class:"font-medium"},"过期时间:",-1)),R(_(S.value.expiration),1)],2)])]),e("div",yt,[e("div",mt,[e("h4",{class:n(["text-lg font-semibold mb-3",[t(r)?"text-white":"text-gray-800"]])}," 取件码 ",2),e("div",{class:"bg-gray-100 p-3 rounded-lg shadow-md cursor-pointer hover:bg-gray-200 transition-colors duration-300 w-full text-center",onClick:o[6]||(o[6]=a=>t(He)(S.value.retrieveCode))},[e("p",bt,_(S.value.retrieveCode),1)]),e("p",{class:n(["mt-2 text-sm",[t(r)?"text-gray-400":"text-gray-600"]])}," 点击复制取件码 ",2)]),e("div",wt,[e("h4",{class:n(["text-lg font-semibold mb-3",[t(r)?"text-white":"text-gray-800"]])}," 二维码 ",2),e("div",kt,[x(Ae,{value:ve(S.value),size:128,level:"M"},null,8,["value"])]),e("p",{class:n(["mt-2 text-sm",[t(r)?"text-gray-400":"text-gray-600"]])}," 扫描二维码快速取件 ",2)])]),e("button",{onClick:o[7]||(o[7]=a=>S.value=null),class:"mt-8 w-full bg-gradient-to-r from-indigo-500 to-purple-600 text-white px-6 py-3 rounded-lg font-medium hover:from-indigo-600 hover:to-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-opacity-50 transition duration-300 transform hover:scale-105"}," 关闭 ")],2)])):j("",!0)]),_:1})])}}}),Dt=se(_t,[["__scopeId","data-v-1a2712ba"]]);export{Dt as default};
|