1 |
- webpackJsonp([5,30,47],{"4z3q":function(e,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var t=n("SQ4B"),o=n("vGYV"),r=n("qI5z"),a={name:"ReBindingMobile",data:function(){return{loading:!1,active:0,user:{},phoneBindingForm:{phone:"",verifyCode:"",newPhone:""},hasVerifyCode:!1,codeTime:60,rules:{verifyCode:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:6,max:6,message:"验证码长度为6个字符",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"}],newPhone:[{required:!0,message:"请输入手机号",trigger:"blur"},{min:11,max:11,message:"手机号不合法",trigger:"blur"}]}}},methods:{setUserInfo:function(){var e=this,i=Object(o.K)("user")&&Object(o.K)("user").userVO.id;t.a.get("/api/user/"+i).then(function(i){e.user=i.userVO,e.phoneBindingForm.phone=e.user.mobile})},reBindingMobile:function(){var e=this;if(this.showLoading(),0===this.active){var i={id:this.user.id,mobile:this.user.mobile,verifyCode:this.phoneBindingForm.verifyCode};t.a.put("/api/verify/old/mobile",i).then(function(i){e.hideLoading(),2e4===i.code?(Object(r.a)("success","验证成功"),e.active=1,e.phoneBindingForm.phone="",e.phoneBindingForm.verifyCode="",e.hasVerifyCode=!1,e.codeTime=60,e.setUserInfo()):(Object(r.a)("error","验证原手机失败:"+i.data),e.codeTime=60,e.hasVerifyCode=!1)}).catch(function(i){e.phoneBindingForm.phone="",e.phoneBindingForm.verifyCode="",e.codeTime=60,e.hasVerifyCode=!1,e.hideLoading(),Object(r.a)("error","验证原手机失败:"+i.data)})}else{var n={id:this.user.id,mobile:this.phoneBindingForm.newPhone,verifyCode:this.phoneBindingForm.verifyCode};t.a.put("/api/user/mobile",n).then(function(i){e.hideLoading(),"ERROR"==i.msg?Object(r.a)("error","绑定失败:"+i.data):(Object(r.a)("success","绑定成功"),e.$router.push({path:"/personal/phoneBinding"}))}).catch(function(i){e.hideLoading(),Object(r.a)("error","绑定失败:"+i.data)})}},getVerifyCode:function(){var e=this;if(0===this.active){var i={id:this.user.id,mobile:this.phoneBindingForm.phone};t.a.put("/api/verify/mobile",i).then(function(i){var n=e;if("ERROR"==i.msg)Object(r.a)("error","验证码获取失败:"+i.data);else{e.hasVerifyCode=!0,Object(r.a)("success",i.data);var t=setInterval(function(){n.codeTime>0?n.codeTime--:(clearInterval(t),n.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(e){Object(r.a)("error","获取验证码失败:"+e.data)})}else{var n={id:this.user.id,mobile:this.phoneBindingForm.newPhone};t.a.put("/api/verify/mobile",n).then(function(i){var n=e;if("ERROR"==i.msg)Object(r.a)("error","验证码获取失败:"+i.data);else{e.hasVerifyCode=!0,Object(r.a)("success",i.data);var t=setInterval(function(){n.codeTime>0?n.codeTime--:(clearInterval(t),n.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(e){Object(r.a)("error","获取验证码失败:"+e.data)})}},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},mounted:function(){this.setUserInfo()}},s={render:function(){var e=this,i=e.$createElement,n=e._self._c||i;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[n("el-steps",{staticStyle:{margin:"20px"},attrs:{active:e.active,"process-status":"finish"}},[n("el-step",{attrs:{title:"验证原手机"}}),e._v(" "),n("el-step",{attrs:{title:"绑定新手机"}})],1),e._v(" "),n("el-form",{ref:e.phoneBindingForm,staticStyle:{width:"400px"},attrs:{"label-width":"80px",rules:e.rules,model:e.phoneBindingForm}},[0===e.active?n("el-form-item",{attrs:{label:"原手机号",prop:"phone"}},[n("span",{model:{value:e.phoneBindingForm.phone,callback:function(i){e.$set(e.phoneBindingForm,"phone",i)},expression:"phoneBindingForm.phone"}},[e._v(e._s(this.user.mobile))])]):e._e(),e._v(" "),1===e.active?n("el-form-item",{attrs:{label:"新手机号",prop:"newPhone"}},[n("el-input",{model:{value:e.phoneBindingForm.newPhone,callback:function(i){e.$set(e.phoneBindingForm,"newPhone",i)},expression:"phoneBindingForm.newPhone"}})],1):e._e(),e._v(" "),n("el-form-item",{attrs:{label:"验证码",prop:"verifyCode"}},[n("el-input",{staticClass:"input-with-select",attrs:{placeholder:"验证码内容"},model:{value:e.phoneBindingForm.verifyCode,callback:function(i){e.$set(e.phoneBindingForm,"verifyCode",i)},expression:"phoneBindingForm.verifyCode"}},[n("el-button",{attrs:{slot:"append",disabled:e.hasVerifyCode},on:{click:e.getVerifyCode},slot:"append"},[e._v(e._s(e.hasVerifyCode?e.codeTime:"获取验证码")+"\n ")])],1),e._v(" "),e.hasVerifyCode?n("span",[e._v("验证码已发送到您手机上")]):e._e()],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",plain:""},on:{click:e.reBindingMobile}},[e._v(e._s(0===this.active?"下一步":"完成绑定")+"\n ")])],1)],1)],1)},staticRenderFns:[]};var d=n("VU/8")(a,s,!1,function(e){n("SFg+")},"data-v-666b2260",null);i.default=d.exports},"9OjG":function(e,i){},"SFg+":function(e,i){},emUe:function(e,i){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAACZklEQVRIS7WVT0hUcRDHP/N2kUpDBS9F1EWhIlFyVysKMg8evFiGXSRvHoQg0rcLdXAvBbq70CEIIoLoUl46CdE/oYOku0sKHiyDoKRDGSZoaLv7Jt5um+7uW9eKncuDNzOf93sz35mfUMgGojW46EC0A6UOZV8qVFhAmEdljCRjhD2LTgjJezk4U47x8zIwAFQX/HDasQSEscpuEmpY3RybDfZH92PpGMKRIsBstzKLIR0Mez5mHBtg83UduCYQav4KmglWFiF5guCx+XTFbOuL7qJaYygH/wm6ccw5lqSJO54fabAZuYpwfZvQZ8ADYCdIP2hDVp5yjaD3hpDqvr4HKouCLYKEPH4CCAGxOD3uprniCdC2KXeZ5EqtYEYuItwvCoVZRrz12L0Q1yjKJ8pXzrFWcRKL8ZxT9wq+qUcg3QXBiiLMoqyATiPSCexB+U4ivhd32SFEYzkyGRV8kTdAozNYv4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PXMphD/WjVp3gd0FemOXwqF5CY6iLOPWd4i4APu5gOqO37D6rVWko85ys6w2XK4YakVAPpOU84SbvmFGPyAcKCpNpdd5QJSnJOKdVK7HCbQmUiNfpfeAC0WhsExSarca6bfALWwdG9KP6uFtQOHPSJd0CaUWUSnWZuYfS7LoM/CSXE2bu/Ofl+kvKWAJRf2+eJkAAAAASUVORK5CYII="},qILV:function(e,i){},rZWl:function(e,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var t=n("uavL"),o=n("4z3q"),r=n("vGYV"),a=n("SQ4B"),s={name:"PhoneBinding",components:{BindingMobile:t.default,ReBindingMobile:o.default},data:function(){return{active:0,loading:!1,showBingWranning:!1,user:{},phoneBindingForm:{phone:"",verifyCode:""}}},methods:{showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},changePhoneNumber:function(){this.$router.push({path:"/personal/phoneBinding/rebinding"})},bindPhoneNumber:function(){this.$router.push({path:"/personal/phoneBinding/binding"})},setUserInfo:function(){var e=this;this.showLoading();var i=Object(r.K)("user")&&Object(r.K)("user").userVO.id;a.a.get("/api/user/"+i).then(function(i){e.user=i.userVO,e.hideLoading()})}},mounted:function(){this.setUserInfo()},watch:{$route:function(e,i){"/personal/phoneBinding"===e.path&&this.$router.go(0)}}},d={render:function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",[t("div",{staticClass:"right-modifyPsw"},[e._m(0),e._v(" "),t("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[e.user.mobile?t("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px","margin-bottom":"30px"}},[t("img",{attrs:{src:n("emUe")}}),e._v(" "),t("span",{staticStyle:{"font-size":"16px"}},[e._v("您已绑定的手机号码是"+e._s(this.user.mobile))]),e._v(" "),t("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:e.changePhoneNumber}},[e._v("修改号码")])],1):e._e(),e._v(" "),e.user.mobile?e._e():t("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px"}},[t("img",{attrs:{src:n("msK+")}}),e._v(" "),t("span",{staticStyle:{"font-size":"16px"}},[e._v("您尚未绑定手机号")]),e._v(" "),t("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"danger",plain:"",size:"mini"},on:{click:e.bindPhoneNumber}},[e._v("立即绑定")])],1)]),e._v(" "),t("router-view")],1)])},staticRenderFns:[function(){var e=this.$createElement,i=this._self._c||e;return i("div",{staticClass:"right-modifyPsw-title"},[i("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[this._v("手机绑定")])])}]};var c=n("VU/8")(s,d,!1,function(e){n("9OjG")},"data-v-2308edf1",null);i.default=c.exports},uavL:function(e,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var t=n("SQ4B"),o=n("vGYV"),r=n("qI5z"),a={name:"BindingMobile",data:function(){return{phoneBindingForm:{phone:"",verifyCode:""},loading:!1,hasVerifyCode:!1,codeTime:60,user:{},rules:{verifyCode:[{required:!0,message:"请输入验证码",trigger:"blur"},{min:6,max:6,message:"验证码长度为6个字符",trigger:"blur"}],phone:[{required:!0,message:"请输入手机号",trigger:"blur"},{min:11,max:11,message:"手机号不合法",trigger:"blur"}]}}},methods:{setUserInfo:function(){var e=this,i=Object(o.K)("user")&&Object(o.K)("user").userVO.id;t.a.get("/api/user/"+i).then(function(i){e.user=i.userVO})},getVerifyCode:function(){var e=this,i={id:this.user.id,mobile:this.phoneBindingForm.phone};t.a.put("/api/verify/mobile",i).then(function(i){if("ERROR"==i.msg)Object(r.a)("error",i.data);else{Object(r.a)("success",i.data),e.hasVerifyCode=!0;var n=e,t=setInterval(function(){n.codeTime>0?n.codeTime--:(clearInterval(t),n.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(e){Object(r.a)("error","绑定手机失败:"+e.data)})},bindingMobile:function(){var e=this,i={id:this.user.id,mobile:this.phoneBindingForm.phone,verifyCode:this.phoneBindingForm.verifyCode};t.a.put("/api/user/mobile",i).then(function(i){"ERROR"==i.msg?(Object(r.a)("error","绑定失败:"+i.data),e.active=1,e.phoneBindingForm.phone="",e.phoneBindingForm.verifyCode="",e.codeTime=60,e.hasVerifyCode=!1):(Object(r.a)("success","绑定成功"),e.$router.push({path:"/personal/phoneBinding"}))}).catch(function(e){Object(r.a)("error",e.data)})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},mounted:function(){this.setUserInfo()}},s={render:function(){var e=this,i=e.$createElement,n=e._self._c||i;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{"margin-top":"20px"}},[n("el-form",{staticStyle:{width:"400px"},attrs:{"label-width":"80px",rules:e.rules,model:e.phoneBindingForm}},[n("el-form-item",{attrs:{label:"手机号码",prop:"phone"}},[n("el-input",{model:{value:e.phoneBindingForm.phone,callback:function(i){e.$set(e.phoneBindingForm,"phone",i)},expression:"phoneBindingForm.phone"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"验证码",prop:"verifyCode"}},[n("el-input",{staticClass:"input-with-select",attrs:{placeholder:"验证码内容"},model:{value:e.phoneBindingForm.verifyCode,callback:function(i){e.$set(e.phoneBindingForm,"verifyCode",i)},expression:"phoneBindingForm.verifyCode"}},[n("el-button",{attrs:{slot:"append",disabled:e.hasVerifyCode},on:{click:e.getVerifyCode},slot:"append"},[e._v(e._s(e.hasVerifyCode?e.codeTime:"获取验证码")+"\n ")])],1),e._v(" "),e.hasVerifyCode?n("span",[e._v("验证码已发送到您手机上")]):e._e()],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",plain:""},on:{click:e.bindingMobile}},[e._v("完成绑定")])],1)],1)],1)},staticRenderFns:[]};var d=n("VU/8")(a,s,!1,function(e){n("qILV")},"data-v-179c8a8a",null);i.default=d.exports}});
|