(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60249ca9"],{"1b6a":function(e,t,o){"use strict";o("a7a7")},a7a7:function(e,t,o){},eb0c:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"setphone-wrap"},[t("van-nav-bar",{attrs:{fixed:"",title:e.$route.query.webtitle||e.$route.meta.title},on:{"click-left":function(t){return e.$router.go(-1)}}},[t("van-icon",{attrs:{slot:"left",name:"arrow-left",color:"#333",size:"16"},slot:"left"})],1),t("van-cell-group",[null==e.userInfo?t("van-field",{attrs:{placeholder:"请输入您的手机号码",readonly:""}}):t("van-field",{attrs:{placeholder:"请输入您的手机号码",readonly:""},model:{value:e.userInfo.mobile,callback:function(t){e.$set(e.userInfo,"mobile",t)},expression:"userInfo.mobile"}})],1),t("van-cell-group",{staticClass:"mar-top"},[t("van-field",{attrs:{maxlength:"6",placeholder:"输入图形验证码"},model:{value:e.codeNum,callback:function(t){e.codeNum=t},expression:"codeNum"}},[t("span",{staticClass:"get-code",attrs:{slot:"right-icon",size:"small",type:"primary"},domProps:{innerHTML:e._s(e.codeImg)},on:{click:e.getImageCode},slot:"right-icon"})])],1),t("van-cell-group",{staticClass:"mar-top"},[t("van-field",{attrs:{placeholder:"请输入验证码"},model:{value:e.code,callback:function(t){e.code=t},expression:"code"}},[t("span",{staticClass:"get-code",attrs:{slot:"right-icon"},domProps:{innerHTML:e._s(null==e.second?"获取验证码":e.second+"s")},on:{click:e.getCode},slot:"right-icon"})])],1),t("div",{staticClass:"btn primary-btn",on:{click:e.submit}},[e._v("保存")])],1)},n=[],a=(o("8e6e"),o("ac6a"),o("456d"),o("bd86")),r=(o("4a24"),o("2f62")),c=o("6bfd");function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,s)}return o}function l(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){Object(a["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var u={data:function(){return{code:"",second:null,timeValid:null,passStatus:!0,codeImg:"",codeNum:""}},computed:l({},Object(r["b"])(["userInfo"])),mounted:function(){this.getImageCode()},methods:{getImageCode:function(){var e=this;Object(c["a"])({url:"auth/getImageCode"}).then((function(t){e.codeImg=t.data}))},getCode:function(){var e=this;if(this.passStatus=!1,!this.codeNum)return this.$toast({message:"请输入图形验证码",position:"bottom"});var t={mobile:this.userInfo.mobile,type:4,imageCode:this.codeNum};Object(c["a"])({url:"auth/sendCode",params:t}).then((function(t){if(t.success){if(e.second=59,e.passStatus=!0,null!=e.timeValid)return;e.timeValid=setInterval((function(){if(e.second--,0==e.second)return e.second=null,clearInterval(e.timeValid),e.timeValid=null}),1e3),e.$toast({message:"验证码发送成功",position:"bottom"})}else e.getImageCode(),e.passStatus=!0})).catch((function(t){e.passStatus=!0,e.$toast(t.subMsg)}))},submit:function(){var e=this;if(!this.codeNum)return this.$toast({message:"请输入图形验证码",position:"bottom"});var t={mobile:this.userInfo.mobile,mobileCode:this.code,type:4};Object(c["a"])({url:"auth/validateMobileCode",params:t}).then((function(t){t.success?e.$router.push("/setnewphone"):e.$toast(t.subMsg)})).catch((function(t){e.$toast(t.subMsg)}))}}},d=u,m=(o("1b6a"),o("2877")),p=Object(m["a"])(d,s,n,!1,null,null,null);t["default"]=p.exports}}]);