(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-29c6aa4c"],{1823:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("transition",{attrs:{name:"el-fade-in-linear"}},[r("div",{staticClass:"app-myInfo"},[r("div",{staticClass:"app-header"},[r("appHeader"),r("el-divider")],1),r("div",{staticClass:"myInfo-body"},[r("el-card",{staticClass:"box-card editCard"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",[e._v("个人信息修改")])]),r("el-form",{ref:"editForm",attrs:{model:e.editForm,"label-width":"80px",rules:e.editRules,"hide-required-asterisk":"true"}},[r("el-form-item",{attrs:{label:"昵称",prop:"name"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"昵称",maxlength:"30","show-word-limit":""},model:{value:e.editForm.name,callback:function(t){e.$set(e.editForm,"name",t)},expression:"editForm.name"}})],1),r("el-form-item",{attrs:{label:"收货地址",prop:"address"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"收货地址",maxlength:"50","show-word-limit":""},model:{value:e.editForm.address,callback:function(t){e.$set(e.editForm,"address",t)},expression:"editForm.address"}})],1),r("el-form-item",{attrs:{label:"电话号码",prop:"phone"}},[r("el-input",{attrs:{type:"text",autocomplete:"off",size:"small",placeholder:"电话号码","suffix-icon":"el-icon-mobile-phone"},model:{value:e.editForm.phone,callback:function(t){e.$set(e.editForm,"phone",t)},expression:"editForm.phone"}})],1),r("el-form-item",{attrs:{label:"性别",size:"medium",prop:"sex"}},[r("el-radio-group",{model:{value:e.editForm.sex,callback:function(t){e.$set(e.editForm,"sex",t)},expression:"editForm.sex"}},[r("el-radio",{attrs:{border:"",label:"男"}}),r("el-radio",{attrs:{border:"",label:"女"}})],1)],1),r("el-form-item",{staticClass:"editButtonItem"},[r("el-button",{staticClass:"editButton",attrs:{type:"primary"},on:{click:function(t){return e.submitEdit("editForm")}}},[e._v("提交")]),r("el-button",{staticClass:"resetButton",on:{click:function(t){return e.resetForm("editForm")}}},[e._v("重置")])],1)],1)],1)],1),r("div",{staticClass:"app-footer"},[r("el-divider"),r("appFooter",{staticClass:"app-footer"})],1)])])},a=[],i=r("f392"),o=r("2c4b"),l=r("c24f"),d={name:"myInfo",components:{appHeader:i["a"],appFooter:o["a"]},data(){return{editForm:{sex:"",phone:"",name:"",address:""},editRules:{sex:[{required:!0,message:"请选择性别",trigger:"blur"}],phone:[{required:!0,message:"请输入电话号码",trigger:"blur"},{min:11,max:11,trigger:"blur"}],name:[{required:!0,message:"请输入您的昵称",trigger:"blur"},{min:3,max:30,trigger:"blur"}],address:[{required:!0,message:"请输入您的收货地址",trigger:"blur"},{min:3,max:50,trigger:"blur"}]}}},methods:{submitEdit(e){this.$refs[e].validate(e=>{if(!e)return console.log("error submit!!"),!1;this.onSubmit()})},async onSubmit(){const{data:e}=await Object(l["a"])({name:this.editForm.userName,sex:this.editForm.sex,phone:this.editForm.phone,address:this.editForm.address});window.location.href="/",console.log(e),this.openSuccess()},openSuccess(){this.$message({message:"恭喜你，编辑个人信息成功!",type:"success"})},resetForm(e){this.$refs[e].resetFields()}}},n=d,m=(r("fd71"),r("2877")),c=Object(m["a"])(n,s,a,!1,null,"7f473ac2",null);t["default"]=c.exports},"4aa1":function(e,t,r){},fd71:function(e,t,r){"use strict";r("4aa1")}}]);
//# sourceMappingURL=chunk-29c6aa4c.d3d6605b.js.map