PageSourceSearch

https://www.tkbgo.com.tw/tkbgo/StoreConsultForm.DVtls7SW.js

js tkbgo.com.tw collected 2026-10-05 11:44:56 UTC 12,074 bytes, 1 lines download raw bytes

1import{_ as ce,A as pe,x as O,D as ue,aT as fe,a as be,d as me,q as y,L as xe}from"./entry.CGgvWIq9.js";import{a as u,i as _e,A as j,b as $,ab as ve,k as he,r as we,ae as Y,E as x,F as _,R as ye,a1 as d,G as e,X as ge,$ as v,V as C,Z as b,u as t,a3 as i,aL as Ie,Y as M,av as W,W as B,ag as m,ao as Se,ap as Ve}from"./swiper-vue.-M1go58E.js";import{_ as ke}from"./vue3-recaptcha2.es.Z_McP7gs.js";import{_ as Re}from"./FormButtonMemberInfo.BYj_MgJb.js";const r=h=>(Se("data-v-c751888e"),h=h(),Ve(),h),Le=["data-nosnippet"],Ce=r(()=>e("h4",{class:"text-center text-3xl font-bold text-secondary-700"},"填寫表單諮詢課程優惠",-1)),Ne=r(()=>e("p",{class:"mb-4 mt-2 text-center text-lg text-base-400"}," 請填寫表格內必要訊息,顧問專員將在收到訊息後儘速為您服務,謝謝。 ",-1)),Ae={class:"flex flex-wrap justify-center gap-x-2"},Te=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"真實姓名",-1)),Ee={class:"h-4 w-full text-left text-sm text-red-500"},Ue=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"電子信箱",-1)),De={class:"h-4 w-full text-left text-sm text-red-500"},qe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"行動電話",-1)),Fe={class:"h-4 w-full text-left text-sm text-red-500"},Oe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"Line ID",-1)),je={class:"h-4 w-full text-left text-sm text-red-500"},$e={class:"flex flex-wrap justify-center overflow-hidden rounded-sm border border-solid border-transparent"},Ye=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"聯絡時間",-1)),Me=r(()=>e("option",{value:"0"},"全天皆可",-1)),We=r(()=>e("option",{value:"1"},"早上",-1)),Be=r(()=>e("option",{value:"2"},"中午",-1)),Ge=r(()=>e("option",{value:"3"},"下午",-1)),Pe=r(()=>e("option",{value:"4"},"晚上",-1)),Xe=[Me,We,Be,Ge,Pe],ze=r(()=>e("div",{class:"h-4 w-full text-left text-sm text-red-500"},null,-1)),Qe=r(()=>e("label",{class:"relative flex-[0_1_auto] bg-base-50 px-[8px] py-[12px] text-center font-bold after:absolute after:inset-y-0 after:right-0 after:m-auto after:h-[60%] after:w-[2px] after:bg-base-200 after:content-['']"},"諮詢地區",-1)),Ze=r(()=>e("option",{value:"",disabled:""},"請選擇…",-1)),He=r(()=>e("option",{value:1},"線上諮詢",-1)),Je=r(()=>e("option",{value:"",disabled:""},"-實體門市-",-1)),Ke=["value"],et=r(()=>e("label",{class:"relative w-full bg-base-50 px-[8px] py-[12px] font-bold leading-[1.3] after:absolute after:inset-x-0 after:bottom-0 after:m-auto after:h-[1px] after:w-[99%] after:bg-base-200 after:content-['']"},"諮詢內容",-1)),tt={class:"h-4 w-full text-left text-sm text-red-500"},at={class:"mb-2 block"},ot={class:"inline-block text-sm text-red-500"},lt={class:"mb-2 block"},st={class:"inline-block text-sm text-red-500"},nt={class:"text-center"},rt=["src","alt","title"],dt="6LcUhbUUAAAAALfm5nNyPpU07kB64EZIYGZFXbR7",it={__name:"StoreConsultForm",props:{qrcodeText:{type:Array,default:null},qrcodeLink:{type:String,default:""},qrcodeSrc:{type:String,default:""},typeCode:{type:String,required:!0},typeId:{type:[Number,String],required:!0},selectedLocationId:{type:[Number,String],default:""},nosnippet:{type:Boolean,default:!0}},setup(h){var q;const c=h,{$storeConsultSchema:G,$fieldLimits:P}=pe(),g=u(!1);typeof c.qrcodeSrc=="string"&&c.qrcodeSrc!==""?g.value=!0:g.value=!1;const X=_e("windowResize",u(null)),V=u(null),I=u(0);j(()=>{I.value=V.value.offsetWidth}),$(X,()=>{I.value=V.value.offsetWidth});const{typeCode:z,selectedLocationId:k}=ve(c),Q=he(()=>Number(c.typeId)||0),Z=u([{typeCode:"ENGLISH",webId:["Y"]},{typeCode:"UNIVERSITY_ARTICLE",webId:["R"]},{typeCode:"UNIVERSITY_COMMENT",webId:["R"]},{typeCode:"UNIVERSITY_EXAM",webId:["R"]},{typeCode:"UNIVERSITY_INDEX",webId:["R"]},{typeCode:"UNIVERSITY_LECTURE",webId:["R"]},{typeCode:"UNIVERSITY_NEWS",webId:["R"]},{typeCode:"UNIVERSITY_VIDEO",webId:["R"]},{typeCode:"LOCATIONS",webId:["R","T"]}]),R=u((q=Z.value.find(l=>l.typeCode===c.typeCode))==null?void 0:q.webId),{execute:H,loading:L}=O(),w=u([]),N=u(!1),A=()=>k.value?k.value:(N.value?w.value.length>0:!!R.value)?"":1;async function J(){try{if(!R.value)return;
1const l=await H("/api/form/locations",{method:"post",body:{web:R.value}});w.value=l.data}catch(l){console.error("API錯誤:2.7.2 依網站單位取得諮詢地區:",l)}finally{N.value=!0,o.webLocationId=A()}}j(J);const{execute:K}=O(),{getPageSourceBody:ee}=ue(),T=u(null),S=u(),E=u(null),{getFormMarketingDataForApi:te,clearFormMarketingData:ae}=fe(),U=()=>{const{printId:l,adNo:a}=te();return{typeCode:z,typeId:Q,name:"",email:"",phone:"",lineId:"",webLocationId:A(),contactTime:"0",memo:"",isRead:!1,isSaleAgree:!1,...l?{printId:l}:{},...a?{adNo:a}:{}}},o=we(U()),oe=l=>{o.name=l.name,o.email=l.email,o.phone=l.phone},le=l=>{S.value=l},D=l=>{S.value=null,y({type:"warning",message:l==="expire"?"機器人驗證已逾時,請重新勾選":"機器人驗證失敗,請重新勾選"})},se=()=>{var l;(l=T.value)==null||l.reset(),S.value=null},ne=({errors:l})=>{y({type:"warning",message:Object.values(l).find(Boolean)||"請確認表單欄位是否正確填寫"})},re=()=>{delete o.printId,delete o.adNo,Object.assign(o,U()),E.value.resetForm({values:{...o}})},de=async()=>{var a,p;if(!S.value){y({type:"warning",message:"請勾選機器人驗證"});return}const l=JSON.stringify({...o,...ee()});try{await K("/api/form/add",{method:"post",body:l});const{trackformSubmit:f}=xe();f("GO填表"),y({type:"success",message:"您填寫的資料已送出,請等待客服人員與您聯繫,謝謝"}),ae(),re(),se()}catch(f){console.error("API錯誤:2.7.1 新增表單",f),y({type:"warning",message:((p=(a=f==null?void 0:f.data)==null?void 0:a.data)==null?void 0:p.message)||"表單發送失敗"})}};return $(k,l=>{o.webLocationId=l}),(l,a)=>{const p=Y("Field"),f=be,ie=Y("Form");return _(),x("div",{ref_key:"refElementWrapper",ref:V,"data-nosnippet":c.nosnippet?"":null},[ye(l.$slots,"default",{},()=>[Ce,Ne],!0),d(Re,{class:"mb-4",onUserData:oe}),e("div",Ae,[d(ie,{ref_key:"form",ref:E,"validation-schema":t(G),class:b([t(g)&&t(I)>=920?"flex-1":"","w-full"]),onSubmit:a[11]||(a[11]=n=>de()),onInvalidSubmit:ne},{default:v(({errors:n,isSubmitting:F})=>[e("div",{class:b([n.name?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Te,d(p,{modelValue:t(o).name,"onUpdate:modelValue":a[0]||(a[0]=s=>t(o).name=s),name:"name",label:"真實姓名",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none",placeholder:"請輸入真實姓名",type:"text"},null,8,["modelValue"])],2),e("div",Ee,i(n.name),1),e("div",{class:b([n.email?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Ue,d(p,{modelValue:t(o).email,"onUpdate:modelValue":a[1]||(a[1]=s=>t(o).email=s),name:"email",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none",type:"text",label:"電子信箱",placeholder:"範例:[email protected]"},null,8,["modelValue"])],2),e("div",De,i(n.email),1),e("div",{class:b([n.phone?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[qe,d(p,{modelValue:t(o).phone,"onUpdate:modelValue":a[2]||(a[2]=s=>t(o).phone=s),name:"phone",type:"text",label:"行動電話",placeholder:"範例:09xxxxxxxx",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none"},null,8,["modelValue"])],2),e("div",Fe,i(n.phone),1),e("div",{class:b([n.lineId?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[Oe,d(p,{modelValue:t(o).lineId,"onUpdate:modelValue":a[3]||(a[3]=s=>t(o).lineId=s),name:"lineId",type:"text",label:"Line ID",placeholder:"ID",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] focus:outline-none"},null,8,["modelValue"])],2),e("div",je,i(n.lineId),1),e("div",$e,[Ye,C(e("select",{"onUpdate:modelValue":a[4]||(a[4]=s=>t(o).contactTime=s),name:"contactTime",class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] outline-none"},Xe,512),[[Ie,t(o).contactTime]])]),ze,C(e("div",{class:b([n.webLocationId?"border-red-500":"border-transparent","flex flex-wrap justify-center overflow-hidden rounded-sm border border-solid"])},[Qe,d(p,{modelValue:t(o).webLocationId,"onUpdate:modelValue":a[5]||(a[5]=s=>t(o).webLocationId=s),label:"諮詢地區",as:"select",name:"webLocationId",disabled:t(L),class:"w-full flex-[1_1_0] overflow-hidden bg-base-50 px-[8px] py-[12px] outline-none"},{default:v(()=>[Ze,He,Je,(_(!0),x(M,null,W(t(w),s=>(_(),x("option",{key:s.id,value:s.id},i(s.location)+"-"+i(s.address),9,Ke))),128))]),_:1},8,["modelValue","disabled"])],2),[[B,t(L)||t(w).length>0]]),C(e("div",{class:"h-4 w-full text-left text-sm text-red-500"},i(n.webLocationId),513),[[B,t(L)||t(w).length>0]]),e("div",{class:b([n.memo?"border-red-500":"border-transparent","flex flex-wrap items-center justify-center overflow-hidden rounded-sm border border-solid"])},[et,d(p,{modelValue:t(o).memo,"onUpdate:modelValue":a[6]||(a[6]=s=>t(o).memo=s),as:"textarea",class:"h-[175px] max-h-[175px] w-full overflow-auto bg-base-50 p-2 outline-none",name:"memo",label:"諮詢內容",rows:"4",placeholder:`請簡述您想諮詢的內容(${t(P).question} 字以內)`},null,8,["modelValue","placeholder"])],2),e("div",tt,i(n.memo),1),e("label",at,[d(p,{modelValue:t(o).isRead,"onUpdate:modelValue":a[7]||(a[7]=s=>t(o).isRead=s),class:b(["mr-[3px]",{" unchecked ":n.isRead}]),name:"isRead",label:"此欄位",type:"checkbox","true-value":1,"false-value":0,value:!0},null,8,["modelValue","class"]),m("本人已瞭解及閱讀 "),d(f,{class:"border-b border-solid border-link text-link",to:"/service/toWebQA?faq_id=2",target:"_blank"},{default:v(()=>[m("會員權益說明 ")]),_:1}),m("跟 "),d(f,{class:"border-b border-solid border-link text-link",to:"/service/toWebQA?faq_id=160",target:"_blank"},{default:v(()=>[m("個資法相關規範")]),_:1}),m("。 "),e("span",ot,i(n.isRead),1)]),e("label",lt,[d(p,{modelValue:t(o).isSaleAgree,"onUpdate:modelValue":a[8]||(a[8]=s=>t(o).isSaleAgree=s),class:b(["mr-[3px]",{" unchecked ":n.isSaleAgree}]),name:"isSaleAgree",type:"checkbox",label:"此欄位",value:!0},null,8,["modelValue","class"]),m("本人願意提供表單資料給臺灣知識庫相關企業。 "),e("span",st,i(n.isSaleAgree),1)]),d(t(ke),{ref_key:"recaptcha",ref:T,sitekey:dt,onVerify:le,onExpire:a[9]||(a[9]=s=>D("expire")),onFail:a[10]||(a[10]=s=>D("fail"))},null,512),d(me,{disabled:F},{default:v(()=>[m(i(F?"送出中":"資料送出"),1)]),_:2},1032,["disabled"])]),_:1},8,["validation-schema","class"]),t(g)?(_(),x("div",{key:0,class:b(t(I)>=920?"w-[200px] flex-initial":"w-3/5")},[e("div",nt,[(_(!0),x(M,null,W(c.qrcodeText,n=>(_(),x("div",{key:n},i(n),1))),128))]),d(f,{to:c.qrcodeLink,class:"block"},{default:v(()=>[e("img",{class:"block w-full",src:c.qrcodeSrc,alt:c.qrcodeText,title:c.qrcodeText},null,8,rt)]),_:1},8,["to"])],2)):ge("",!0)])],8,Le)}}},bt=ce(it,[["__scopeId","data-v-c751888e"]]);export{bt as S};

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.