1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AppLogin"],{"47ad":function(t,e,n){},6354:function(t,e,n){"use strict";var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("van-popup",{staticClass:"imgCodePopup",attrs:{"close-on-click-overlay":!1,closeable:"","close-icon":"close"},on:{close:t.onClose},model:{value:t.showImgCode,callback:function(e){t.showImgCode=e},expression:"showImgCode"}},[n("div",{staticClass:"imgCode"},[n("p",{staticClass:"codeTitle"},[t._v("输入图形验证码")]),n("van-row",{attrs:{type:"flex"}},[n("van-col",{attrs:{span:"14"}},[n("van-field",{staticStyle:{background:"#F4F4F4",padding:".12rem .16rem"},attrs:{placeholder:"请输入验证码"},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1),n("van-col",{staticClass:"img",attrs:{span:"10"}},[n("van-image",{attrs:{src:t.identifyingCode},on:{click:function(e){return t.updateIdentifyingCode(!0)}},scopedSlots:t._u([{key:"loading",fn:function(){return[n("van-loading",{attrs:{type:"spinner",size:"20"}})]},proxy:!0}])})],1)],1),n("van-row",[n("van-col",{attrs:{span:"14"}}),n("van-col",{attrs:{span:"10"}},[n("span",{staticClass:"imgChange",on:{click:function(e){return t.updateIdentifyingCode(!0)}}},[t._v("看不清?换一换")])])],1)],1)])},r=[],i=n("b562");function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(R){u=function(t,e,n){return t[e]=n}}function l(t,e,n,o){var r=e&&e.prototype instanceof d?e:d,i=Object.create(r.prototype),a=new S(o||[]);return i._invoke=function(t,e,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return L()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var c=h(t,e,n);if("normal"===c.type){if(o=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(R){return{type:"throw",arg:R}}}t.wrap=l;var p={};function d(){}function f(){}function m(){}var g={};u(g,r,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(C([])));y&&y!==e&&n.call(y,r)&&(g=y);var w=m.prototype=d.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function o(r,i,s,c){var u=h(t[r],t,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==a(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){o("next",t,s,c)}),(function(t){o("throw",t,s,c)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return o("throw",t,s,c)}))}c(u.arg)}var r;this._invoke=function(t,n){function i(){return new e((function(e,r){o(t,n,e,r)}))}return r=r?r.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,p;var r=o.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return f.prototype=m,u(w,"constructor",m),u(m,"constructor",f),f.displayName=u(m,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(k.prototype),u(k.prototype,i,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new k(l(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(w),u(w,c,"Generator"),u(w,r,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},t.values=C,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return a.type="throw",a.arg=t,e.next=n,o&&(e.method="next",e.arg=void 0),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;I(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function c(t,e,n,o,r,i,a){try{var s=t[i](a),c=s.value}catch(u){return void n(u)}s.done?e(c):Promise.resolve(c).then(o,r)}function u(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var i=t.apply(e,n);function a(t){c(i,o,r,a,s,"next",t)}function s(t){c(i,o,r,a,s,"throw",t)}a(void 0)}))}}var l={name:"imgCode",props:{value:Boolean,phone:String||Number},data:function(){var t=window.location.origin;return{showImgCode:this.value,identifyingCode:t+"/api-teacher/code/getLoginImage?phone="+this.phone,code:null}},mounted:function(){var t=u(s().mark((function t(){return s().wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),methods:{updateIdentifyingCode:function(){var t=u(s().mark((function t(){var e;return s().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=window.location.origin,this.identifyingCode="".concat(e,"/api-teacher/code/getLoginImage?phone=").concat(this.phone,"&token=").concat(Math.random());case 2:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),checkVerifyLoginImage:function(){var t=u(s().mark((function t(){return s().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,!(this.code.length<4)){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,Object(i["u"])({phone:this.phone,code:this.code});case 5:return t.next=7,Object(i["n"])({mobile:this.phone});case 7:this.$toast("验证码已发送"),this.$emit("input",!1),this.$emit("onCodeSend",!0),t.next=15;break;case 12:t.prev=12,t.t0=t["catch"](0),this.updateIdentifyingCode();case 15:case"end":return t.stop()}}),t,this,[[0,12]])})));function e(){return t.apply(this,arguments)}return e}(),onClose:function(){this.$emit("input",!1)}},watch:{code:function(t){t.length>=4&&this.checkVerifyLoginImage()}}},h=l,p=(n("a654"),n("2877")),d=Object(p["a"])(h,o,r,!1,null,"732d6116",null);e["a"]=d.exports},"9d64":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUQAAABaCAMAAAD3n9+rAAABNVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8BwbUUxrsNxbn4/v0eyb7v/Ptz3ddb2NCi6eRp29RB0snX9vQ4z8YlysC07uqX5uG/8O2r6+ff+PbN8/Hn+vnG8u/S9fKP5N+H4t1L1Mxg2dFW1s5R1c1H08oyzsR+4NopzMJi2dIuzGsgAAAARHRSTlMA5i4ftQTXEmFTg9odCBSWeDQOXKROt3X9RgyB7Uzx0wL79UI847oG+OrMKsWwrW/5yZMZJF5piIxkn1nA39yZp3x+gHwyDdUAAAy8SURBVHja7NppVxJRHMfxP8hqDSli4oTsMMgmW5KaWfbDrbJFS8v2zPf/EmKYueLAHWa4w7HOoc9DfTJ89c69/3ugAXKwUannUhhLKlevNIIy/dclbXgKEFbwbEg07ZKBHBzKBZI01TIJTEAiQ1NsLoqJiM7RtJIimJjIlL4ZpTImqDydFSOYqAhNoTlM2BS+FzNRTFh06vboZAJ2HH3b3/v19fNH2JFIkoUZTZPMyDMamSZHcmezWT+Jac6HyVQAthx3NK/PYUOARvKWoVsjvmwcmniTJiRTTaErPU8iGlGk18mElIMthx3m5REs5SQa5QF0hRJxSU+gy5OVZGkxaGFhfS7yBLoqDZDX2qoNL1n8q6XcxLcBe/Y6136fwdIGjTCfgm6XSAn1yaRrQJduEflDfcmh3A/SYAQPDxVoHpG5p1AtEZ8HjHVEZu8CVjxkTklAl/AaHyCa9/f3OvbYpRr60gOfQ05gTPUmDYix3xBjlmmWuOQCGBsRf3c07yxXdEEmU+3rZvNEW5zTkbwNXTFJybpx5w/RTVWMZzVAQ+LQFEUjBsHYiYgPv7SKX2ElaGMxN4j8qzBYpK4dqPSX0BoMtiW6oYWxFNfDZC+itNF+qIyM6F+fXTS8fGxHBL5pFU9goUEmJB90OZlogS3HWLVr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T44vmyxieZATVmTkRi+HmWCJDZpwISg4sU2CEiRMM8UopoquykEodHLzPuKb/XlKhAmatGmXPcrNdq9SZsuVQalstc4TjRNR0YRSghtttXopzcCys7WpDC3gMboiSCowuusZQ25vjSvOCa41umMZhhM0SMKC/Nwqy6qFVc2dGl//o3+g5v+pZK/+F4+J9vmfIGG8oTUTZlDzD25KepVdwiRSi7d1jhXddWEUq/i45BiZhSUGKrDLFAOrARKERVGd21MLXCslesVfRuKqoLVTc9aq8cKlkthalFUiE/MeeA0lwoSGzj3zsofUqJOtwRLswr9a6ancoff53mr55kvTAvJrrqtsSqwDz+LDNP/hUe/7Y7k05H3rw0JeK3WiL65GF9MikRPSlWrsekbP5jYfIAh8mjRB4Nk4faTB6v9FiYPOhr8si5R8Tk4Ydj8BtP5UjXgZbThAAAAABJRU5ErkJggg=="},a654:function(t,e,n){"use strict";n("47ad")},b1c2:function(t,e,n){},bb23:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"login"},[t._m(0),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isTrue,expression:"isTrue"}],staticClass:"container"},[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.phoneNumber,expression:"phoneNumber"}],staticClass:"input",attrs:{type:"number",placeholder:"请输入手机号",maxlength:"11",minlength:"11",pattern:"[0-9]"},domProps:{value:t.phoneNumber},on:{keyup:function(e){return t.onKeyUp()},input:function(e){e.target.composing||(t.phoneNumber=e.target.value)}}})]),n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],staticClass:"input",attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:t.password},on:{keyup:function(e){return t.onKeyUp()},input:function(e){e.target.composing||(t.password=e.target.value)}}})]),n("van-button",{attrs:{round:"",size:"large",disabled:t.pwdDisable},on:{click:t.onLogin}},[t._v("登录")]),n("span",{staticClass:"login-change",on:{click:function(e){t.isTrue=!1}}},[t._v("验证码登录")]),n("span",{staticClass:"login-change",staticStyle:{float:"left"},on:{click:t.onRegister}},[t._v("立即注册")])],1),n("div",{directives:[{name:"show",rawName:"v-show",value:!t.isTrue,expression:"!isTrue"}],staticClass:"container"},[n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.phoneNumber,expression:"phoneNumber"}],staticClass:"input",attrs:{type:"number",placeholder:"请输入手机号",maxlength:"11",minlength:"11",pattern:"[0-9]"},domProps:{value:t.phoneNumber},on:{keyup:function(e){return t.onKeyUp()},input:function(e){e.target.composing||(t.phoneNumber=e.target.value)}}})]),n("div",{staticClass:"input-group"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.code,expression:"code"}],staticClass:"input",attrs:{type:"text",placeholder:"请输入验证码",minlength:"6",maxlength:"6"},domProps:{value:t.code},on:{keyup:function(e){return t.onKeyUp()},input:function(e){e.target.composing||(t.code=e.target.value)}}}),n("span",{directives:[{name:"show",rawName:"v-show",value:t.countDownStatus,expression:"countDownStatus"}],staticClass:"code-text",on:{click:t.onSendCode}},[t._v(t._s(t.codeText))]),n("span",{directives:[{name:"show",rawName:"v-show",value:!t.countDownStatus,expression:"!countDownStatus"}],staticClass:"code-text"},[n("van-count-down",{ref:"countdown",attrs:{"auto-start":!1,time:t.countDownTime,format:"ss秒"},on:{finish:t.onFinished}})],1)]),n("van-button",{attrs:{round:"",size:"large",disabled:t.codeDisable},on:{click:t.onCodeLogin}},[t._v("登录")]),n("span",{staticClass:"login-change",on:{click:function(e){t.isTrue=!0}}},[t._v("密码登录")]),n("span",{staticClass:"login-change",staticStyle:{float:"left"},on:{click:t.onRegister}},[t._v("立即注册")]),t.showImgCode?n("m-img-code",{attrs:{phone:t.phoneNumber},on:{onCodeSend:t.onCodeSend},model:{value:t.showImgCode,callback:function(e){t.showImgCode=e},expression:"showImgCode"}}):t._e()],1)])},r=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"logo"},[o("img",{attrs:{src:n("9d64"),alt:""}})])}],i=n("b562"),a=n("6354"),s={name:"login",components:{MImgCode:a["a"]},data:function(){return{groupId:this.$route.query.groupId,pwdDisable:!0,codeDisable:!0,isTrue:!0,countDownStatus:!0,phoneNumber:null,password:null,code:null,codeText:"获取验证码",countDownTime:12e4,isClick:!1,showImgCode:!1}},mounted:function(){localStorage.removeItem("userInfo"),localStorage.removeItem("Authorization")},methods:{onKeyUp:function(){this.isTrue?this.phoneNumber&&this.password?this.pwdDisable=!1:this.pwdDisable=!0:this.phoneNumber&&this.code?this.codeDisable=!1:this.codeDisable=!0},onRegister:function(){this.$router.push({path:"/appRegister",query:{groupId:this.groupId}})},onSendCode:function(){var t=this;this.checkPhone(this.phoneNumber)&&Object(i["l"])({mobile:this.phoneNumber}).then((function(e){var n=e.data;200==n.code?1==n.data?t.showImgCode=!0:t.$dialog.confirm({message:"此手机号尚未注册<br/>是否注册?",confirmButtonText:"注册"}).then((function(){t.$router.push({path:"/appRegister",query:{groupId:t.groupId}})})).catch((function(){})):t.$toast(n.msg)}))},onCodeSend:function(){this.countDownStatus=!1,this.$refs.countdown.start()},onCodeLogin:function(){var t=this;if(!this.isClick){this.isClick=!0;var e={clientId:"student",clientSecret:"student",phone:this.phoneNumber,smsCode:this.code,channel:"H5"};Object(i["o"])(e).then((function(e){var n=e.data;if(t.isClick=!1,200==n.code){var o=n.data.authentication;localStorage.setItem("userInfo",o.token_type+" "+o.access_token),n.data.password?t.$router.push({path:"/classDetail",query:{groupId:t.groupId}}):t.$router.push({path:"/appSetInfo",query:{groupId:t.groupId}})}else 99==n.code?t.$dialog.confirm({message:"此手机号尚未注册<br/>是否注册?",confirmButtonText:"注册"}).then((function(){t.$router.push({path:"/appRegister",query:{groupId:t.groupId}})})).catch((function(){})):t.$toast(n.msg)}))}},onLogin:function(){var t=this;this.isClick||(this.isClick=!0,Object(i["t"])({clientId:"student",clientSecret:"student",username:this.phoneNumber,password:this.password}).then((function(e){var n=e.data;if(t.isClick=!1,200==n.code){var o=n.data.authentication;localStorage.setItem("userInfo",o.token_type+" "+o.access_token),t.$router.push({path:"/classDetail",query:{groupId:t.groupId}})}else 99==n.code?t.$dialog.confirm({message:"此手机号尚未注册<br/>是否注册?",confirmButtonText:"注册"}).then((function(){t.$router.push({path:"/appRegister",query:{groupId:t.groupId}})})).catch((function(){})):t.$toast(n.msg)})))},onFinished:function(){this.countDownStatus=!0,this.$refs.countdown.reset()},checkPhone:function(t){var e=!0;return/^1(3|4|5|6|7|8|9)\d{9}$/.test(t)||(this.$toast("手机号输入有误"),e=!1),e}}},c=s,u=(n("d4b3"),n("2877")),l=Object(u["a"])(c,o,r,!1,null,"2352a7de",null);e["default"]=l.exports},d4b3:function(t,e,n){"use strict";n("b1c2")}}]);
|