AppSetInfo.fde5f039.js 8.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["AppSetInfo"],{"38f0":function(t,e,r){"use strict";var n=r("5b7e"),a=r.n(n);a.a},"4dbb":function(t,e,r){},"5b7e":function(t,e,r){},"61d5":function(t,e,r){"use strict";var n=r("4dbb"),a=r.n(n);a.a},"6e6e":function(t,e,r){"use strict";var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mheader",style:{height:"calc("+t.titleHeight+"px + "+t.navBarHeight+"px)"}},[r("header",{staticClass:"m-nav-header",class:[t.isFixed?"fixed":""],style:[t.headStyle]},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isBack,expression:"isBack"}],staticClass:"m-nav-bar__left",on:{click:t.goBack}},[r("van-icon",{staticClass:"arrow-left",attrs:{name:"arrow-left"}})],1),r("div",{staticClass:"m-nav-bar__title"},[t._t("default",[t._v(t._s(t.name?t.name:this.$route.meta.descrition))])],2),r("div",{staticClass:"m-nav-bar__right"},[t._t("right")],2)])])},a=[],o=r("a34a"),i=r.n(o),s=r("ddf4");function u(t,e,r,n,a,o,i){try{var s=t[o](i),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,a)}function c(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function i(t){u(o,n,a,i,s,"next",t)}function s(t){u(o,n,a,i,s,"throw",t)}i(void 0)})}}var l={name:"mheader",props:{name:String,isNative:{type:Boolean,default:!0},isBack:{type:Boolean,default:!0},isFixed:{type:Boolean,default:!0},backUrl:{type:Object,default:function(){return{callBack:null,path:"",params:{}}}}},data:function(){return{navBarHeight:0,headStyle:{},titleHeight:44}},mounted:function(){this.isNative||(Object(s["b"])({api:"setBarStatus",content:{status:0}}),this.getNav(),this.isBack=!1)},methods:{getNav:function(){var t=c(i.a.mark(function t(){var e,r,n=this;return i.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e=sessionStorage.getItem("navHeight"),r=sessionStorage.getItem("titleHeight"),!e||!r){t.next=7;break}this.navBarHeight=e,this.headStyle={paddingTop:e+"px",height:r+"px",lineHeight:r+"px"},t.next=9;break;case 7:return t.next=9,Object(s["b"])({api:"getNavHeight"},function(t){var e=t.content,r={},a=e.dpi||2;if(e.navHeight){var o=e.navHeight/a;sessionStorage.setItem("navHeight",o),n.navBarHeight=o,r={paddingTop:o+"px"}}if(e.titleHeight){var i=e.titleHeight/a;sessionStorage.setItem("titleHeight",i),n.titleHeight=i,r.height=i+"px",r.lineHeight=i+"px"}n.headStyle=r});case 9:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),goBack:function(){var t=this.backUrl;"function"==typeof t.callBack?t.callBack():t.path?this.$router.push({path:t.path,query:t.params}):history.go(-1)}},beforeDestroy:function(){this.isNative||(Object(s["b"])({api:"setBarStatus",content:{status:1}}),this.isBack=!0)}},d=l,f=(r("38f0"),r("2877")),p=Object(f["a"])(d,n,a,!1,null,"6a74717c",null);e["a"]=p.exports},ddf4:function(t,e,r){"use strict";r.d(e,"b",function(){return f}),r.d(e,"a",function(){return p});var n=r("ff51");function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach(function(e){i(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t){return s="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},s(t)}var u=function(){},c={},l=Object(n["b"])();l.isApp&&window.addEventListener("message",function(t){try{var e=t.data?"object"===s(t.data)?t.data:JSON.parse(t.data):{},r=e.content.uuid||e.uuid;try{e.content&&(e.content=JSON.parse(e.content))}catch(b){}if(!r){var n=Object.keys(c).filter(function(t){return 0===t.indexOf(e.api)}),a=!0,o=!1,i=void 0;try{for(var l,d=n[Symbol.iterator]();!(a=(l=d.next()).done);a=!0){var f=l.value,p=c[f]||u;p(e)}}catch(v){o=!0,i=v}finally{try{a||null==d.return||d.return()}finally{if(o)throw i}}return}var h=c[e.content.uuid||e.uuid||e.api+e.uuid]||u;h(e)}catch(b){console.error("通信消息解析错误",b)}});var d=window.DAYA||window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.DAYA,f=function(t,e){if(l.isApp){var r=Object(n["g"])();c[r]=e||u,t.content=t.content?o({},t.content,{uuid:r}):{uuid:r},d.postMessage(JSON.stringify(t))}},p=function(t,e){if(l.isApp){var r=t+Object(n["g"])();c[r]=e||u}}},ec81:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"register"},[t.headerStatus?r("m-header"):t._e(),r("van-cell-group",{attrs:{border:!1}},[r("van-field",{attrs:{border:!1,type:"text",label:"您的用户名",placeholder:"请输入用户名"},on:{blur:t.codeBlur},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}}),r("van-field",{attrs:{maxlength:"20",border:!1,type:"password",label:"设置登录密码",placeholder:"请输入密码"},on:{blur:t.codeBlur},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),r("van-field",{attrs:{maxlength:"20",border:!1,type:"password",label:"再次输入登录密码",placeholder:"请输入密码"},on:{blur:t.codeBlur},model:{value:t.form.tPassword,callback:function(e){t.$set(t.form,"tPassword",e)},expression:"form.tPassword"}}),r("van-button",{attrs:{round:"",size:"large"},on:{click:t.onCodeLogin}},[t._v("登录")])],1)],1)},a=[],o=r("a34a"),i=r.n(o),s=r("6e6e"),u=r("b562"),c=r("ff51");function l(t,e,r,n,a,o,i){try{var s=t[o](i),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,a)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var o=t.apply(e,r);function i(t){l(o,n,a,i,s,"next",t)}function s(t){l(o,n,a,i,s,"throw",t)}i(void 0)})}}var f={name:"register",components:{MHeader:s["a"]},data:function(){return{headerStatus:!0,groupId:this.$route.query.groupId,countDownStatus:!0,codeText:"获取验证码",countDownTime:12e4,form:{username:null,gender:1,password:null,tPassword:null},isClick:!1}},mounted:function(){var t=this.$route.query;t.Authorization&&(localStorage.setItem("Authorization",decodeURI(t.Authorization)),localStorage.setItem("userInfo",decodeURI(t.Authorization))),Object(c["b"])().android||Object(c["b"])().iPhone?this.headerStatus=!1:document.title="注册"},methods:{codeBlur:function(){setTimeout(function(){var t=document.documentElement.scrollTop||document.body.scrollTop||0;window.scrollTo(0,Math.max(t-1,0))},100)},onCodeLogin:function(){var t=d(i.a.mark(function t(){var e,r,n,a=this;return i.a.wrap(function(t){while(1)switch(t.prev=t.next){case 0:if(e=this.form,r=/^[\u4E00-\u9FA5]+$/,e.username){t.next=7;break}return this.$toast("请输入用户名"),t.abrupt("return");case 7:if(r.test(e.username)){t.next=12;break}return this.$toast("用户名必须为中文"),t.abrupt("return");case 12:if(!(e.username.length<2||e.username.length>15)){t.next=15;break}return this.$toast("用户名必须为2~15个字"),t.abrupt("return");case 15:if(!(!e.password||e.password&&(e.password.length<6||e.password.length>20))){t.next=18;break}return this.$toast("请输入6-20位数字/字母密码"),t.abrupt("return");case 18:if(e.password==e.tPassword){t.next=21;break}return this.$toast("两次输入密码不一致,请重新输入"),t.abrupt("return");case 21:if(!this.isClick){t.next=23;break}return t.abrupt("return");case 23:return this.isClick=!0,n={username:e.username,password:e.password},t.next=27,Object(u["s"])(n).then(function(t){var e=t.data;a.isClick=!1,200==e.code?a.$router.push({path:"/classDetail",query:{groupId:a.groupId}}):a.$toast(e.msg)});case 27:case"end":return t.stop()}},t,this)}));function e(){return t.apply(this,arguments)}return e}(),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}}},p=f,h=(r("61d5"),r("2877")),b=Object(h["a"])(p,n,a,!1,null,"1902597b",null);e["default"]=b.exports}}]);