PageSourceSearch

https://across.archives.gov.tw/component---src-pages-contact-js-a8df51396c2bb74ad590.js

js archives.gov.tw collected 2026-10-02 10:52:08 UTC 9,736 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkjumperrwd=self.webpackChunkjumperrwd||[]).push([[5501],{85791:function(t,e,a){a.r(e);var n,r,s,c,o=a(17156),i=a.n(o),m=a(66115),l=a.n(m),p=a(7867),u=a.n(p),h=a(46877),f=a.n(h),d=a(19452),b=a.n(d),y=a(64687),g=a.n(y),E=a(67294),v=a(11966),C=a(45238),N=a(92881),j=a(78191),_=a(37587),D=a(99593),w=a(59470),I=a(89639),S=a(90361),F=(0,_.ZP)(n||(n=b()(["\n  query getContactTypeList {\n    result: getContactTypeList {\n      list {\n        sn\n        name\n        enName\n      }\n    }\n  }\n"]))),k=(0,_.ZP)(r||(r=b()(["\n  mutation addContact($form: ContactForm) {\n    result: addContact(Input: $form) {\n      success\n      message\n    }\n  }\n"]))),O=(0,C.a)(["common"])(s=(0,I.M)((c=function(t){function e(e){var a;a=t.call(this,e)||this;var n=e.readerStore.session,r="0"!==e.appStore.globalConfig["jumperrwd.captcha.useAudio"],s=e.appStore.globalConfig["jumperrwd.contact.mustField"]||"",c=["ctype","subject","content","captcha"];""!==s&&(c=JSON.parse(s));var o="",i="";return"0"!==e.appStore.globalConfig["jumperrwd.contact.isFillInfo"]&&(o=n.realName||"",i=n.email||""),a.state={mustField:c,listContent:"",defautSelectValue:"",formData:{username:o,useremail:i,usertel:"",ctype:"",subject:"",content:"",captcha:""},captchaAudio:r,captchaRefetch:null},a.handleChange=a.handleChange.bind(l()(a)),a.handleSubmit=a.handleSubmit.bind(l()(a)),a}u()(e,t);var a=e.prototype;return a.componentDidMount=function(){this.getList(this.props)},a.getList=function(t){var e=this;D.Z.jumperrwdClient.query({query:F}).then((function(t){var a=t.data.result;e.state.formData.ctype=a.list[0].sn;var n=a.list.map((function(t){return E.createElement("option",{value:t.sn},t.name)})),r=e.state.formData;r.ctype=a.list[0].sn.toString(),e.setState({listContent:n,defautSelectValue:a.list[0].sn.toString(),formData:r})}))},a.getCaptchaRefetch=function(t){this.setState({captchaRefetch:t})},a.addContact=function(){var t=i()(g().mark((function t(){var e,a,n,r,s;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D.Z.jumperrwdClient.mutate({mutation:k,variables:{form:this.state.formData}}).then((function(t){return t})).finally((function(){return null}));case 2:if(t.sent.data.result.success){for(alert("送出成功!"),e=this.state.formData,a=0,n=Object.entries(this.state.formData);a<n.length;a++)r=n[a],s=r[0],e[s]="";e.ctype=this.state.defautSelectValue,this.setState({formData:e}),this.state.captchaRefetch()}else alert("送出失敗!");case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),a.handleChange=function(t){t.preventDefault();var e=this.state.formData;e[t.target.name]=t.target.value,this.setState({formData:e})},a.handleSubmit=function(t){t.preventDefault();for(var e=this.state.mustField,a=0,n=Object.entries(this.state.formData);a<n.length;a++){var r=n[a],s=r[0],c=r[1];if(console.log(s+": "+c),e.includes(s)&&""===c){if("subject"===s)return alert("請輸入主題!"),this.subjectInput&&this.subjectInput.focus(),!1;if("content"===s)return alert("請輸入內容!"),this.contentInput&&this.contentInput.focus(),!1;if("username"===s)return alert("請輸入姓名!"),this.usernameInput&&this.usernameInput.focus(),!1;if("useremail"===s)return alert("請輸入Email!"),this.useremailInput&&this.useremailInput.focus(),!1;if("usertel"===s)return alert("請輸入聯絡電話!"),this.usertelInput&&this.usertelInput.focus(),!1;if("captcha"===s)return alert("請輸入驗證碼!"),this.captchaInput&&this.captchaInput.focus(),!1}}this.addContact()},a.playCaptcha=function(){this.captcha&&this.captcha.audio&&this.captcha.audio.value&&""!==this.captcha.audio.value&&new Audio("data:audio/mpeg;base64,"+this.captcha.audio.value).play()},a.render=function(){var t=this,e=this.state,a=e.captchaAudio,n=e.mustField;return E.createElement(v.Z,this.props,E.createElement("div",{className:"main sp",id:"center"},E.createElement(N.Z,null),E.createElement("section",{className:"main_content"},E.createElement("div",{className:"container"},E.createElement("a",{className:"accesskey",href:"javascript:;",id:"aC",accessKey:"C",title:this.props.t("jumperrwd.common.mainContenctArea")},":::"),E.createElement("h2",null,this.props.t("jumper.common.contact.titlebar")),E.createElement("a",{href:"javascript:history.back();",className:"back"},this.props.t("hyint.common.table.back")),E.createElement("div",{className:"detail_block"},E.createElement("div",{className:"apply_form"},E.createElement("p",null,this.props.t("hyint.common.contact.msg")),E.createElement("form",{onSubmit:this.handleSubmit},E.createElement("div",{className:"form_grid"}
1,E.createElement("h3",null,this.props.t("hyint.common.contact.info")),E.createElement("p",null,this.props.t("jumper.common.contact.replyinfo")),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"username",className:"form_title"},this.props.t("hyint.common.contact.name"),n.includes("username")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content"},E.createElement("input",{ref:function(e){t.usernameInput=e},id:"username",name:"username",value:this.state.formData.username,onChange:this.handleChange}))),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"useremail",className:"form_title"},"Email",n.includes("useremail")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content"},E.createElement("input",{ref:function(e){t.useremailInput=e},id:"useremail",name:"useremail",value:this.state.formData.useremail,onChange:this.handleChange}))),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"usertel",className:"form_title"},this.props.t("hyint.common.contact.phone"),n.includes("usertel")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content"},E.createElement("input",{ref:function(e){t.usertelInput=e},id:"usertel",name:"usertel",value:this.state.formData.usertel,onChange:this.handleChange})))),E.createElement("div",{className:"form_grid"},E.createElement("h3",null,this.props.t("hyint.common.contact.comments")),E.createElement("p",null,E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*"),this.props.t("jumper.common.contact.mistinfo")),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"",className:"form_title"},this.props.t("hyint.common.contact.type"),n.includes("ctype")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content form_inline"},E.createElement("select",{name:"ctype",must:"1",value:this.state.formData.ctype,onChange:this.handleChange},this.state.listContent))),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"subject",className:"form_title"},this.props.t("hyint.common.contact.subject"),n.includes("subject")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content"},E.createElement("input",{ref:function(e){t.subjectInput=e},maxLength:"254",id:"subject",name:"subject",must:"1",value:this.state.formData.subject,onChange:this.handleChange,required:!0}))),E.createElement("div",{className:"form_grp"},E.createElement("label",{htmlFor:"address",className:"form_title"},this.props.t("hyint.common.contact.content"),n.includes("content")&&E.createElement("abbr",{className:"necessary",title:this.props.t("jumper.common.contact.mistinfo")},"*")),E.createElement("div",{className:"form_content"},E.createElement("textarea",{ref:function(e){t.contentInput=e},name:"content",must:"1",cols:"30",rows:"10",value:this.state.formData.content,onChange:this.handleChange,required:!0}))),E.createElement("div",{className:"form_grp"},E.createElement("div",{className:"form_title"},this.props.t("hyint.common.login.authcode")),E.createElement("div",{className:"form_content form_inline"},E.createElement(j.Z,{ref:function(e){t.captcha=e},typeName:"contact",getRefetch:this.getCaptchaRefetch,t:this.props.t}),E.createElement("input",{ref:function(e){t.captchaInput=e},name:"captcha",title:this.props.t("jumperrwd.common.captcha"),placeholder:this.props.t("hyint.common.login.authcode"),value:this.state.formData.captcha,onChange:this.handleChange,required:!0}),a&&E.createElement(S.eU,{t:this.props.t,i18nKey:"jumperrwd.captcha.audioInfo",parent:"p",audioPlay:E.createElement("a",{href:"javascript:;",onClick:function(e){e.preventDefault(),t.playCaptcha()}},this.props.t("jumperrwd.captcha.audioPlay"))}))),E.createElement("div",{className:"btn_grp"},E.createElement("button",{className:"btn btn-reset",type:"reset",n
1ame:"resetContactBtn"},this.props.t("hyint.admin.common.reset")),E.createElement("button",{className:"btn btn-submit",type:"submit",name:"addContactBtn"},this.props.t("hyint.common.table.gosubmit")))))))))))},e}(E.Component),f()(c.prototype,"getList",[w.Nj],Object.getOwnPropertyDescriptor(c.prototype,"getList"),c.prototype),f()(c.prototype,"getCaptchaRefetch",[w.Nj],Object.getOwnPropertyDescriptor(c.prototype,"getCaptchaRefetch"),c.prototype),f()(c.prototype,"addContact",[w.Nj],Object.getOwnPropertyDescriptor(c.prototype,"addContact"),c.prototype),f()(c.prototype,"playCaptcha",[w.Nj],Object.getOwnPropertyDescriptor(c.prototype,"playCaptcha"),c.prototype),s=c))||s)||s;e.default=O}}]);
2//# sourceMappingURL=component---src-pages-contact-js-a8df51396c2bb74ad590.js.map

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.