!(function () { var e = ['returnUrl', 'isRegister'] function t(e, t, n, r, o, u, i) { try { var a = e[u](i), s = a.value } catch (c) { return void n(c) } a.done ? t(s) : Promise.resolve(s).then(r, o) } function n(e) { return function () { var n = this, r = arguments return new Promise(function (o, u) { var i = e.apply(n, r) function a(e) { t(i, o, u, a, s, 'next', e) } function s(e) { t(i, o, u, a, s, 'throw', e) } a(void 0) }) } } function r(e, t) { var n = Object.keys(e) if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e) t && (r = r.filter(function (t) { return Object.getOwnPropertyDescriptor(e, t).enumerable })), n.push.apply(n, r) } return n } function o(e) { for (var t = 1; t < arguments.length; t++) { var n = null != arguments[t] ? arguments[t] : {} t % 2 ? r(Object(n), !0).forEach(function (t) { u(e, t, n[t]) }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : r(Object(n)).forEach(function (t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)) }) } return e } function u(e, t, n) { return ( t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = n), e ) } function i(e, t) { if (null == e) return {} var n, r, o = (function (e, t) { if (null == e) return {} var n, r, o = {}, u = Object.keys(e) for (r = 0; r < u.length; r++) (n = u[r]), t.indexOf(n) >= 0 || (o[n] = e[n]) return o })(e, t) if (Object.getOwnPropertySymbols) { var u = Object.getOwnPropertySymbols(e) for (r = 0; r < u.length; r++) (n = u[r]), t.indexOf(n) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, n) && (o[n] = e[n])) } return o } System.register( [ './validate-legacy.1c2c1454.js', './index-legacy.2ae28dc5.js', './index-legacy.26638f55.js', './index-legacy.261ae52e.js', './index-legacy.c82098ab.js', './index-legacy.d61b8a1f.js', './index-legacy.51e5b886.js' ], function (t) { 'use strict' var r, u, a, s, c, l, f, d, p, m, g, h, y, b, v, S, O, j return { setters: [ function (e) { ;(r = e.c), (u = e.R), (a = e.C), (s = e.I) }, function (e) { ;(c = e.d), (l = e.aK), (f = e.aL), (d = e.aM), (p = e.aN), (m = e.aO), (g = e.j), (h = e.k), (y = e.aP), (b = e.l), (v = e.B) }, function (e) { S = e.C }, function (e) { O = e.F }, function (e) { j = e.C }, function () {}, function () {} ], execute: function () { t( 'default', c({ name: 'login-music', data: function () { return { loginType: 'SMS', username: '', password: '', smsCode: '', countDownStatus: !0, countDownTime: 12e4, imgCodeStatus: !1 } }, computed: { codeDisable: function () { var e = !0 return this.username && this.smsCode && (e = !1), e } }, mounted: function () { l(), this.directNext() }, methods: { directNext: function () { if ('login' === f.user.status || 'error' === f.user.status) { var t = this.$route.query, n = t.returnUrl, r = (t.isRegister, i(t, e)) this.$router.replace({ path: n, query: o({}, r) }) } }, onLogin: function () { var e = this return n( regeneratorRuntime.mark(function t() { var n, r, u, i return regeneratorRuntime.wrap( function (t) { for (;;) switch ((t.prev = t.next)) { case 0: return ( (t.prev = 0), (n = { username: e.username, client_id: 'jmedu-student', client_secret: 'jmedu-student', autoRegister: !0, password: e.smsCode, loginType: 'SMS', grant_type: 'SMS' }), (t.next = 4), d.post('/api-oauth/userlogin', { requestType: 'form', data: o({}, n) }) ) case 4: return ( (r = t.sent), (u = r.data), p(u.token_type + ' ' + u.access_token), (t.next = 9), d.get('/api-student/user/getUserInfo', { initRequest: !0 }) ) case 9: ;(i = t.sent), m(i.data), e.directNext(), (t.next = 16) break case 14: ;(t.prev = 14), (t.t0 = t.catch(0)) case 16: case 'end': return t.stop() } }, t, null, [[0, 14]] ) }) )() }, onSendCode: function () { var e = this return n( regeneratorRuntime.mark(function t() { return regeneratorRuntime.wrap(function (t) { for (;;) switch ((t.prev = t.next)) { case 0: if (r(e.username)) { t.next = 2 break } return t.abrupt('return', g('请输入正确的手机号码')) case 2: e.imgCodeStatus = !0 case 3: case 'end': return t.stop() } }, t) }) )() }, onCodeSend: function () { var e = this ;(this.countDownStatus = !1), this.$nextTick(function () { e.$refs.countDownRef.start() }) }, onFinished: function () { ;(this.countDownStatus = !0), this.$refs.countDownRef.reset() }, onChange: function () { 'PWD' === this.loginType ? (this.loginType = 'SMS') : 'SMS' === this.loginType && (this.loginType = 'PWD') } }, render: function () { var e = this return h('div', { class: y.login }, [ h('div', { class: y.loginTitle }, [ b('您好,'), h('br', null, null), b(' 欢迎使用管乐团学生端') ]), h( S, { class: y.margin34, border: !1 }, { default: function () { return [ h( u, { style: { marginBottom: '16px' } }, { default: function () { return [ h( a, { span: 24, class: y.formTitle }, { default: function () { return [b('手机号')] } } ), h( a, { span: 24, class: 'van-hairline--bottom' }, { default: function () { return [ h( O, { modelValue: e.username, 'onUpdate:modelValue': function (t) { return (e.username = t) }, name: '手机号', placeholder: '请输入您的手机号', type: 'tel', maxlength: 11 }, null ) ] } } ) ] } } ), h(u, null, { default: function () { return [ h( a, { span: 24, class: y.formTitle }, { default: function () { return [b('验证码')] } } ), h( a, { span: 24, class: 'van-hairline--bottom' }, { default: function () { return [ h( O, { modelValue: e.smsCode, 'onUpdate:modelValue': function (t) { return (e.smsCode = t) }, name: '验证码', placeholder: '请输入验证码', type: 'tel', maxlength: 6 }, { button: function () { return e.countDownStatus ? h( 'span', { class: y.codeText, onClick: e.onSendCode }, [b('获取验证码')] ) : h( j, { ref: 'countDownRef', 'auto-start': !1, time: e.countDownTime, onFinish: e.onFinished, format: 'ss秒' }, null ) } } ) ] } } ) ] } }) ] } } ), h('div', { class: y.margin34 }, [ h( v, { round: !0, block: !0, type: 'primary', disabled: this.codeDisable, onClick: this.onLogin }, { default: function () { return [b('提交')] } } ) ]), this.imgCodeStatus ? h( s, { value: this.imgCodeStatus, 'onUpdate:value': function (t) { return (e.imgCodeStatus = t) }, phone: this.username, onClose: function () { e.imgCodeStatus = !1 }, onSendCode: this.onCodeSend }, null ) : null ]) } }) ) } } } ) })()