(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1005f1a7"],{"245c":function(t,e,a){t.exports=a.p+"static/img/email-big.d0b11fa9.webp"},4872:function(t,e,a){},"4ba8":function(t,e,a){"use strict";a("4872")},c6c5:function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"account-page"},[o("div",{staticClass:"account-title"},[t._v("My Account")]),o("div",{staticClass:"account-card"},[o("img",{staticClass:"account-left",attrs:{src:a("245c"),alt:"email"}}),o("div",{staticClass:"account-right"},[o("el-row",{attrs:{gutter:50}},[o("el-form",{ref:"accountForm",attrs:{model:t.accountForm,rules:t.accountRules,"label-width":"100px","label-position":"top"}},[o("el-col",{attrs:{span:24}},[o("div",{staticClass:"form-title"},[t._v("Contact details")])]),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Full name:",prop:"fullName"}},[o("el-input",{model:{value:t.accountForm.fullName,callback:function(e){t.$set(t.accountForm,"fullName",e)},expression:"accountForm.fullName"}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"E - mall:",prop:"email"}},[o("div",[o("el-input",{attrs:{disabled:t.emailDisabled},model:{value:t.accountForm.email,callback:function(e){t.$set(t.accountForm,"email",e)},expression:"accountForm.email"}}),o("div",{staticClass:"email-bottom"},[o("el-button",{attrs:{type:"primary",disabled:!!t.timingDisabled},on:{click:t.verify}},[t._v("Verify"+t._s(t.timingDisabled?" ("+t.timingDisabled+")":""))])],1)],1)])],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Phone:",prop:"phone"}},[o("el-input",{model:{value:t.accountForm.phone,callback:function(e){t.$set(t.accountForm,"phone",e)},expression:"accountForm.phone"}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"StandbyPhone:",prop:"phone2"}},[o("el-input",{model:{value:t.accountForm.phone2,callback:function(e){t.$set(t.accountForm,"phone2",e)},expression:"accountForm.phone2"}})],1)],1),o("el-col",{attrs:{span:24}},[o("div",{staticClass:"form-title",staticStyle:{"margin-top":"40px"}},[t._v("Address")])]),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Country:",prop:"countryId"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:""},on:{change:t.countryChange},model:{value:t.accountForm.countryId,callback:function(e){t.$set(t.accountForm,"countryId",e)},expression:"accountForm.countryId"}},t._l(t.countryInfoList,(function(t){return o("el-option",{key:t.id,attrs:{label:t.enName,value:t.id}})})),1)],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"State/Province:",prop:"province"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"",disabled:!t.provinceInfoList.length},model:{value:t.accountForm.province,callback:function(e){t.$set(t.accountForm,"province",e)},expression:"accountForm.province"}},t._l(t.provinceInfoList,(function(t){return o("el-option",{key:t.id,attrs:{label:t.enName,value:t.id}})})),1)],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Address1:",prop:"address1"}},[o("el-input",{model:{value:t.accountForm.address1,callback:function(e){t.$set(t.accountForm,"address1",e)},expression:"accountForm.address1"}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Postal Code:",prop:"zipCode"}},[o("el-input",{model:{value:t.accountForm.zipCode,callback:function(e){t.$set(t.accountForm,"zipCode",e)},expression:"accountForm.zipCode"}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"Address(optional):",prop:"address2"}},[o("el-input",{model:{value:t.accountForm.address2,callback:function(e){t.$set(t.accountForm,"address2",e)},expression:"accountForm.address2"}})],1)],1),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"City:",prop:"city"}},[o("el-input",{model:{value:t.accountForm.city,callback:function(e){t.$set(t.accountForm,"city",e)},expression:"accountForm.city"}})],1)],1),o("el-col",{attrs:{span:24}},[o("el-form-item",{staticStyle:{"text-align":"end"}},[o("el-button",{attrs:{loading:t.saveLoading,type:"primary"},on:{click:function(e){return t.save("accountForm")}}},[t._v("save")])],1)],1)],1)],1)],1)])])},s=[],c=a("43f3"),n=a("623f"),i={name:"SetUpAccount",data(){return{accountForm:{fullName:"",email:"",phone:"",phone2:"",countryId:"",province:"",address1:"",address2:"",city:"",zipCode:""},accountRules:{},countryInfoList:[],provinceInfoList:[],saveLoading:!1,timingDisabled:null,setIntervalTag:!1,emailDisabled:!0}},async created(){await this.getUserInfo(),this.getCountrysList(),this.accountForm.countryId&&this.getProvincesList()},methods:{async getUserInfo(){const t=await Object(c["p"])();this.accountForm=Object.assign(this.accountForm,t.data),this.accountForm.province=this.accountForm.province?Number(this.accountForm.province):""},async getCountrysList(){const t=await Object(n["e"])();this.countryInfoList=t.data.countryInfoList},countryChange(){this.accountForm.province="",this.getProvincesList()},async getProvincesList(){const t=await Object(n["n"])({countryId:this.accountForm.countryId});this.provinceInfoList=t.data.provinceInfoList},async verify(){await Object(c["c"])(),this.timingDisabled=60,this.setIntervalTag=setInterval(()=>{if(0===this.timingDisabled)return this.timingDisabled=null,void clearInterval(this.setIntervalTag);this.timingDisabled-=1},1e3),this.$message.success("Email sent successfully")},save(t){this.$refs[t].validate(async t=>{if(!t)return;this.saveLoading=!0;const e=Object.assign({},this.accountForm);try{await Object(c["a"])(e),this.emailDisabled=!0,this.$message.success("Save success")}finally{this.saveLoading=!1}})}}},l=i,r=(a("4ba8"),a("2877")),u=Object(r["a"])(l,o,s,!1,null,"bfff0132",null);e["default"]=u.exports}}]);