webpackJsonp([43],{KVRR:function(e,t){},SLI2:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i("eqfM");var s=i("/QYm"),o=i("mvHQ"),n=i.n(o),a=i("CCn6"),c=i("iYfm"),r=i.n(c),l=i("sf/l"),u={name:"inspectorActivit",mounted:function(){var e=this;if(this.$sa.track("ViewActivationpage",{}),!localStorage.getItem("cc_token")){var t=l.a.getUrlParam().token||this.$route.query.token;t?(localStorage.setItem("cc_token",t),this.$store.dispatch("setToken",t)):this.$router.push({name:"author",query:{retUrl:this.$route.fullPath,is_new_user_url:1}})}Object(a.P)().then(function(t){localStorage.setItem("userDesc",n()(t)),e.userDesc=t,e.getPhone=0})},data:function(){return{logoUrl:r.a,mobile:"",time:0,flag:!0,imgCode:"",msgCode:"",timeSet:null,getPhone:"-1",userDesc:{},keyUp:!1,userCourse:{}}},watch:{keyUp:function(){var e=this;setTimeout(function(){e.keyUp||(document.documentElement.scrollTop=0,document.body.scrollTop=0)},100)}},methods:{focus:function(){this.keyUp=!0},fun:function(){this.keyUp=!1},goList:function(){this.$router.replace({name:"inspectorList"})},changeMoblie:function(){this.getPhone=0},refImgCode:function(){this.$refs.imgCode.src="/api/public/img/verify?flag="+Math.random()},sendMobileCode:function(){var e=this,t={};if(!this.mobile.match(/^1\d{10,11}$/))return Object(s.a)("请正确填写手机号"),!1;t.mobile=this.mobile,this.time=30,this.timeO(),this.$sa.track("clickSendcode",{}),Object(a._12)(t).then(function(t){"操作成功"===t?Object(s.a)("验证码已发送"):(e.time=0,Object(s.a)(t))}).catch(function(e){})},timeO:function(){var e=this;this.time>0&&(this.time--,setTimeout(function(){e.timeO()},1e3))},bindMobile:function(){var e=this;if(this.$sa.quick("trackHeatMap",this.$refs.btn),""===this.msgCode||!this.msgCode)return Object(s.a)("请填写手机验证码"),!1;var t={verify_code:this.msgCode};if(!this.mobile.match(/^1\d{10,11}$/))return Object(s.a)("请正确填写手机号"),!1;t.mobile=this.mobile,this.flag&&(this.flag=!1,window.location.href.indexOf("teacher_id")>-1&&(t.teacher_id=l.a.getParamhref().teacher_id||this.$route.query.teacher_id),t.source="login",s.a.loading({mask:!0,message:""}),Object(a.e)(t).then(function(t){Object(a.P)().then(function(t){localStorage.setItem("userDesc",n()(t)),e.flag=!0,Object(a.n)().then(function(t){s.a.clear(),e.userCourse=t,localStorage.setItem("userCourse",n()(e.userCourse)),t.teacher_alias&&1==t.teacher_alias.substr(0,1)?e.$router.push({name:"guideActivity"}):e.$router.push({name:"index"})})})}).catch(function(t){e.msgCode="",e.flag=!0}))}}},m={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("div",{staticClass:"banner-block"},[i("img",{attrs:{src:e.logoUrl}})]),e._v(" "),0==e.getPhone?i("div",{staticClass:"form-block"},[i("p",{staticClass:"text"},[e._v("课程激活")]),e._v(" "),i("div",{staticClass:"input-block"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.mobile,expression:"mobile"}],attrs:{placeholder:"请输入手机号",autofocus:"autofocus",type:"number",pattern:"[0-9]*"},domProps:{value:e.mobile},on:{blur:e.fun,focus:e.focus,input:function(t){t.target.composing||(e.mobile=t.target.value)}}})]),e._v(" "),i("p",{staticClass:"tip"},[e._v("* 如已购买课程，手机号必须填下单时填写的收件人手机号")]),e._v(" "),i("div",{staticClass:"input-block"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.msgCode,expression:"msgCode"}],attrs:{placeholder:"请输入短信验证码",oninput:"if(value.length>4)value=value.slice(0,4)",type:"number",maxlength:"4",pattern:"[0-9]*"},domProps:{value:e.msgCode},on:{blur:e.fun,focus:e.focus,input:function(t){t.target.composing||(e.msgCode=t.target.value)}}}),e._v(" "),0===e.time?i("button",{staticClass:"codeMsg right-btn",on:{click:e.sendMobileCode}},[e._v("发送验证码")]):e._e(),e._v(" "),e.time>0?i("button",{staticClass:"codeMsg disabled right-btn"},[e._v(e._s(e.time)+"s后重新发送")]):e._e()]),e._v(" "),i("div",{staticClass:"btn-block"},[i("div",{ref:"btn",staticClass:"btn",on:{click:e.bindMobile}},[e._v("\n        确定\n      ")])])]):e._e(),e._v(" "),1==e.getPhone?i("div",{staticClass:"form-block"},[i("div",{staticClass:"input-block"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.userDesc.mobile,expression:"userDesc.mobile"}],domProps:{value:e.userDesc.mobile},on:{input:function(t){t.target.composing||e.$set(e.userDesc,"mobile",t.target.value)}}}),e._v(" "),i("button",{staticClass:"codeMsg right-btn",on:{click:e.changeMoblie}},[e._v("更换手机号")])]),e._v(" "),i("p",{staticClass:"tip"},[e._v("* 如果您的订单手机号为上述手机号直接点下方确定按钮即可")]),e._v(" "),i("div",{staticClass:"btn-block"},[i("div",{ref:"btn",staticClass:"btn",staticStyle:{"margin-top":"100px"},on:{click:e.goList}},[e._v("\n        确定\n      ")])])]):e._e()])},staticRenderFns:[]};var d=i("VU/8")(u,m,!1,function(e){i("KVRR")},"data-v-6fe0f204",null);t.default=d.exports},iYfm:function(e,t,i){e.exports=i.p+"static/img/yujiBg.cceef25.png"}});