| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AppRegister"],{4127:function(e,t,r){"use strict";var n=r("d2334"),o=r("b313"),i=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,s=Array.prototype.push,c=function(e,t){s.apply(e,u(t)?t:[t])},l=Date.prototype.toISOString,f=o["default"],d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return l.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return"string"===typeof e||"number"===typeof e||"boolean"===typeof e||"symbol"===typeof e||"bigint"===typeof e},h=function e(t,r,o,i,a,s,l,f,h,m,y,g,b){var v=t;if("function"===typeof l?v=l(r,v):v instanceof Date?v=m(v):"comma"===o&&u(v)&&(v=n.maybeMap(v,(function(e){return e instanceof Date?m(e):e})).join(",")),null===v){if(i)return s&&!g?s(r,d.encoder,b,"key"):r;v=""}if(p(v)||n.isBuffer(v)){if(s){var w=g?r:s(r,d.encoder,b,"key");return[y(w)+"="+y(s(v,d.encoder,b,"value"))]}return[y(r)+"="+y(String(v))]}var S,O=[];if("undefined"===typeof v)return O;if(u(l))S=l;else{var j=Object.keys(v);S=f?j.sort(f):j}for(var N=0;N<S.length;++N){var C=S[N],x=v[C];if(!a||null!==x){var k=u(v)?"function"===typeof o?o(r,C):r:r+(h?"."+C:"["+C+"]");c(O,e(x,k,o,i,a,s,l,f,h,m,y,g,b))}}return O},m=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=o["default"];if("undefined"!==typeof e.format){if(!i.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=o.formatters[r],a=d.filter;return("function"===typeof e.filter||u(e.filter))&&(a=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?d.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:d.encode,encoder:"function"===typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:a,formatter:n,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}};e.exports=function(e,t){var r,n,o=e,i=m(t);"function"===typeof i.filter?(n=i.filter,o=n("",o)):u(i.filter)&&(n=i.filter,r=n);var s,l=[];if("object"!==typeof o||null===o)return"";s=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[s];r||(r=Object.keys(o)),i.sort&&r.sort(i.sort);for(var d=0;d<r.length;++d){var p=r[d];i.skipNulls&&null===o[p]||c(l,h(o[p],p,f,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.formatter,i.encodeValuesOnly,i.charset))}var y=l.join(i.delimiter),g=!0===i.addQueryPrefix?"?":"";return i.charsetSentinel&&("iso-8859-1"===i.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),y.length>0?g+y:""}},4328:function(e,t,r){"use strict";var n=r("4127"),o=r("9e6a"),i=r("b313");e.exports={formats:i,parse:o,stringify:n}},"8e0d":function(e,t,r){"use strict";var n=r("fd2d"),o=r.n(n);o.a},"9d64":function(e,t,r){e.exports=r.p+"img/logo.334a5ce4.png"},"9e6a":function(e,t,r){"use strict";var n=r("d2334"),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",f=function(e,t){var r,f={},d=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,h=d.split(t.delimiter,p),m=-1,y=t.charset;if(t.charsetSentinel)for(r=0;r<h.length;++r)0===h[r].indexOf("utf8=")&&(h[r]===l?y="utf-8":h[r]===c&&(y="iso-8859-1"),m=r,r=h.length);for(r=0;r<h.length;++r)if(r!==m){var g,b,v=h[r],w=v.indexOf("]="),S=-1===w?v.indexOf("="):w+1;-1===S?(g=t.decoder(v,a.decoder,y,"key"),b=t.strictNullHandling?null:""):(g=t.decoder(v.slice(0,S),a.decoder,y,"key"),b=n.maybeMap(s(v.slice(S+1),t),(function(e){return t.decoder(e,a.decoder,y,"value")}))),b&&t.interpretNumericEntities&&"iso-8859-1"===y&&(b=u(b)),v.indexOf("[]=")>-1&&(b=i(b)?[b]:b),o.call(f,g)?f[g]=n.combine(f[g],b):f[g]=b}return f},d=function(e,t,r,n){for(var o=n?t:s(t,r),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&u!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[],a[l]=o):a[c]=o:a={0:o}}o=a}return o},p=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,s=r.depth>0&&a.exec(i),c=s?i.slice(0,s.index):i,l=[];if(c){if(!r.plainObjects&&o.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}var f=0;while(r.depth>0&&null!==(s=u.exec(i))&&f<r.depth){if(f+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),d(l,t,r,n)}},h=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?a.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:a.comma,decoder:"function"===typeof e.decoder?e.decoder:a.decoder,delimiter:"string"===typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}};e.exports=function(e,t){var r=h(t);if(""===e||null===e||"undefined"===typeof e)return r.plainObjects?Object.create(null):{};for(var o="string"===typeof e?f(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(o),u=0;u<a.length;++u){var s=a[u],c=p(s,o[s],r,"string"===typeof e);i=n.merge(i,c,r)}return n.compact(i)}},b313:function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r("d2334"),a={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:a.RFC3986,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}}},a)},b562:function(e,t,r){"use strict";r.d(t,"s",(function(){return u})),r.d(t,"m",(function(){return s})),r.d(t,"n",(function(){return c})),r.d(t,"r",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return h})),r.d(t,"o",(function(){return m})),r.d(t,"j",(function(){return y})),r.d(t,"g",(function(){return S})),r.d(t,"h",(function(){return O})),r.d(t,"p",(function(){return g})),r.d(t,"q",(function(){return b})),r.d(t,"l",(function(){return j})),r.d(t,"d",(function(){return v})),r.d(t,"i",(function(){return w})),r.d(t,"f",(function(){return N})),r.d(t,"a",(function(){return C})),r.d(t,"k",(function(){return f}));var n=r("4328"),o=r.n(n),i=r("981f").default,a="/api-teacher",u=function(e){return i({url:"/api-auth/usernameLogin",method:"post",data:o.a.stringify(e)})},s=function(e){return i({url:"/api-student/code/sendSms",method:"post",data:o.a.stringify(e)})},c=function(e){return i({url:"/api-auth/smsLogin",method:"post",data:o.a.stringify(e)})},l=function(e){return i({url:"/api-auth/user/setPassword",method:"post",data:o.a.stringify(e)})},f=function(e){return i({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:e})},d=function(e){return i({url:"/api-student/courseGroup/getGroupDetail",method:"get",params:e})},p=function(e){return i({url:"/api-student/courseGroup/buyCourseGroup",method:"post",data:o.a.stringify(e)})},h=function(e){return i({url:a+"/courseGroup/createCourseGroup",method:"post",data:e})},m=function(e){return i({url:a+"/sysTenantAccount/get",method:"get",params:e})},y=function(e){return i({url:a+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})},g=function(e){return i({url:a+"/teacherCourseSchedule/teacherCourseMinutes",method:"get",params:e})},b=function(e){return i({url:a+"/tenantEntryActivities/queryPage",method:"get",params:e})},v=function(e){return i({url:a+"/tenantPaymentOrder/createOrder",method:"post",data:o.a.stringify(e)})},w=function(e){return i({url:a+"/teacherOrder/queryByOrderNo",method:"get",params:e})},S=function(e){return i({url:"/api-cms/helpCenterCatalog/list",method:"get",params:e})},O=function(e){return i({url:"/api-cms/helpCenterContent/list",method:"get",params:e})},j=function(e){return i({url:"/api-auth/queryUserInfo",method:"get",params:e})},N=function(e){return i({url:a+"/courseReview/getStuAndTeaReview",method:"get",params:e})},C=function(e){return i({url:a+"/courseReview/batchAdd",method:"post",data:e})}},d2334:function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e){while(e.length>1){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i<r.length;++i)"undefined"!==typeof r[i]&&n.push(r[i]);t.obj[t.prop]=n}}},u=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)"undefined"!==typeof e[n]&&(r[n]=e[n]);return r},s=function e(t,r,i){if(!r)return t;if("object"!==typeof r){if(o(t))t.push(r);else{if(!t||"object"!==typeof t)return[t,r];(i&&(i.plainObjects||i.allowPrototypes)||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==typeof t)return[t].concat(r);var a=t;return o(t)&&!o(r)&&(a=u(t,i)),o(t)&&o(r)?(r.forEach((function(r,o){if(n.call(t,o)){var a=t[o];a&&"object"===typeof a&&r&&"object"===typeof r?t[o]=e(a,r,i):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),a)},c=function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},l=function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},f=function(e,t,r){if(0===e.length)return e;var n=e;if("symbol"===typeof e?n=Symbol.prototype.toString.call(e):"string"!==typeof e&&(n=String(e)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",a=0;a<n.length;++a){var u=n.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122?o+=n.charAt(a):u<128?o+=i[u]:u<2048?o+=i[192|u>>6]+i[128|63&u]:u<55296||u>=57344?o+=i[224|u>>12]+i[128|u>>6&63]+i[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&n.charCodeAt(a)),o+=i[240|u>>18]+i[128|u>>12&63]+i[128|u>>6&63]+i[128|63&u])}return o},d=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],u=Object.keys(i),s=0;s<u.length;++s){var c=u[s],l=i[c];"object"===typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}return a(t),e},p=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},h=function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},m=function(e,t){return[].concat(e,t)},y=function(e,t){if(o(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)};e.exports={arrayToObject:u,assign:c,combine:m,compact:d,decode:l,encode:f,isBuffer:h,isRegExp:p,maybeMap:y,merge:s}},f7df:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login"},[e._m(0),r("div",{staticClass:"container"},[r("div",{staticClass:"input-group"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.phoneNumber,expression:"phoneNumber"}],staticClass:"input",attrs:{type:"number",placeholder:"请输入手机号",pattern:"[0-9]"},domProps:{value:e.phoneNumber},on:{input:function(t){t.target.composing||(e.phoneNumber=t.target.value)}}})]),r("div",{staticClass:"input-group",staticStyle:{"margin-bottom":".05rem"}},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.code,expression:"code"}],staticClass:"input",attrs:{type:"text",placeholder:"请输入验证码"},domProps:{value:e.code},on:{input:function(t){t.target.composing||(e.code=t.target.value)}}}),r("span",{directives:[{name:"show",rawName:"v-show",value:e.countDownStatus,expression:"countDownStatus"}],staticClass:"code-text",on:{click:e.onSendCode}},[e._v(e._s(e.codeText))]),r("span",{directives:[{name:"show",rawName:"v-show",value:!e.countDownStatus,expression:"!countDownStatus"}],staticClass:"code-text"},[r("van-count-down",{ref:"countdown",attrs:{"auto-start":!1,time:e.countDownTime,format:"ss秒"},on:{finish:e.onFinished}})],1)]),r("div",{staticClass:"agreeProtocol"},[r("van-checkbox",{model:{value:e.agreeStatus,callback:function(t){e.agreeStatus=t},expression:"agreeStatus"}}),r("i",{staticStyle:{"font-style":"normal"},on:{click:function(t){e.agreeStatus=!e.agreeStatus}}},[e._v("阅读并同意")]),r("span",{on:{click:e.onToProtocol}},[e._v("《用户协议》")])],1),r("van-button",{attrs:{round:"",size:"large"},on:{click:e.onCodeLogin}},[e._v("注册并登录")]),r("span",{staticClass:"login-change",on:{click:e.onUrlLogin}},[e._v("登录")])],1)])},o=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"logo"},[n("img",{attrs:{src:r("9d64"),alt:""}})])}],i=r("b562"),a={name:"login",data:function(){var e=localStorage.getItem("getRegister");return e=e?JSON.parse(e):{},localStorage.removeItem("getRegister"),{groupId:this.$route.query.groupId,countDownStatus:!0,phoneNumber:e.phoneNumber?e.phoneNumber:null,isRegister:0,code:e.code?e.code:null,codeText:"获取验证码",countDownTime:12e4,isClick:!1,agreeStatus:!!e.agreeStatus&&e.agreeStatus}},mounted:function(){localStorage.removeItem("userInfo"),localStorage.removeItem("Authorization")},methods:{codeBlur:function(){setTimeout((function(){var e=document.documentElement.scrollTop||document.body.scrollTop||0;window.scrollTo(0,Math.max(e-1,0))}),100)},onToProtocol:function(){localStorage.setItem("getRegister",JSON.stringify({phoneNumber:this.phoneNumber,code:this.code,agreeStatus:this.agreeStatus})),this.$router.push({path:"/userProtocol",query:{groupId:this.groupId}})},onUrlLogin:function(){this.$router.push({path:"/appLogin",query:{groupId:this.groupId}})},onSendCode:function(){var e=this;this.checkPhone(this.phoneNumber)&&Object(i["k"])({mobile:this.phoneNumber}).then((function(t){var r=t.data;if(200==r.code){if(e.isRegister=r.data,1==r.data)return void e.$toast("用户已存在");Object(i["m"])({mobile:e.phoneNumber}).then((function(t){var r=t.data;200==r.code?(e.countDownStatus=!1,e.$refs.countdown.start()):e.$toast(r.msg)}))}}))},onCodeLogin:function(){var e=this;this.phoneNumber?this.checkPhone(this.phoneNumber)&&(this.code?this.agreeStatus?this.isClick||(this.isClick=!0,Object(i["k"])({mobile:this.phoneNumber}).then((function(t){var r=t.data;if(200==r.code){if(e.isRegister=r.data,1==r.data)return e.$toast("用户已存在"),void(e.isClick=!1);e.onLogin()}}))):this.$toast("请先阅读并同意用户协议"):this.$toast("请输入验证码")):this.$toast("请输入手机号")},onLogin:function(){var e=this,t={clientId:"student",clientSecret:"student",phone:this.phoneNumber,smsCode:this.code,channel:"H5",isLessee:"true"};Object(i["n"])(t).then((function(t){var r=t.data;if(e.isClick=!1,200==r.code){var n=r.data.authentication;localStorage.setItem("userInfo",n.token_type+" "+n.access_token),r.password?e.$router.push({path:"/classDetail",query:{groupId:e.groupId}}):e.$router.push({path:"/appSetInfo",query:{groupId:e.groupId}})}else e.$toast(r.msg)}))},onFinished:function(){this.countDownStatus=!0,this.$refs.countdown.reset()},checkPhone:function(e){var t=!0;return/^1(3|4|5|6|7|8|9)\d{9}$/.test(e)||(this.$toast("手机号输入有误"),t=!1),t}}},u=a,s=(r("8e0d"),r("2877")),c=Object(s["a"])(u,n,o,!1,null,"607eb020",null);t["default"]=c.exports},fd2d:function(e,t,r){}}]);
|