(window.webpackJsonp=window.webpackJsonp||[]).push([[38],{442:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return c}));var r=function(e){return/^[\w.-]+@\w+([.-]\w+)*\.\w+$/.test(e)},o=function(e){return/^1[3-9]\d{9}$/.test(e)},c=function(e){return r(e)||o(e)}},703:function(e,t,n){"use strict";n.r(t);n(84);var r=n(8),o=n(38),c=n(442);function l(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function d(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(t){Object(r.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}var f={i18n:{messages:{zh:{title:"绑定邮箱",email:"邮箱",email_please:"请填写邮箱",code:"验证码",code_please:"请填写验证码",send:"发送验证码"},en:{title:"Binding Email",email:"Email",email_please:"Please fill in the email address",code:"Code",code_please:"Please fill in the code",send:"Send Code"}}},data:function(){return{username:"",verification_code:"",times:60}},methods:d(d({},Object(o.b)({bindEmail:"user/bindEmail",getUserInfo:"user/getUserInfo",getCode:"user/getCode"})),{},{handleGetCode:function(){var e=this;Object(c.a)(this.username)?this.getCode(this.username).then((function(){e.getTime()})).catch((function(t){var n=t.msg;e.$toast(n)})):this.$toast("邮箱号格式不正确")},getTime:function(){var e=this;this.timer=setInterval((function(){e.times--,0===e.times&&(clearInterval(e.timer),e.times=60)}),1e3)},onSubmit:function(){var e=this;this.bindEmail().then((function(){e.getUserInfo(),e.$router.back()}))}})},m=n(43),component=Object(m.a)(f,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("van-nav-bar",{attrs:{title:e.$t("title"),"left-arrow":""},on:{"click-left":function(t){return e.$router.back()}}}),e._v(" "),n("van-form",{on:{submit:e.onSubmit}},[n("van-field",{attrs:{label:e.$t("email"),placeholder:e.$t("email_please"),rules:[{required:!0,message:e.$t("email_please")}]},model:{value:e.username,callback:function(t){e.username=t},expression:"username"}}),e._v(" "),n("van-field",{attrs:{clearable:"",label:e.$t("code"),placeholder:e.$t("code_please"),rules:[{required:!0,message:e.$t("code_please")}]},scopedSlots:e._u([{key:"button",fn:function(){return[n("van-button",{attrs:{size:"small",type:"primary",block:""},on:{click:function(t){return t.preventDefault(),e.handleGetCode(t)}}},[e._v(e._s(e.$t("send")))])]},proxy:!0}]),model:{value:e.verification_code,callback:function(t){e.verification_code=t},expression:"verification_code"}}),e._v(" "),n("div",{staticStyle:{margin:"15px"}},[n("van-button",{staticClass:"submit",attrs:{block:"",type:"info","native-type":"submit"}},[e._v("\n        "+e._s(e.$t("actions.submit"))+"\n      ")])],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);