webpackJsonp([8],{"4Gu3":function(t,e,i){t.exports=i.p+"static/img/2.caaaa36.jpg"},AtSJ:function(t,e,i){t.exports=i.p+"static/img/1.008aad5.jpg"},NEaP:function(t,e){},qgFE:function(t,e,i){t.exports=i.p+"static/img/3.ed4c69c.jpg"},tqzN:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={name:"PersonInfo",data:function(){return{idx:0,name:"",photo:"",phone:"",eMail:"",QQ:"",imgSrc:"",showImgs:!1,list:[{src:i("AtSJ"),id:0},{src:i("4Gu3"),id:1},{src:i("qgFE"),id:2}]}},mounted:function(){},methods:{isImg:function(t,e){this.imgSrc=t.src,this.imgSrcid=t.id,this.idx=e},sureinfor:function(t){1==t?/^1[34578]\d{9}$/.test(this.phone)||(this.$dialog.alert({mes:"手机格式不正确！"}),this.phone=""):10==t?/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.eMail)||(this.$dialog.alert({mes:"邮箱格式不正确！"}),this.eMail=""):100==t?/^[0-9]+$/.test(this.QQ)||(this.$dialog.alert({mes:"QQ格式不正确！"}),this.QQ=""):102==t&&""==this.name&&(this.$dialog.alert({mes:"昵称不能为空！"}),this.name="")},onSubmit:function(){var t=this;""==this.name?this.$dialog.alert({mes:"请填写昵称"}):""==this.phone?this.$dialog.alert({mes:"请填写手机号!"}):""==this.eMail?this.$dialog.alert({mes:"请填写邮箱!"}):""==this.imgSrc?this.$dialog.alert({mes:"请上传头像!"}):this.$http.post(this.$ports.login.updateUserInfo,{token:localStorage.getItem("token"),email:this.eMail,phone:this.phone,img_id:this.imgSrcid,name:this.name}).then(function(e){1==e.data.status?(console.log("ok"),t.$dialog.alert({mes:"修改成功!"})):console.log(e)})}}},a={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticStyle:{height:"100vh"}},[i("yd-navbar",{attrs:{title:"个人资料",color:"#fff"}},[i("router-link",{attrs:{slot:"left",to:{path:"/PersonalCenter"}},slot:"left"},[i("yd-navbar-back-icon",{staticStyle:{color:"#fff"}})],1)],1),t._v(" "),i("div",{staticClass:"tips"},[t._v("\n\t\t请完善您的个人资料，以便尽情享受我们网站提供的所有服务。\n\t")]),t._v(" "),i("div",{staticClass:"form"},[i("ul",[t._m(0),t._v(" "),t._m(1),t._v(" "),i("li",[i("label",{attrs:{for:"photo"}},[t._v("头像")]),t._v(" "),t.imgSrc?i("img",{staticClass:"photo",attrs:{src:t.imgSrc,alt:""}}):t._e(),t._v(" "),i("yd-button",{attrs:{id:"photo"},nativeOn:{click:function(e){t.showImgs=!0}}},[t._v("上传图片")])],1),t._v(" "),i("li",[i("label",{attrs:{for:"name"}},[t._v("昵称")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"nodisabled",attrs:{id:"name",type:"text",placeholder:"请输入昵称"},domProps:{value:t.name},on:{blur:function(e){return t.sureinfor(102)},input:function(e){e.target.composing||(t.name=e.target.value)}}})]),t._v(" "),i("li",[i("label",{attrs:{for:"qq"}},[t._v("QQ号")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.QQ,expression:"QQ"}],staticClass:"nodisabled",attrs:{id:"qq",type:"text",placeholder:"请输入QQ号"},domProps:{value:t.QQ},on:{blur:function(e){return t.sureinfor(100)},input:function(e){e.target.composing||(t.QQ=e.target.value)}}})]),t._v(" "),i("li",[i("label",{attrs:{for:"phone"}},[t._v("手机号")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.phone,expression:"phone"}],staticClass:"nodisabled",attrs:{id:"phone",type:"text",placeholder:"请输入手机号"},domProps:{value:t.phone},on:{blur:function(e){return t.sureinfor(1)},input:function(e){e.target.composing||(t.phone=e.target.value)}}})]),t._v(" "),i("li",[i("label",{attrs:{for:"email"}},[t._v("邮箱地址")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.eMail,expression:"eMail"}],staticClass:"nodisabled",attrs:{id:"email",type:"text",placeholder:"请输入邮箱"},domProps:{value:t.eMail},on:{blur:function(e){return t.sureinfor(10)},input:function(e){e.target.composing||(t.eMail=e.target.value)}}})])])]),t._v(" "),i("yd-tabbar",{attrs:{slot:"tabbar"},slot:"tabbar"},[i("yd-button",{attrs:{size:"large",type:"primary"},nativeOn:{click:function(e){return t.onSubmit(e)}}},[t._v("完善资料")])],1),t._v(" "),i("yd-popup",{attrs:{position:"bottom",height:"60%"},model:{value:t.showImgs,callback:function(e){t.showImgs=e},expression:"showImgs"}},[i("div",{staticClass:"closed"},[i("yd-button",{nativeOn:{click:function(e){t.showImgs=!1}}},[t._v("关闭")])],1),t._v(" "),i("div",{staticClass:"imgBox"},[i("ul",t._l(t.list,function(e,s){return i("li",{key:s},[i("img",{class:t.idx==s?"hover":"",attrs:{src:e.src,alt:""},on:{click:function(i){return t.isImg(e,s)}}})])}),0)])])],1)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("label",{attrs:{for:"user"}},[this._v("账号")]),this._v(" "),e("input",{staticClass:"disabled",attrs:{id:"user",type:"text",placeholder:"账号不能修改",disabled:"disabled"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("label",{attrs:{for:"password"}},[this._v("密码")]),this._v(" "),e("input",{staticClass:"disabled",attrs:{id:"password",type:"text",placeholder:"****",disabled:"disabled"}})])}]};var o=i("VU/8")(s,a,!1,function(t){i("NEaP")},"data-v-4eda4e99",null);e.default=o.exports}});
//# sourceMappingURL=8.517b95eb61edb580f00c.js.map