!function(){function e(e,n,t,r,o,a,i){try{var s=e[a](i),u=s.value}catch(l){return void t(l)}s.done?n(u):Promise.resolve(u).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=n.apply(t,r);function s(n){e(i,o,a,s,u,"next",n)}function u(n){e(i,o,a,s,u,"throw",n)}s(void 0)}))}}function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,a=[],i=!0,s=!1;try{for(t=t.call(e);!(i=(r=t.next()).done)&&(a.push(r.value),!n||a.length!==n);i=!0);}catch(u){s=!0,o=u}finally{try{i||null==t.return||t.return()}finally{if(s)throw o}}return a}(e,n)||a(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,n){if(e){if("string"==typeof e)return i(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,n):void 0}}function i(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t.5?1:-1})),n},u=h((function(){return"custom"===e.theme?(n=s(),t=e.extraKey,1===(o=Array.isArray(t)?t:[t]).length?n.push({text:0,wider:!0},{text:o[0],type:"extra"}):2===o.length&&n.push({text:o[0],type:"extra"},{text:0},{text:o[1],type:"extra"}),n):[].concat(r(s()),[{text:e.extraKey,type:"extra"},{text:0},{text:e.showDeleteKey?e.deleteButtonText:"",type:e.showDeleteKey?"delete":""}]);var n,t,o})),c=function(){e.show&&t("blur")},d=function(){t("close"),e.blurOnClose&&c()},m=function(){return t(e.show?"show":"hide")},p=function(n,r){if(""!==n){var o=e.modelValue;"delete"===r?(t("delete"),t("update:modelValue",o.slice(0,o.length-1))):"close"===r?d():o.length0?e.countDownTime--:(e.countDownStatus=!0,clearInterval(e.countTimer))}),1e3)},onLogin:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,S.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:e.phone,smsCode:e.smsCode,isSurportRegister:!0}});case 3:t=n.sent,r=t.data.authentication,D(r.token_type+" "+r.access_token),window.history.go(-1),e.onLoginSuccess(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(0);case 12:case"end":return n.stop()}}),n,null,[[0,10]])})))()}},render:function(){var e=this;return i(L,null,[i("div",{class:De.loginCode},[i(U,{border:!1,background:"transparent",title:" ",isBack:!0},null),i("div",{class:De.codeTips},[i("p",{class:De.txt},[B("输入验证码")]),i("p",{class:De.codeTxt},[B("已发送6位验证码至 "),i("span",null,[this.phone])])]),i(ge,{value:this.smsCode,focused:this.showKeyboard,length:6,onFocus:function(){e.showKeyboard=!0},gutter:10},null),i(de,{modelValue:this.smsCode,"onUpdate:modelValue":function(n){return e.smsCode=n},show:this.showKeyboard,maxlength:6,onBlur:function(){e.showKeyboard=!1}},null),i("div",{class:De.btnWrap},[i(N,{type:"primary",round:!0,onClick:this.onSendSms,disabled:!this.countDownStatus},{default:function(){return[B("重新发送 "),!e.countDownStatus&&i(L,null,[B("("),e.countDownTime,B(")")])]}})])]),this.imgCodeStatus?i(Y,{value:this.imgCodeStatus,"onUpdate:value":function(n){return e.imgCodeStatus=n},phone:this.$props.phone,onClose:function(){e.imgCodeStatus=!1},onSendCode:this.onCountDown},null):null])}}),Ne="_teacherChange_1l022_1",Le="_changeInfo_1l022_6",He="_txt_1l022_24",Re="_name_1l022_25",Me="_changeTips_1l022_39",qe=s({name:"teacherChange",props:{changeInfo:{type:Object,default:function(){return{}}},onClose:{type:Function,default:function(){}},onChangeTeacher:{type:Function,default:function(e){}}},computed:{teacherInfo:function(){var e=this.changeInfo,n=e.old,t=e.now;return{oldName:n.username,oldAvatar:n.avatar,nowName:t.username,nowAvatar:t.avatar}}},render:function(){var e=this;return i("div",{class:Ne},[i("div",{class:Le},[i(O,null,{default:function(){return[i(Q,{span:12,class:He},{default:function(){return[B("您已绑定")]}}),i(Q,{span:12,class:Re},{default:function(){return[i("img",{src:e.teacherInfo.oldAvatar||P},null),i("span",null,[e.teacherInfo.oldName])]}})]}}),i(O,null,{default:function(){return[i(Q,{span:12,class:He},{default:function(){return[B("是否更换为")]}}),i(Q,{span:12,class:Re},{default:function(){return[i("img",{src:e.teacherInfo.nowAvatar||P},null),i("span",null,[e.teacherInfo.nowName])]}})]}})]),i("div",{class:Me},[i("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABXFJREFUaN7dmmtTU1cUhsNP8WdYOzjTD1Xb6Uw7WiveWlsvVUArAZRLIECAnAAhhEtIQFRKLWqpgmMdLWCFIIpCpQYJKHCCClUM8aN+evph7wwhRg0JSZHM7JnMnMnOes+z1nv2WXtrNO/5AAn4phOZ9yjMe3rwqrPMq6/wqizrEHPOMu/pYd6j4JtOBBI00XzwerbgVd3LHmz4w43Xs2Xpgb9U1+BV+//HwINHPy/VNeEF73u8Hq86t4KC9485fI/Xvz/4efX1CgzeXyev3ypCps3cig0+kESodFphOf/emgjlNnxYQ7oTkBAzq1Rd4LoNg70w6ISRO+B5sHwWCwkafNOJyxr0Uzd0X4JmB9it4KiBhjpotMEJB5xogLNn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8W4YuiauPboDtRlwPIBGThLYdXC6BM5bobMVxm4vSxdEE1HwT0bEXetugewvQbsB0j+DlhKYGRXXus5A/nYw7IGe32LW4Fq6gJlRyP4CnDIodRjsxyDtU9BuAn0S3OqQr5wuUegx7NBF9lKf9xWkfgy2NPBI53C2gW6zSKv0TXDZEY9u9avI2irt1ZCyFlLXQeZG6GoWafNkBE7miZRqVeLRI52NrLE1NwHm/ZC8FlI+EjQsh2DirnzdHI7KWZbW2Jr3KJE9xCbgvAm0nwghqesgYwPcvx7HDQ+PEn1z99k43O+GoavgGY5vi903nRjb9nqsdzD927Af9AbHqthiWhWbfB/8Nuuq2OheFUcNVsVhj5DHbbyqKW7HbbyqKdzjNv8BYjqelRrm8xEAAAAASUVORK5CYII="},null),i("span",null,[B("更换后原老师已排课程可继续上课")])]),i("div",{class:["btnGroup","btnMore"]},[i(N,{type:"primary",round:!0,plain:!0,onClick:function(){e.onClose()}},{default:function(){return[B("不更换")]}}),i(N,{type:"primary",round:!0,onClick:function(){e.onChangeTeacher(!0)}},{default:function(){return[B("更换")]}})])])}});e("default",s({name:"login",data:function(){return{id:this.$route.query.id,username:"",teacherInfo:{},imgCodeStatus:!1,checked:!1,teacherChangeStatus:!1,changeInfo:{},showTips:!1,navBarHeight:0}},computed:{codeDisable:function(){return console.log(!!this.username),!!this.username}},mounted:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return H(),R({api:"getNavHeight"},(function(n){var t=n.content,r=t.dpi||2;if(t.navHeight){var o=t.navHeight/r;e.navBarHeight=o}})),n.prev=2,n.next=5,S.get("/api-student/open/getTeacher",{params:{userId:e.id}});case 5:if(t=n.sent,e.teacherInfo=t.data||{},1!=e.teacherInfo.lockFlag){n.next=10;break}return setTimeout((function(){M("该老师已被冻结")}),100),n.abrupt("return");case 10:n.next=14;break;case 12:n.prev=12,n.t0=n.catch(2);case 14:case"end":return n.stop()}}),n,null,[[2,12]])})))()},methods:{onBack:function(){q().isApp?R({api:"goBack"}):this.$router.back()},onSendCode:function(){var e=this;return n(regeneratorRuntime.mark((function n(){var t,r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(1!=e.teacherInfo.lockFlag){n.next=2;break}return n.abrupt("return",M("该老师已被冻结"));case 2:if(J(e.username)){n.next=4;break}return n.abrupt("return",M("请输入正确的手机号码"));case 4:if(e.checked){n.next=6;break}return n.abrupt("return",M("请阅读并同意协议"));case 6:return n.prev=6,n.next=9,S.get("/api-student/open/checkPhone?phone="+e.username);case 9:t=n.sent,r=t.data,console.log(r),r?e.imgCodeStatus=!0:e.showTips=!0,n.next=17;break;case 15:n.prev=15,n.t0=n.catch(6);case 17:case"end":return n.stop()}}),n,null,[[6,15]])})))()},previewProtocol:function(e){"user"===e?this.$router.push({path:"/registerProtocol",query:{showHeader:1}}):"privacy"===e&&this.$router.push({path:"/privacyProtocol",query:{showHeader:1}})},onLoginSuccess:function(){var e=arguments,t=this;return n(regeneratorRuntime.mark((function n(){var r,o,a,i,s;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.length>0&&void 0!==e[0]&&e[0],n.prev=1,n.next=4,S.get("/api-student/open/bindTeacher",{params:{phone:t.username,userId:t.id,isUpdate:r}});case 4:o=n.sent,t.changeInfo=o.data||{},a=o.data,i=a.old,s=a.now,!r&&s&&i&&s.userId!==i.userId?t.teacherChangeStatus=!0:i&&i.userId===s.userId?setTimeout((function(){M("您已绑定该老师")}),100):(setTimeout((function(){M("您已成功绑定老师")}),100),t.$router.push("/inviteSuccess")),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(1);case 12:case"end":return n.stop()}}),n,null,[[1,10]])})))()}},render:function(){var e=this;return i("div",{class:ye},[q().isApp&&i(K,{name:"arrow-left",class:_e,style:{top:"calc(".concat(this.navBarHeight,"px + 12px)")},onClick:this.onBack},null),i("div",{class:be},[i("img",{src:"data:image/png;base64,iVBORw0K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7wpIXATSmglcWnBPxjEv2ZRy3fIU4A453s6YCjQ+H9A9BMA/ctZ/N5DNKcPLFZhOQOBxIvR6n8+nJcTwguY+RQZyS8pwyBdMFyfAC/R6jJdD5Je5r08D2ZI6/C2G5zvoBLotGAzq9SpCLN/O/U8NZGsateIjFh7wUnFwjyVoCQZ1YMsgZ/W2NCIHdXexcKdJG8PLrBaLJWjDnk+OvDydKrfvDIaHTEa7XsmMuyP3WkFaaCz2cBa3kGRdWiV03Rk2cr+R9Fp8OhXULDRp8HqtZihyH3DW7vCSm9Krz5urAe402gGuLzJr1LSNJEmDwQZ1qJxT/OwmDTVpFv+1pxwhkz8G15JYeENlA5wz19CYdttSVl+NbTFE4HrSDnAlAfD2xIXHDKMZ9ERNo3ZjNHLSDiLFbEvUk1DrWQytGTVc69qOWcfhaiPIrsddizwx9Dqrd0Om3VzJQNuHkfaRMb8f6MpIvzWQ8CY6zLPJLTltMvn9BkkEfrwy5spJazlPeL0J5FdKJpq5Z1F6m+VXmB98ExQlTpMvroE+vlXEasNJywV+7XlZQyjkdJISFi6NDC1u49YzfDh4X8QP/jAQCIWMRKQ7jw4tbm9dt1v/opsfvN7hCATskiqG251ri3yvm0V84GWPHCALDFuicFV0IvK6XMQHfq4hHw5I2u0ujIvcw0Zu1r68IOIDDzfmgxxqdwVMiTjjFvPv8zxnXKW7qzHeyxSuZTjwH5v4D9DW7wso8vMDOiYxcvVwqYg3HNSzrxrwIbM4LhXbIc2Tw3NSOlt2NDqAb9cq2Wx5NtyT0tAy5XFrz47RxtPVpjed7YO94RTHrYIOigUdcQs6nBf0WkHICxFBr3IEvYQS8vpMyIs/Qa8shbxsFfKaWMgLbmGv5oX/UoGgX4f4B/PM8zgpeF23AAAAAElFTkSuQmCC",alt:""},null),i("p",null,[i("span",{class:we},[B("酷乐秀")]),i("span",null,[B("你的器乐学习好帮手")])])]),i("div",{class:Ae},[i("div",{class:je},[i("img",{src:this.teacherInfo.avatar||P,alt:""},null)]),i("div",{class:ze},[i("span",null,[this.teacherInfo.username])," ",B("老师邀请您注册酷乐秀一起体验器乐学习的乐趣吧!")])]),i(F,{class:ke,border:!1},{default:function(){return[i(O,{style:{marginBottom:"16px"}},{default:function(){return[i(Q,{span:24,class:xe},{default:function(){return[B("手机号")]}}),i(Q,{span:24,class:"van-hairline--bottom"},{default:function(){return[i(E,{modelValue:e.username,"onUpdate:modelValue":function(n){return e.username=n},name:"手机号",placeholder:"请输入您的手机号",type:"tel",maxlength:11},null)]}})]}}),i("div",{class:Ce},[B("未注册的手机号码将自动注册酷乐秀账号")])]}}),i("div",{class:ke},[i(N,{round:!0,block:!0,type:"primary",disabled:!this.codeDisable,onClick:this.onSendCode},{default:function(){return[B("获取短信验证码")]}})]),i("div",{class:Ie},[i(W,{modelValue:this.checked,"onUpdate:modelValue":function(n){return e.checked=n}},{default:function(){return[B("我已阅读并同意")]},icon:function(e){return i(K,{class:Se,name:e.checked?Z:G,size:"15"},null)}}),i("span",{class:Te,onClick:function(){e.previewProtocol("user")}},[B("《用户注册协议》")]),B("和"),i("span",{class:Te,onClick:function(){e.previewProtocol("privacy")}},[B("《隐私政策》")])]),i(X,{modelValue:this.imgCodeStatus,"onUpdate:modelValue":function(n){return e.imgCodeStatus=n}},{default:function(){return[e.imgCodeStatus&&i(Be,{phone:e.username,onLoginSuccess:e.onLoginSuccess},null)]}}),i(V,{show:this.teacherChangeStatus,round:!0},{default:function(){return[i(qe,{changeInfo:e.changeInfo,onClose:function(){e.teacherChangeStatus=!1,e.$router.push("/inviteSuccess")},onChangeTeacher:function(n){e.onLoginSuccess(n)}},null)]}}),i($,{show:this.showTips,message:"您已绑定机构,无法再绑定老师",showButton:!0,buttonText:"确定",onConfirm:function(){e.showTips=!1}},null)])}}))}}}))}();