1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AppRegister"],{"8e0d":function(t,e,n){"use strict";var o=n("fd2d"),r=n.n(o);r.a},"9d64":function(t,e,n){t.exports=n.p+"img/logo.334a5ce4.png"},b562:function(t,e,n){"use strict";n.d(e,"s",function(){return s}),n.d(e,"m",function(){return i}),n.d(e,"n",function(){return c}),n.d(e,"r",function(){return d}),n.d(e,"e",function(){return p}),n.d(e,"b",function(){return h}),n.d(e,"c",function(){return m}),n.d(e,"o",function(){return f}),n.d(e,"j",function(){return g}),n.d(e,"g",function(){return y}),n.d(e,"h",function(){return C}),n.d(e,"p",function(){return v}),n.d(e,"q",function(){return b}),n.d(e,"l",function(){return N}),n.d(e,"d",function(){return S}),n.d(e,"i",function(){return w}),n.d(e,"f",function(){return k}),n.d(e,"a",function(){return I}),n.d(e,"k",function(){return l});var o=n("4328"),r=n.n(o),u=n("981f").default,a="/api-teacher",s=function(t){return u({url:"/api-auth/usernameLogin",method:"post",data:r.a.stringify(t)})},i=function(t){return u({url:"/api-student/code/sendSms",method:"post",data:r.a.stringify(t)})},c=function(t){return u({url:"/api-auth/smsLogin",method:"post",data:r.a.stringify(t)})},d=function(t){return u({url:"/api-auth/user/setPassword",method:"post",data:r.a.stringify(t)})},l=function(t){return u({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:t})},p=function(t){return u({url:"/api-student/courseGroup/getGroupDetail",method:"get",params:t})},h=function(t){return u({url:"/api-student/courseGroup/buyCourseGroup",method:"post",data:r.a.stringify(t)})},m=function(t){return u({url:a+"/courseGroup/createCourseGroup",method:"post",data:t})},f=function(t){return u({url:a+"/sysTenantAccount/get",method:"get",params:t})},g=function(t){return u({url:a+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:t})},v=function(t){return u({url:a+"/teacherCourseSchedule/teacherCourseMinutes",method:"get",params:t})},b=function(t){return u({url:a+"/tenantEntryActivities/queryPage",method:"get",params:t})},S=function(t){return u({url:a+"/tenantPaymentOrder/createOrder",method:"post",data:r.a.stringify(t)})},w=function(t){return u({url:a+"/teacherOrder/queryByOrderNo",method:"get",params:t})},y=function(t){return u({url:"/api-cms/helpCenterCatalog/list",method:"get",params:t})},C=function(t){return u({url:"/api-cms/helpCenterContent/list",method:"get",params:t})},N=function(t){return u({url:"/api-auth/queryUserInfo",method:"get",params:t})},k=function(t){return u({url:a+"/courseReview/getStuAndTeaReview",method:"get",params:t})},I=function(t){return u({url:a+"/courseReview/batchAdd",method:"post",data:t})}},f7df: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",{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:"请输入手机号",pattern:"[0-9]"},domProps:{value:t.phoneNumber},on:{input:function(e){e.target.composing||(t.phoneNumber=e.target.value)}}})]),n("div",{staticClass:"input-group",staticStyle:{"margin-bottom":".05rem"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.code,expression:"code"}],staticClass:"input",attrs:{type:"text",placeholder:"请输入验证码"},domProps:{value:t.code},on:{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("div",{staticClass:"agreeProtocol"},[n("van-checkbox",{model:{value:t.agreeStatus,callback:function(e){t.agreeStatus=e},expression:"agreeStatus"}}),n("i",{staticStyle:{"font-style":"normal"},on:{click:function(e){t.agreeStatus=!t.agreeStatus}}},[t._v("阅读并同意")]),n("span",{on:{click:t.onToProtocol}},[t._v("《用户协议》")])],1),n("van-button",{attrs:{round:"",size:"large"},on:{click:t.onCodeLogin}},[t._v("注册并登录")]),n("span",{staticClass:"login-change",on:{click:t.onUrlLogin}},[t._v("登录")])],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:""}})])}],u=n("b562"),a={name:"login",data:function(){var t=localStorage.getItem("getRegister");return t=t?JSON.parse(t):{},localStorage.removeItem("getRegister"),{groupId:this.$route.query.groupId,countDownStatus:!0,phoneNumber:t.phoneNumber?t.phoneNumber:null,isRegister:0,code:t.code?t.code:null,codeText:"获取验证码",countDownTime:12e4,isClick:!1,agreeStatus:!!t.agreeStatus&&t.agreeStatus}},mounted:function(){localStorage.removeItem("userInfo"),localStorage.removeItem("Authorization")},methods:{codeBlur:function(){setTimeout(function(){var t=document.documentElement.scrollTop||document.body.scrollTop||0;window.scrollTo(0,Math.max(t-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 t=this;this.checkPhone(this.phoneNumber)&&Object(u["k"])({mobile:this.phoneNumber}).then(function(e){var n=e.data;if(200==n.code){if(t.isRegister=n.data,1==n.data)return void t.$toast("用户已存在");Object(u["m"])({mobile:t.phoneNumber}).then(function(e){var n=e.data;200==n.code?(t.countDownStatus=!1,t.$refs.countdown.start()):t.$toast(n.msg)})}})},onCodeLogin:function(){var t=this;this.phoneNumber?this.checkPhone(this.phoneNumber)&&(this.code?this.agreeStatus?this.isClick||(this.isClick=!0,Object(u["k"])({mobile:this.phoneNumber}).then(function(e){var n=e.data;if(200==n.code){if(t.isRegister=n.data,1==n.data)return t.$toast("用户已存在"),void(t.isClick=!1);t.onLogin()}})):this.$toast("请先阅读并同意用户协议"):this.$toast("请输入验证码")):this.$toast("请输入手机号")},onLogin:function(){var t=this,e={clientId:"student",clientSecret:"student",phone:this.phoneNumber,smsCode:this.code,channel:"H5",isLessee:"true"};Object(u["n"])(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.password?t.$router.push({path:"/classDetail",query:{groupId:t.groupId}}):t.$router.push({path:"/appSetInfo",query:{groupId:t.groupId}})}else 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}}},s=a,i=(n("8e0d"),n("2877")),c=Object(i["a"])(s,o,r,!1,null,"607eb020",null);e["default"]=c.exports},fd2d:function(t,e,n){}}]);
|