1import{E as Q}from"./Vj2h1hZf.js";import{E as J}from"./BUATNB_7.js";import{E as K,a as W,b as X}from"./EJLYFcPI.js";import{E as Y}from"./CrbTCvKp.js";import{v as Z}from"./bwYb85dY.js";import{E as c}from"./BXk9CvtX.js";import"./C2Tw9sIW.js";/* empty css */import"./tW89URGm.js";import"./DMN5JOZh.js";import"./3AmiCEcO.js";import"./DV-Vg9pN.js";import{s as ee,m as u,j as e,ar as s,ay as a,q as i,aP as n,l as T,aQ as te,k as E,af as x,aG as se,a9 as m,p as f,F as D,ah as F,ad as ae}from"./D5Ir9beM.js";import{u as le}from"./CVnEXzLJ.js";import{F as oe,a as k,s as re,b as pe,g as ie}from"./QldhR_nf.js";import{u as ne}from"./BExRZ9Wq.js";import{s as me}from"./x_rD_Ya3.js";import"./DtZEl1eO.js";import"./C8F4946K.js";import"./DenMQlSR.js";import"./DTxnZhXo.js";import"./Co4i3FA7.js";import"./D_qUNCOl.js";import"./CY5af7vB.js";import"./DuG7fNxA.js";import"./CzAKv72b.js";import"./B7xSyMLi.js";import"./Cnxz_Ksh.js";const de={class:"max-w-[1280px] mx-auto px-4 sm:px-6 lg:px-8 pt-6 sm:pt-8 md:pt-10 lg:pt-[100px]"},ce={class:"text-center mb-2 lg:mb-10"},ue={class:"text-[36px] md:text-[36px] lg:text-3xl font-semibold text-gray-800 lg:mb-3"},xe={class:"text-[24px] md:text-[24px] lg:text-xl text-gray-600 lg:px-4"},fe={class:"flex sm:flex-row justify-center items-center gap-3 sm:gap-4 mb-2 sm:mb-8 max-w-2xl mx-auto px-2"},_e={key:0,class:"flex sm:flex-row justify-center items-center gap-3 sm:gap-4 mb-2 sm:mb-8 max-w-2xl mx-auto px-2"},be={class:"flex justify-center mb-6 sm:mb-8 md:mb-10 px-2"},he={key:1,class:"mt-6 sm:mt-8 md:mt-10 overflow-x-auto"},we={key:0,class:"p-[12px] md:p-5 md:space-y-5 text-sm sm:text-base"},ve={class:"flex flex-col sm:flex-row flex-wrap md:gap-4"},ge={class:"flex flex-wrap items-start w-full sm:w-[calc(50%-0.5rem)]"},ye={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1 mr-1"},ke={class:"text-[14px] md:text-base flex-1 break-all"},Se={class:"flex flex-wrap items-start w-full sm:w-[calc(50%-0.5rem)]"},Te={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1 mr-1"},Ce={class:"text-[14px] md:text-base flex-1"},Ie={class:"flex flex-col sm:flex-row flex-wrap md:gap-4"},Ve={class:"flex flex-wrap items-center w-full sm:w-[calc(50%-0.5rem)]"},Ee={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1 mr-1"},De={class:"text-[14px] md:text-base flex-1"},Fe={class:"flex flex-wrap items-center w-full sm:w-[calc(50%-0.5rem)]"},Ne={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1 mr-1"},Oe={class:"text-[14px] md:text-base flex-1"},Pe={class:"flex flex-wrap items-center md:items-start gap-1"},Be={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1"},Le={class:"text-[14px] md:text-base flex-1 break-all"},Re={class:"flex flex-wrap items-center md:items-start gap-1"},Me={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1"},je={class:"text-[14px] md:text-base flex-1 break-all"},Ae={class:"flex flex-wrap items-center md:items-start gap-1"},Ue={class:"text-[14px] md:text-base md:w-24 flex-shrink-0 md:mb-1"},qe={class:"flex-1 flex flex-wrap gap-1"},Ge={class:"flex flex-wrap items-center md:items-start"},$e={class:"text-[14px] md:text-base w-full md:w-24 flex-shrink-0 md:mb-1"},ze={class:"text-[14px] md:text-base flex-1 p-1 md:p-3 border border-gray-200 rounded min-h-[80px] whitespace-pre-wrap"},He={class:"flex flex-wrap items-center md:items-start"},Qe={class:"text-[14px] md:text-base w-full md:w-24 flex-shrink-0 md:mb-1"},Je={class:"text-[14px] md:text-base flex-1 p-1 md:p-3 border border-gray-200 rounded min-h-[80px] whitespace-pre-wrap"},Ke={key:0,class:"flex flex-wrap items-center md:items-start"},We={class:"text-[14px] md:text-base w-full md:w-24 flex-shrink-0 md:mb-1"},Xe={class:"text-[14px] md:text-base flex-1 break-all"},Ye=["href"],Vt=ee({__name:"index",setup(Ze){const{t}=ne(),L=se(),h=x(""),w=x(""),N=x(!1),v=x(0),O=x(!1),C=x(!1),p=x(null),S=ae([]),I=x(!1),{isMobile:R}=le(),M={new:"danger",in_progress:"primary",resolved:"success"},P=r=>r?new Date(r).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"",B=r=>({[k.PRODUCT]:t("Support.productRelated"),[k.AFTER_SALES]:t("Support.afterSales"),[k.LOGISTICS]:t("Support.logistics"),[k.INVOICING]:t("Support.invoiceIssue"),[k.OTHER]:t("Support.other")})[r]||r,j=async()=>{var r,l;if(!h.value){c.warning(t("Support.inputRequired"));return}if(!/^1[3-9]\d{9}$/.test(h.value)){c.warning(t("Support.invalidPhone"));return}try{await re({phone:h.value}),c.success(t("Support.codeSentSuccess")),N.value=!0,A()}catch(_){c.error(((l=(r=_.response)==null?void 0:r._data)==null?void 0:l.message)||"åééªè¯ç 失败ï¼è¯·ç¨åéè¯")}},A=()=>{v.value=60;const r=me(()=>{v.value--,v.value<=0&&clearInterval(r)},1e3)},U=async()=>{var r,l,_;if(!w.value){c.warning(t("Support.inputOTPRequired"));return}if(w.value.length!==6){c.warning(t("Support.invalidOTP"));return}I.value=!0;try{const d=await pe({phone:h.value,code:w.value});S.splice(0,S.length),S.push(...d.items||[]),O.value=!0,((r=d.items)==null?void 0:r.length)===0&&c.info("æªæ¾å°ç¸å
³åé¦è®°å½")}catch(d){c.error(((_=(l=d.response)==null?void 0:l._data)==null?void 0:_.message)||"æ¥è¯¢å¤±è´¥ï¼è¯·ç¨åéè¯")}finally{I.value=!1}},q=async r=>{try{const l=await ie(r.id);p.value=l,C.value=!0}catch(l){c.error(l.message||"è·å详æ
失败ï¼è¯·ç¨åéè¯")}},G=()=>{L.push("/Support/submit")};return(r,l)=>{const _=Q,d=J,g=W,V=X,$=K,z=Y,H=Z;return m(),u("div",de,[e("div",ce,[e("h1",ue,s(a(t)("Support.title")),1),e("p",xe,s(a(t)("Support.subtitle")),1)]),e("div",fe,[i(_,{modelValue:h.value,"onUpdate:modelValue":l[0]||(l[0]=o=>h.value=o),placeholder:a(t)("Support.inputPlaceholder"),class:"w-full sm:w-80 md:w-96 text-sm",maxlength:"11"},null,8,["modelValue","placeholder"]),i(d,{type:"primary",class:"md:w-24 h-10 sm:h-auto text-sm sm:text-base whitespace-nowrap",disabled:v.value>0,onClick:j},{default:n(()=>[f(s(v.value>0?`${v.value}s`:a(t)("Support.sendCodeBtn")),1)]),_:1},8,["disabled"])]),N.value?(m(),u("div",_e,[i(_,{modelValue:w.value,"onUpdate:modelValue":l[1]||(l[1]=o=>w.value=o),placeholder:a(t)("Support.inputOTP"),class:"w-full sm:w-48 text-sm",maxlength:"6",type:"number"},null,8,["modelValue","placeholder"]),i(d,{type:"primary",class:"md:w-24 h-10 sm:h-auto text-sm sm:text-base",disabled:w.value.length!==6,onClick:U},{default:n(()=>[f(s(a(t)("Support.submit")),1)]),_:1},8,["disabled"])])):T("",!0),e("div",be,[i(d,{type:"success",class:"w-full sm:w-48 h-10 sm:h-12 text-sm sm:text-base",onClick:G},{default:n(()=>[f(s(a(t)("Support.submitNewBtn")),1)]),_:1})]),O.value?(m(),u("div",he,[te((m(),E($,{data:S,style:{width:"100%"},size:"small"},{default:n(()=>[i(g,{prop:"ticketId",label:a(t)("Support.ticketId")},null,8,["label"]),i(g,{label:a(t)("Support.submitDate")},{default:n(o=>[f(s(P(o.row.createdAt)),1)]),_:1},8,["label"]),i(g,{label:a(t)("Support.feedbackType")},{default:n(o=>[(m(!0),u(D,null,F(o.row.feedbackTypes,(b,y)=>(m(),E(V,{key:y,class:"mr-1"},{default:n(()=>[f(s(B(b)),1)]),_:2},1024))),128))]),_:1},8,["label"]),i(g,{prop:"status",label:a(t)("Support.status")},{default:n(o=>[i(V,{type:M[o.row.status]},{default:n(()=>[f(s(a(oe)[o.row.status]),1)]),_:2},1032,["type"])]),_:1},8,["label"]),i(g,{label:a(t)("Support.action")},{default:n(o=>[i(d,{type:"text",onClick:b=>q(o.row)},{default:n(()=>[f(s(a(t)("Support.viewDetail")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[H,I.value]])])):T("",!0),i(z,{modelValue:C.value,"onUpdate:modelValue":l[2]||(l[2]=o=>C.value=o),title:a(t)("Support.detailTitle"),width:a(R)?"80%":"50%"},{default:n(()=>{var o;return[p.value?(m(),u("div",we,[e("div",ve,[e("div",ge,[e("span",ye,s(a(t)("Support.ticketId"))+":",1),e("span",ke,s(p.value.ticketId),1)]),e("div",Se,[e("span",Te,s(a(t)("Support.submitTime"))+":",1),e("span",Ce,s(P(p.value.createdAt)),1)])]),e("div",Ie,[e("div",Ve,[e("span",Ee,s(a(t)("Support.name"))+":",1),e("span",De,s(p.value.name),1)]),e("div",Fe,[e("span",Ne,s(a(t)("Support.phone"))+":",1),e("span",Oe,s(p.value.phone),1)])]),e("div",Pe,[e("span",Be,s(a(t)("Support.company"))+":",1),e("span",Le,s(p.value.company),1)]),e("div",Re,[e("span",Me,s(a(t)("Support.orderId"))+":",1),e("span",je,s(p.value.orderId),1)]),e("div",Ae,[e("span",Ue,s(a(t)("Support.feedbackType"))+":",1),e("div",qe,[(m(!0),u(D,null,F(p.value.feedbackTypes,(b,y)=>(m(),E(V,{key:y,class:"md:mb-1 mr-1 text-xs sm:text-sm"},{default:n(()=>[f(s(B(b)),1)]),_:2},1024))),128))])]),e("div",Ge,[e("span",$e,s(a(t)("Support.description"))+":",1),e("div",ze,s(p.value.description),1)]),e("div",He,[e("span",Qe,s(a(t)("Support.expectation"))+":",1),e("div",Je,s(p.value.expectations),1)]),(o=p.value.attachments)!=null&&o.length?(m(),u("div",Ke,[e("span",We,s(a(t)("Support.attachment"))+":",1),e("div",Xe,[(m(!0),u(D,null,F(p.value.attachments,(b,y)=>(m(),u("a",{key:y,href:b,target:"_blank",class:"text-blue-600 hover:underline"},s(b),9,Ye))),128))])])):T("",!0)])):T("",!0)]}),_:1},8,["modelValue","title","width"])])}}});
1export{Vt 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.