b7ae04d.js 4.3 KB

12
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[83],{669:function(t,e,n){t.exports={}},670:function(t,e,n){t.exports={}},780:function(t,e,n){"use strict";n(669)},781:function(t,e,n){"use strict";n(670)},849:function(t,e,n){"use strict";n.r(e);n(39);var o=n(12),r=(n(46),n(11),n(61),{data:function(){return{siteID:"",info:"",submitLoading:!1,config:[{long:!0,autoInput:!0,prop:"name",type:"input",placeholder:"Name"},{long:!0,prop:"phone",type:"input",placeholder:"Phone"},{long:!0,prop:"email",type:"input",placeholder:"Email"},{long:!0,prop:"enquiry",type:"textarea",placeholder:"Enquiry"}],rules:{email:[{required:!0,message:"Please input",trigger:"blur"}],phone:[{required:!0,message:"Please input",trigger:"blur"}],name:[{required:!0,message:"Please input",trigger:"blur"}],enquiry:[{required:!0,message:"Please input",trigger:"blur"}]},formData:{name:"",email:"",phone:"",enquiry:""}}},fetch:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("getShopInfo").then((function(e){t.info=e.contactus,t.siteID=e.id}));case 2:case"end":return e.stop()}}),e)})))()},methods:{submit:function(){var t=this;this.$refs.form.validate((function(e){if(e){var n=JSON.parse(JSON.stringify(t.formData));n.site_id=t.siteID,t.submitLoading=!0,t.$axios.post("/c-api/quote/sendenquiry",n).then((function(){t.$message.success("submit success"),t.formData={name:"",email:"",phone:"",enquiry:""}})).finally((function(){t.submitLoading=!1}))}}))}}}),l=(n(780),n(781),n(22)),component=Object(l.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"com-main com-width-1400 com-margin-auto"},[e("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[e("el-breadcrumb-item",{attrs:{to:{path:"/"}}},[t._v("Home")]),t._v(" "),e("el-breadcrumb-item",[t._v("Contact Us")])],1),t._v(" "),e("p",{staticClass:"title"},[t._v("Contact Us")]),t._v(" "),e("div",{staticClass:"line"}),t._v(" "),e("div",{staticStyle:{"padding-left":"20px","font-size":"16px"},domProps:{innerHTML:t._s(t.info)}}),t._v(" "),e("br"),t._v(" "),e("br"),t._v(" "),e("br"),t._v(" "),e("br"),t._v(" "),e("br"),t._v(" "),e("br"),t._v(" "),e("div",{staticClass:"site-enquiry-form"},[e("el-form",{ref:"form",attrs:{inline:!0,model:t.formData,rules:t.rules,"label-position":"top"}},[t._l(t.config,(function(n){return e("el-form-item",{key:n.label,class:{"long-form-item":n.long,"short-form-item":!n.long},attrs:{prop:n.prop,label:n.placeholder}},[e("el-input",{attrs:{rows:"textarea"===n.type?6:1,type:n.type,size:"small",name:n.prop,id:n.prop},model:{value:t.formData[n.prop],callback:function(e){t.$set(t.formData,n.prop,e)},expression:"formData[item.prop]"}})],1)})),t._v(" "),e("el-form-item",[e("div",{staticClass:"flex center",staticStyle:{width:"100%"}},[e("el-button",{attrs:{loading:t.submitLoading},on:{click:t.submit}},[t._v("SUBMIT")])],1)])],2),t._v(" "),e("div",{staticStyle:{position:"absolute",left:"-100vw"}},[e("div",{ref:"previewArea",staticClass:"preview-area"},[e("div",{staticStyle:{"margin-bottom":"4px","font-weight":"bold","font-size":"18px"}},[t._v("\n Name\n ")]),t._v(" "),e("div",{staticStyle:{"padding-left":"20px","font-size":"16px","margin-bottom":"8px"}},[t._v("\n "+t._s(t.formData.name)+"\n ")]),t._v(" "),e("div",{staticStyle:{"margin-bottom":"4px","font-weight":"bold","font-size":"18px"}},[t._v("\n Phone\n ")]),t._v(" "),e("div",{staticStyle:{"padding-left":"20px","font-size":"16px","margin-bottom":"8px"}},[t._v("\n "+t._s(t.formData.phone)+"\n ")]),t._v(" "),e("div",{staticStyle:{"margin-bottom":"4px","font-weight":"bold","font-size":"18px"}},[t._v("\n Email\n ")]),t._v(" "),e("div",{staticStyle:{"padding-left":"20px","font-size":"16px","margin-bottom":"8px"}},[t._v("\n "+t._s(t.formData.email)+"\n ")]),t._v(" "),e("div",{staticStyle:{"margin-bottom":"4px","font-weight":"bold","font-size":"18px"}},[t._v("\n Enquiry Details\n ")]),t._v(" "),e("div",{staticStyle:{"padding-left":"20px","font-size":"16px","margin-bottom":"8px"}},[t._v("\n "+t._s(t.formData.enquiry)+"\n ")])])])],1)],1)}),[],!1,null,"5fd4125a",null);e.default=component.exports}}]);
  2. //# sourceMappingURL=b7ae04d.js.map