(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["brick-module-member-profile_email"],{1913:function(t,a,i){"use strict";i.r(a);var e=i("6fca"),n=i.n(e);for(var c in e)["default"].indexOf(c)<0&&function(t){i.d(a,t,(function(){return e[t]}))}(c);a["default"]=n.a},"197c":function(t,a,i){"use strict";i.d(a,"b",(function(){return n})),i.d(a,"c",(function(){return c})),i.d(a,"a",(function(){return e}));var e={pageMeta:i("6d42").default,cPageHeader:i("c8e4").default,cSmartCaptcha:i("0984").default,cSmartVerify:i("f952").default},n=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("v-uni-view",[i("page-meta",{attrs:{"root-font-size":"20px"}}),i("v-uni-view",[i("c-page-header",{attrs:{title:"修改邮箱"}}),t.user.email&&!t.change?i("v-uni-view",{staticClass:"tw-p-4 ub-content-bg ub-h-full"},[i("v-uni-view",{staticClass:"ub-m-list ub-box-shadow"},[i("v-uni-view",{staticClass:"ub-m-list-item"},[i("v-uni-view",{staticClass:"icon"},[i("v-uni-text",{staticClass:"iconfont icon-email"})],1),i("v-uni-view",{staticClass:"title"},[t._v("您已绑定邮箱")]),i("v-uni-view",{staticClass:"value"},[t._v(t._s(t.user.email))])],1)],1),i("v-uni-view",[i("v-uni-button",{staticClass:"btn btn-primary btn-block btn-lg",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.change=!0}}},[t._v("立即修改")])],1)],1):t._e(),!t.user.email||t.change?i("v-uni-view",{staticClass:"tw-p-8 ub-content-bg ub-h-full"},[i("v-uni-view",{staticClass:"ub-input-simple"},[i("v-uni-view",{staticClass:"input"},[i("v-uni-input",{attrs:{placeholder:"输入新邮箱"},model:{value:t.data.email,callback:function(a){t.$set(t.data,"email",a)},expression:"data.email"}})],1)],1),i("v-uni-view",{staticClass:"ub-input-simple"},[i("v-uni-view",{staticClass:"input with-action"},[i("v-uni-view",{staticClass:"control"},[i("v-uni-input",{attrs:{placeholder:"输入图片验证"},model:{value:t.data.captcha,callback:function(a){t.$set(t.data,"captcha",a)},expression:"data.captcha"}})],1),i("v-uni-view",{staticClass:"action"},[i("c-smart-captcha",{ref:"captcha",staticClass:"captcha",attrs:{src:"member_profile/captcha"}})],1)],1)],1),i("v-uni-view",{staticClass:"ub-input-simple"},[i("v-uni-view",{staticClass:"input with-action"},[i("v-uni-view",{staticClass:"control"},[i("v-uni-input",{attrs:{placeholder:"输入邮箱验证码"},model:{value:t.data.verify,callback:function(a){t.$set(t.data,"verify",a)},expression:"data.verify"}})],1),i("v-uni-view",{staticClass:"action"},[i("c-smart-verify",{staticClass:"verify",attrs:{src:"member_profile/email_verify",target:t.data.email,captcha:t.data.captcha},on:{"update:target":function(a){arguments[0]=a=t.$handleEvent(a),t.$set(t.data,"email",a)},"update:captcha":function(a){arguments[0]=a=t.$handleEvent(a),t.$set(t.data,"captcha",a)},error:function(a){arguments[0]=a=t.$handleEvent(a),t.onVerifyError.apply(void 0,arguments)}}})],1)],1)],1),i("v-uni-view",{staticClass:"ub-input-action"},[i("v-uni-button",{staticClass:"btn btn-lg btn-primary btn-block btn-round",attrs:{loading:t.loading},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.doSubmit()}}},[t._v("确认修改")])],1)],1):t._e()],1)],1)},c=[]},"3a31":function(t,a,i){"use strict";i.r(a);var e=i("197c"),n=i("1913");for(var c in n)["default"].indexOf(c)<0&&function(t){i.d(a,t,(function(){return n[t]}))}(c);var s,u=i("f0c5"),l=Object(u["a"])(n["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],s);a["default"]=l.exports},"6fca":function(t,a,i){"use strict";i("7a82"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var e=i("51d9"),n=i("26cb"),c={computed:(0,n.mapState)({user:function(t){return t.user.user}}),onShow:function(){this.$starter.boot()},data:function(){return{loading:!1,change:!1,data:{email:"",verify:"",captcha:""}}},methods:{doSubmit:function(){var t=this;this.loading=!0,this.$delay((function(){t.$api.post("member_profile/email",t.data,(function(a){t.loading=!1,t.change=!1,t.data.email="",t.data.verify="",t.data.captcha="",e.EventBus.$emit("UpdateApp"),t.$dialog.tipSuccess("修改成功",(function(){t.$r.back()}))}),(function(a){t.loading=!1}))}))},onVerifyError:function(){this.$refs.captcha.refresh()}}};a.default=c}}]);