12 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[83],{668:function(t,e,n){t.exports={}},777:function(t,e,n){"use strict";n(668)},845:function(t,e,n){"use strict";n.r(e);n(39);var o=n(11),r=(n(46),n(12),n(53),{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(777),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("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:{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,null,"3119e84e",null);e.default=component.exports}}]);
- //# sourceMappingURL=55ade9a.js.map
|