| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414 |
- !(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
- ])
- }
- })
- )
- }
- }
- }
- )
- })()
|