(this["webpackJsonpmr-julyedu"]=this["webpackJsonpmr-julyedu"]||[]).push([[14],{1635:function(e,a,n){"use strict";n.r(a);n(25);var o=n(4),r=n.n(o),l=(n(123),n(65)),t=n.n(l),i=(n(694),n(696)),s=n.n(i),p=(n(1468),n(1470)),d=n.n(p),c=n(0),u=n.n(c),m=n(11),v=n(18),h=n(1);const f=Object(m.f)({mapPropsToValues:e=>({...e.userInfo}),validate:(e,a)=>({}),handleSubmit:(e,a)=>{const{real_name:n,cellphone:o,qq:l}=e;if(!n)return void r.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);if(0===(""+n).replace(/\s+/g,"").length)return void r.a.info("\u8bf7\u8f93\u5165\u59d3\u540d\uff01",void 0,void 0,!1);if(!o)return void r.a.info("\u8bf7\u8f93\u5165\u624b\u673a\u53f7\uff01",void 0,void 0,!1);if(!/1\d{10}/g.test((""+o).replace(/\s+/g,"")))return void r.a.info("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\uff01",void 0,void 0,!1);if(!l)return void r.a.info("\u8bf7\u8f93\u5165QQ\u53f7\uff01",void 0,void 0,!1);if(!/\d{5,}/g.test(l))return void r.a.info("\u8bf7\u8f93\u5165\u6b63\u786eQQ\u53f7\uff01",void 0,void 0,!1);let t=0;if(a.props.userInfo){const e=a.props.userInfo;e.real_name===n&&(t+=1),e.cellphone===o&&(t+=1),e.qq===l&&(t+=1)}let i="/order";a.props.userInfo.id&&(i=i+"?id="+a.props.userInfo.id),3!==t?h.f.post(API["base-api"]+"/m/order/saveUserInfo",{real_name:e.real_name,cellphone:(""+e.cellphone).replace(/\s+/g,""),qq:e.qq}).then(n=>{200===n.data.errno?(r.a.info("\u4fdd\u5b58\u6210\u529f\uff01",void 0,void 0,!1),a.props.history.replace(i,{...e})):r.a.info(n.data.msg,void 0,void 0,!1)}):a.props.history.replace(i,{...e})}})(e=>{let{values:a,setFieldValue:n,handleSubmit:o}=e;return u.a.createElement("form",null,u.a.createElement(d.a,{clear:!0,name:"real_name",onChange:e=>n("real_name",e),placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u771f\u5b9e\u59d3\u540d",value:a.real_name},"\u59d3\u540d"),u.a.createElement(d.a,{clear:!0,type:"phone",name:"cellphone",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801",onChange:e=>n("cellphone",e),value:a.cellphone},"\u7535\u8bdd"),u.a.createElement(d.a,{clear:!0,name:"qq",placeholder:"\u8bf7\u8f93\u5165\u60a8\u7684QQ\u53f7\u7801",maxLength:"15",onChange:e=>n("qq",e),value:a.qq},"QQ"),u.a.createElement("div",{style:{marginTop:"21px"}},u.a.createElement(t.a,null,u.a.createElement(s.a,{type:"primary",onClick:o},"\u786e\u8ba4"))))});class q extends c.Component{render(){return u.a.createElement("div",null,u.a.createElement(v.e,{title:"\u62a5\u540d\u4fe1\u606f",arrow:!0}),u.a.createElement(f,{history:this.props.history,userInfo:this.props.location.state}))}}a.default=q}}]);
//# sourceMappingURL=Orderinfo.5f08e6cc.chunk.js.map