(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f5e7e000"],{"0790":function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("van-nav-bar",{attrs:{title:e.title,"left-text":"","left-arrow":""},on:{"click-left":e.back}},[a("van-icon",{attrs:{slot:"left",name:e.backHome?"wap-home":"arrow-left"},slot:"left"})],1)},i=[],o={name:"NavBar",data:function(){return{backHome:!1}},props:{title:{type:String,required:!0,default:""}},created:function(){this.$util.sessionStorage.fetch("backHome")&&(this.backHome=!0)},mounted:function(){},methods:{back:function(){this.backHome?(this.$util.sessionStorage.remove("backHome"),this.$router.push("/")):window.history.length>1?window.history.go(-1):this.$router.push("/")}}},r=o,n=(a("ba46"),a("2877")),l=Object(n["a"])(r,s,i,!1,null,"530892b0",null);l.options.__file="NavBar.vue";t["a"]=l.exports},5898:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-wrap"},[a("nav-bar",{attrs:{title:"补充基本信息"}}),a("div",{staticClass:"wrap"},[a("van-field",{staticClass:"firstName",attrs:{clearable:""},model:{value:e.form.firstName,callback:function(t){e.$set(e.form,"firstName",t)},expression:"form.firstName"}}),a("van-field",{staticClass:"lastName",attrs:{clearable:""},model:{value:e.form.lastName,callback:function(t){e.$set(e.form,"lastName",t)},expression:"form.lastName"}}),a("div",{staticClass:"mobile flex align-c"},[a("p",{staticClass:"areaCode",on:{click:e.getAreaCode}},[a("span",[e._v(e._s(e.areaCodeItem.code))]),a("i",{staticClass:"icon icon-xialatishi"})]),a("van-field",{attrs:{type:"number",clearable:""},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),a("van-field",{staticClass:"email",attrs:{clearable:""},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}}),a("van-field",{staticClass:"wechat",attrs:{clearable:""},model:{value:e.form.wechatId,callback:function(t){e.$set(e.form,"wechatId",t)},expression:"form.wechatId"}}),a("van-button",{class:{disabled:e.disabled},attrs:{type:"default"},on:{click:e.setData}},[e._v("确认")])],1)],1)},i=[],o=(a("c5f6"),a("0790")),r={name:"Form",components:{NavBar:o["a"]},data:function(){return{form:{firstName:"",lastName:"",email:"",mobile:"",wechatId:"",type:"qrcodeApply",mobileCountryId:"317",mobilePrefix:"+86",orderId:this.$util.sessionStorage.fetch("orderId")},areaCodeItem:{id:"317",name:"中国",code:"+86"},lang:this.$store.state.langStr,isEdit:!0,copyForm:{},disabled:!0}},created:function(){var e=this.$util.storage.fetch("areaCodeItem");e&&(this.areaCodeItem=e);var t=JSON.parse(decodeURIComponent(this.$util.sessionStorage.fetch("form")));if(t)this.form=t,this.form.orderId=this.$util.sessionStorage.fetch("orderId");else if(this.$util.getLoginUserInfo()){var a=JSON.parse(decodeURIComponent(this.$util.getLoginUserInfo()));for(var s in a)if(a.hasOwnProperty(s)){var i=a[s];s in this.form&&(this.form[s]=i)}this.areaCodeItem.code=a.mobilePrefix}this.form.mobileCountryId=this.areaCodeItem.id,this.form.mobilePrefix=this.areaCodeItem.code},watch:{form:{handler:function(e){var t=0,a=encodeURIComponent(JSON.stringify(this.form));for(var s in this.$util.sessionStorage.save("form",a),e)e.hasOwnProperty(s)&&(e[s]||t++);this.disabled=t>0},deep:!0}},methods:{setData:function(){var e=this;if(!0!==this.disabled){var t=/^[0-9]*$/,a=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;if(!t.test(this.form.mobile))return this.$Toast("手机格式不正确"),this.disabled=!1,!1;if(!a.test(this.form.email))return this.$Toast("邮箱格式不正确"),this.disabled=!1,!1;var s={};s.url=this.$apis.api_order_apply,s.data=this.form,this.disabled=!0,this.$net.req(s,this).then(function(t){0===Number(t.code)?(e.$util.sessionStorage.remove("form"),e.$util.sessionStorage.remove("guide"),e.$util.sessionStorage.save("backUser",!0),e.$Toast("提交成功"),e.isEdit=!1,setTimeout(function(){e.$router.push({path:"/".concat(e.lang,"/user/orderDetail/").concat(e.form.orderId)})},1500)):(e.$Toast(t.msg||"信息提交失败，请稍后重试"),setTimeout(function(){e.disabled=!1},1e3))},function(t){e.$Toast(t.msg),setTimeout(function(){e.disabled=!1},1e3)})}},getAreaCode:function(){this.$router.push({path:"/".concat(this.lang,"/areaCode")})}}},n=r,l=(a("f1d5"),a("2877")),c=Object(l["a"])(n,s,i,!1,null,"f9fa7772",null);c.options.__file="form.vue";t["default"]=c.exports},"8d1f":function(e,t,a){},ba46:function(e,t,a){"use strict";var s=a("8d1f"),i=a.n(s);i.a},f1d5:function(e,t,a){"use strict";var s=a("fd61"),i=a.n(s);i.a},fd61:function(e,t,a){}}]);
//# sourceMappingURL=chunk-f5e7e000.73583d47.js.map