1 |
- webpackJsonp([4,29,32],{"2RsO":function(n,e,i){(e=i("yGwj")(!0)).push([n.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","",{version:3,sources:[],names:[],mappings:"",file:"ReBindingMobile.vue"}]),n.exports=e},"4z3q":function(n,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i("SQ4B"),t=i("vGYV"),r=i("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 n=this,e=Object(t.M)("user")&&Object(t.M)("user").userVO.id;o.a.get("/api/user/"+e).then(function(e){n.user=e.userVO,n.phoneBindingForm.phone=n.user.mobile})},reBindingMobile:function(){var n=this;if(this.showLoading(),0===this.active){var e={id:this.user.id,mobile:this.user.mobile,verifyCode:this.phoneBindingForm.verifyCode};o.a.put("/api/verify/old/mobile",e).then(function(e){n.hideLoading(),2e4===e.code?(Object(r.a)("success","验证成功"),n.active=1,n.phoneBindingForm.phone="",n.phoneBindingForm.verifyCode="",n.hasVerifyCode=!1,n.codeTime=60,n.setUserInfo()):(Object(r.a)("error","验证原手机失败:"+e.data),n.codeTime=60,n.hasVerifyCode=!1)}).catch(function(e){n.phoneBindingForm.phone="",n.phoneBindingForm.verifyCode="",n.codeTime=60,n.hasVerifyCode=!1,n.hideLoading(),Object(r.a)("error","验证原手机失败:"+e.data)})}else{var i={id:this.user.id,mobile:this.phoneBindingForm.newPhone,verifyCode:this.phoneBindingForm.verifyCode};o.a.put("/api/user/mobile",i).then(function(e){n.hideLoading(),"ERROR"==e.msg?Object(r.a)("error","绑定失败:"+e.data):(Object(r.a)("success","绑定成功"),n.$router.push({path:"/personal/phoneBinding"}))}).catch(function(e){n.hideLoading(),Object(r.a)("error","绑定失败:"+e.data)})}},getVerifyCode:function(){var n=this;if(0===this.active){var e={id:this.user.id,mobile:this.phoneBindingForm.phone};o.a.put("/api/verify/mobile",e).then(function(e){var i=n;if("ERROR"==e.msg)Object(r.a)("error","验证码获取失败:"+e.data);else{n.hasVerifyCode=!0,Object(r.a)("success",e.data);var o=setInterval(function(){i.codeTime>0?i.codeTime--:(clearInterval(o),i.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(n){Object(r.a)("error","获取验证码失败:"+n.data)})}else{var i={id:this.user.id,mobile:this.phoneBindingForm.newPhone};o.a.put("/api/verify/mobile",i).then(function(e){var i=n;if("ERROR"==e.msg)Object(r.a)("error","验证码获取失败:"+e.data);else{n.hasVerifyCode=!0,Object(r.a)("success",e.data);var o=setInterval(function(){i.codeTime>0?i.codeTime--:(clearInterval(o),i.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(n){Object(r.a)("error","获取验证码失败:"+n.data)})}},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},mounted:function(){this.setUserInfo()}},s=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:n.loading,expression:"loading"}]},[i("el-steps",{staticStyle:{margin:"20px"},attrs:{active:n.active,"process-status":"finish"}},[i("el-step",{attrs:{title:"验证原手机"}}),n._v(" "),i("el-step",{attrs:{title:"绑定新手机"}})],1),n._v(" "),i("el-form",{ref:n.phoneBindingForm,staticStyle:{width:"400px"},attrs:{"label-width":"80px",rules:n.rules,model:n.phoneBindingForm}},[0===n.active?i("el-form-item",{attrs:{label:"原手机号",prop:"phone"}},[i("span",{model:{value:n.phoneBindingForm.phone,callback:function(e){n.$set(n.phoneBindingForm,"phone",e)},expression:"phoneBindingForm.phone"}},[n._v(n._s(this.user.mobile))])]):n._e(),n._v(" "),1===n.active?i("el-form-item",{attrs:{label:"新手机号",prop:"newPhone"}},[i("el-input",{model:{value:n.phoneBindingForm.newPhone,callback:function(e){n.$set(n.phoneBindingForm,"newPhone",e)},expression:"phoneBindingForm.newPhone"}})],1):n._e(),n._v(" "),i("el-form-item",{attrs:{label:"验证码",prop:"verifyCode"}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:"验证码内容"},model:{value:n.phoneBindingForm.verifyCode,callback:function(e){n.$set(n.phoneBindingForm,"verifyCode",e)},expression:"phoneBindingForm.verifyCode"}},[i("el-button",{attrs:{slot:"append",disabled:n.hasVerifyCode},on:{click:n.getVerifyCode},slot:"append"},[n._v(n._s(n.hasVerifyCode?n.codeTime:"获取验证码")+"\n ")])],1),n._v(" "),n.hasVerifyCode?i("span",[n._v("验证码已发送到您手机上")]):n._e()],1),n._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",plain:""},on:{click:n.reBindingMobile}},[n._v(n._s(0===this.active?"下一步":"完成绑定")+"\n ")])],1)],1)],1)};s._withStripped=!0;var d={render:s,staticRenderFns:[]},p=d;var c=!1;var u=i("VU/8")(a,p,!1,function(n){c||i("aYoZ")},"data-v-59308709",null);u.options.__file="src/pages/UserCenter/ReBindingMobile.vue";e.default=u.exports},LMk5:function(n,e,i){(e=i("yGwj")(!0)).push([n.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","",{version:3,sources:[],names:[],mappings:"",file:"BindingMobile.vue"}]),n.exports=e},Vnik:function(n,e,i){var o=i("LMk5");"string"==typeof o&&(o=[[n.i,o,""]]),o.locals&&(n.exports=o.locals);i("rjj0")("10cf1818",o,!1,{})},aYoZ:function(n,e,i){var o=i("2RsO");"string"==typeof o&&(o=[[n.i,o,""]]),o.locals&&(n.exports=o.locals);i("rjj0")("11093844",o,!1,{})},dbOk:function(n,e,i){var o=i("r/rq");"string"==typeof o&&(o=[[n.i,o,""]]),o.locals&&(n.exports=o.locals);i("rjj0")("8510dfc4",o,!1,{})},emUe:function(n,e){n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAACZklEQVRIS7WVT0hUcRDHP/N2kUpDBS9F1EWhIlFyVysKMg8evFiGXSRvHoQg0rcLdXAvBbq70CEIIoLoUl46CdE/oYOku0sKHiyDoKRDGSZoaLv7Jt5um+7uW9eKncuDNzOf93sz35mfUMgGojW46EC0A6UOZV8qVFhAmEdljCRjhD2LTgjJezk4U47x8zIwAFQX/HDasQSEscpuEmpY3RybDfZH92PpGMKRIsBstzKLIR0Mez5mHBtg83UduCYQav4KmglWFiF5guCx+XTFbOuL7qJaYygH/wm6ccw5lqSJO54fabAZuYpwfZvQZ8ADYCdIP2hDVp5yjaD3hpDqvr4HKouCLYKEPH4CCAGxOD3uprniCdC2KXeZ5EqtYEYuItwvCoVZRrz12L0Q1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eBFZ7CyjqFnGG6ewD/Vg8oQqpdQbcDgBSMtUfyT7ajxOK2OPEuB80uhahJsDuGL9YF1G1ggKe2EPXMphD/WjVp3gd0FemOXwqF5CY6iLOPWd4i4APu5gOqO37D6rVWko85ys6w2XK4YakVAPpOU84SbvmFGPyAcKCpNpdd5QJSnJOKdVK7HCbQmUiNfpfeAC0WhsExSarca6bfALWwdG9KP6uFtQOHPSJd0CaUWUSnWZuYfS7LoM/CSXE2bu/Ofl+kvKWAJRf2+eJkAAAAASUVORK5CYII="},"r/rq":function(n,e,i){(e=i("yGwj")(!0)).push([n.i,"\n.el-input-group__append[data-v-22845712]{border-radius:0 !important\n}\n.right-modifyPsw[data-v-22845712]{padding:20px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13)\n}\n.right-modifyPsw .right-modifyPsw-title[data-v-22845712]{padding:10px;border-bottom:1px solid #ccc;margin-bottom:20px\n}\n","",{version:3,sources:["PhoneBinding.vue"],names:[],mappings:";AACA,yCAAyC;AACzC;AACA,kCAAkC,YAAY,CAAC,eAAe,CAAC,mDAAmD,CAAC;AACnH;AACA,yDAAyD,YAAY,CAAC,4BAA4B,CAAC;AACnG",file:"PhoneBinding.vue",sourcesContent:["\n.el-input-group__append[data-v-22845712]{border-radius:0 !important\n}\n.right-modifyPsw[data-v-22845712]{padding:20px;background:#fff;-webkit-box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13);box-shadow:0px 1px 6px 0px rgba(8,6,6,0.13)\n}\n.right-modifyPsw .right-modifyPsw-title[data-v-22845712]{padding:10px;border-bottom:1px solid #ccc;margin-bottom:20px\n}\n"]}]),n.exports=e},rZWl:function(n,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i("uavL"),t=i("4z3q"),r=i("vGYV"),a=i("SQ4B"),s={name:"PhoneBinding",components:{BindingMobile:o.default,ReBindingMobile:t.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 n=this;this.showLoading();var e=Object(r.M)("user")&&Object(r.M)("user").userVO.id;a.a.get("/api/user/"+e).then(function(e){n.user=e.userVO,n.hideLoading()})}},mounted:function(){this.setUserInfo()},watch:{$route:function(n,e){"/personal/phoneBinding"===n.path&&this.$router.go(0)}}},d=function(){var n=this,e=n.$createElement,o=n._self._c||e;return o("div",[o("div",{staticClass:"right-modifyPsw"},[n._m(0),n._v(" "),o("div",{directives:[{name:"loading",rawName:"v-loading",value:n.loading,expression:"loading"}]},[n.user.mobile?o("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px","margin-bottom":"30px"}},[o("img",{attrs:{src:i("emUe")}}),n._v(" "),o("span",{staticStyle:{"font-size":"16px"}},[n._v("您已绑定的手机号码是"+n._s(this.user.mobile))]),n._v(" "),o("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary",plain:"",size:"mini"},on:{click:n.changePhoneNumber}},[n._v("修改号码")])],1):n._e(),n._v(" "),n.user.mobile?n._e():o("div",{staticStyle:{"background-color":"rgba(233,239,249,1)",padding:"10px"}},[o("img",{attrs:{src:i("msK+")}}),n._v(" "),o("span",{staticStyle:{"font-size":"16px"}},[n._v("您尚未绑定手机号")]),n._v(" "),o("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"danger",plain:"",size:"mini"},on:{click:n.bindPhoneNumber}},[n._v("立即绑定")])],1)]),n._v(" "),o("router-view")],1)])};d._withStripped=!0;var p={render:d,staticRenderFns:[function(){var n=this.$createElement,e=this._self._c||n;return e("div",{staticClass:"right-modifyPsw-title"},[e("span",{staticStyle:{"font-size":"18px","font-weight":"bold"}},[this._v("手机绑定")])])}]},c=p;var u=!1;var l=i("VU/8")(s,c,!1,function(n){u||i("dbOk")},"data-v-22845712",null);l.options.__file="src/pages/UserCenter/PhoneBinding.vue";e.default=l.exports},uavL:function(n,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i("SQ4B"),t=i("vGYV"),r=i("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 n=this,e=Object(t.M)("user")&&Object(t.M)("user").userVO.id;o.a.get("/api/user/"+e).then(function(e){n.user=e.userVO})},getVerifyCode:function(){var n=this,e={id:this.user.id,mobile:this.phoneBindingForm.phone};o.a.put("/api/verify/mobile",e).then(function(e){if("ERROR"==e.msg)Object(r.a)("error",e.data);else{Object(r.a)("success",e.data),n.hasVerifyCode=!0;var i=n,o=setInterval(function(){i.codeTime>0?i.codeTime--:(clearInterval(o),i.hasVerifyCode=!1,this.codeTime=10)},1e3)}}).catch(function(n){Object(r.a)("error","绑定手机失败:"+n.data)})},bindingMobile:function(){var n=this,e={id:this.user.id,mobile:this.phoneBindingForm.phone,verifyCode:this.phoneBindingForm.verifyCode};o.a.put("/api/user/mobile",e).then(function(e){"ERROR"==e.msg?(Object(r.a)("error","绑定失败:"+e.data),n.active=1,n.phoneBindingForm.phone="",n.phoneBindingForm.verifyCode="",n.codeTime=60,n.hasVerifyCode=!1):(Object(r.a)("success","绑定成功"),n.$router.push({path:"/personal/phoneBinding"}))}).catch(function(n){Object(r.a)("error",n.data)})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1}},mounted:function(){this.setUserInfo()}},s=function(){var n=this,e=n.$createElement,i=n._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:n.loading,expression:"loading"}],staticStyle:{"margin-top":"20px"}},[i("el-form",{staticStyle:{width:"400px"},attrs:{"label-width":"80px",rules:n.rules,model:n.phoneBindingForm}},[i("el-form-item",{attrs:{label:"手机号码",prop:"phone"}},[i("el-input",{model:{value:n.phoneBindingForm.phone,callback:function(e){n.$set(n.phoneBindingForm,"phone",e)},expression:"phoneBindingForm.phone"}})],1),n._v(" "),i("el-form-item",{attrs:{label:"验证码",prop:"verifyCode"}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:"验证码内容"},model:{value:n.phoneBindingForm.verifyCode,callback:function(e){n.$set(n.phoneBindingForm,"verifyCode",e)},expression:"phoneBindingForm.verifyCode"}},[i("el-button",{attrs:{slot:"append",disabled:n.hasVerifyCode},on:{click:n.getVerifyCode},slot:"append"},[n._v(n._s(n.hasVerifyCode?n.codeTime:"获取验证码")+"\n ")])],1),n._v(" "),n.hasVerifyCode?i("span",[n._v("验证码已发送到您手机上")]):n._e()],1),n._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",plain:""},on:{click:n.bindingMobile}},[n._v("完成绑定")])],1)],1)],1)};s._withStripped=!0;var d={render:s,staticRenderFns:[]},p=d;var c=!1;var u=i("VU/8")(a,p,!1,function(n){c||i("Vnik")},"data-v-69d47c3c",null);u.options.__file="src/pages/UserCenter/BindingMobile.vue";e.default=u.exports}});
|