| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490 |
- !(function () {
- var e = ['returnUrl', 'isRegister']
- function n(e, n, t, r, o, i, a) {
- try {
- var u = e[i](a),
- s = u.value
- } catch (l) {
- return void t(l)
- }
- u.done ? n(s) : Promise.resolve(s).then(r, o)
- }
- function t(e) {
- return function () {
- var t = this,
- r = arguments
- return new Promise(function (o, i) {
- var a = e.apply(t, r)
- function u(e) {
- n(a, o, i, u, s, 'next', e)
- }
- function s(e) {
- n(a, o, i, u, s, 'throw', e)
- }
- u(void 0)
- })
- }
- }
- function r(e, n) {
- var t = Object.keys(e)
- if (Object.getOwnPropertySymbols) {
- var r = Object.getOwnPropertySymbols(e)
- n &&
- (r = r.filter(function (n) {
- return Object.getOwnPropertyDescriptor(e, n).enumerable
- })),
- t.push.apply(t, r)
- }
- return t
- }
- function o(e) {
- for (var n = 1; n < arguments.length; n++) {
- var t = null != arguments[n] ? arguments[n] : {}
- n % 2
- ? r(Object(t), !0).forEach(function (n) {
- i(e, n, t[n])
- })
- : Object.getOwnPropertyDescriptors
- ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t))
- : r(Object(t)).forEach(function (n) {
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n))
- })
- }
- return e
- }
- function i(e, n, t) {
- return (
- n in e
- ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 })
- : (e[n] = t),
- e
- )
- }
- function a(e, n) {
- if (null == e) return {}
- var t,
- r,
- o = (function (e, n) {
- if (null == e) return {}
- var t,
- r,
- o = {},
- i = Object.keys(e)
- for (r = 0; r < i.length; r++) (t = i[r]), n.indexOf(t) >= 0 || (o[t] = e[t])
- return o
- })(e, n)
- if (Object.getOwnPropertySymbols) {
- var i = Object.getOwnPropertySymbols(e)
- for (r = 0; r < i.length; r++)
- (t = i[r]),
- n.indexOf(t) >= 0 || (Object.prototype.propertyIsEnumerable.call(e, t) && (o[t] = e[t]))
- }
- return o
- }
- var u = document.createElement('style')
- ;(u.innerHTML =
- '._login_y7mb5_1{min-height:100vh;background:url(./assets/top_bg.3e7f9908.png) no-repeat top center;background-color:#fff;background-size:100%}._login_y7mb5_1 ._loginTitle_y7mb5_7{padding-top:2.66667rem;font-size:.69333rem;padding-left:.93333rem;padding-bottom:1.86667rem;line-height:.98667rem;font-weight:500}._login_y7mb5_1 ._codeText_y7mb5_15{color:var(--van-primary-text)}._login_y7mb5_1 ._margin34_y7mb5_18{margin:0 .90667rem}._login_y7mb5_1 ._formTitle_y7mb5_21{font-size:.48rem;color:#000;font-weight:500}._login_y7mb5_1 .van-cell-group{margin-bottom:.93333rem}._login_y7mb5_1 .van-field{padding-left:0;padding-right:0}._login_y7mb5_1 .van-button+.van-button{margin-top:.53333rem;color:#000!important}\n'),
- document.head.appendChild(u),
- System.register(
- [
- './validate-legacy.1c2c1454.js',
- './index-legacy.2ae28dc5.js',
- './index-legacy.26638f55.js',
- './index-legacy.c82098ab.js',
- './index-legacy.261ae52e.js',
- './index-legacy.d61b8a1f.js',
- './index-legacy.51e5b886.js'
- ],
- function (n) {
- 'use strict'
- var r, i, u, s, l, c, d, f, p, m, g, y, h, b, _, v, S
- return {
- setters: [
- function (e) {
- ;(r = e.c), (i = e.R), (u = e.C), (s = e.I)
- },
- function (e) {
- ;(l = e.d),
- (c = e.s),
- (d = e.f),
- (f = e.g),
- (p = e.h),
- (m = e.i),
- (g = e.j),
- (y = e.k),
- (h = e.l),
- (b = e.B)
- },
- function (e) {
- _ = e.C
- },
- function (e) {
- v = e.C
- },
- function (e) {
- S = e.F
- },
- function () {},
- function () {}
- ],
- execute: function () {
- var w = '_login_y7mb5_1',
- O = '_loginTitle_y7mb5_7',
- C = '_codeText_y7mb5_15',
- T = '_margin34_y7mb5_18',
- x = '_formTitle_y7mb5_21'
- n(
- 'default',
- l({
- name: 'login',
- data: function () {
- return {
- loginType: 'SMS',
- username: '',
- password: '',
- smsCode: '',
- countDownStatus: !0,
- countDownTime: 12e4,
- imgCodeStatus: !1
- }
- },
- computed: {
- codeDisable: function () {
- var e = !0
- return (
- 'PWD' === this.loginType
- ? this.username && this.password && (e = !1)
- : this.username && this.smsCode && (e = !1),
- e
- )
- },
- appName: function () {
- return { STUDENT: '学生端', TEACHER: '老师端', SCHOOL: '管理端' }[
- c.platformType
- ]
- }
- },
- mounted: function () {
- d(), this.directNext()
- },
- methods: {
- directNext: function () {
- if ('login' === c.user.status || 'error' === c.user.status) {
- var n = this.$route.query,
- t = n.returnUrl,
- r = (n.isRegister, a(n, e))
- this.$router.replace({ path: t, query: o({}, r) })
- }
- },
- onLogin: function () {
- var e = this
- return t(
- regeneratorRuntime.mark(function n() {
- var t, r, i, a, u
- return regeneratorRuntime.wrap(
- function (n) {
- for (;;)
- switch ((n.prev = n.next)) {
- case 0:
- return (
- (n.prev = 0),
- (t = {
- username: e.username,
- client_id: c.clientId[c.platformType],
- client_secret: c.clientId[c.platformType]
- }),
- 'PWD' === e.loginType
- ? ((t.password = e.password),
- (t.loginType = 'PASSWORD'),
- (t.grant_type = 'PASSWORD'))
- : ((t.password = e.smsCode),
- (t.loginType = 'SMS'),
- (t.grant_type = 'SMS')),
- (n.next = 5),
- f.post('/api-oauth/userlogin', {
- requestType: 'form',
- data: o({}, t)
- })
- )
- case 5:
- return (
- (r = n.sent),
- (i = r.data),
- p(i.token_type + ' ' + i.access_token),
- (n.next = 10),
- f.get(c.platformApi + '/user/getUserInfo', { initRequest: !0 })
- )
- case 10:
- ;(a = n.sent),
- 'SCHOOL' === c.platformType &&
- ((u = a.data.schoolInfos ? a.data.schoolInfos[0] : {}),
- (a.data.school = u)),
- m(a.data),
- e.directNext(),
- (n.next = 18)
- break
- case 16:
- ;(n.prev = 16), (n.t0 = n.catch(0))
- case 18:
- case 'end':
- return n.stop()
- }
- },
- n,
- null,
- [[0, 16]]
- )
- })
- )()
- },
- onSendCode: function () {
- var e = this
- return t(
- regeneratorRuntime.mark(function n() {
- return regeneratorRuntime.wrap(function (n) {
- for (;;)
- switch ((n.prev = n.next)) {
- case 0:
- if (r(e.username)) {
- n.next = 2
- break
- }
- return n.abrupt('return', g('请输入正确的手机号码'))
- case 2:
- e.imgCodeStatus = !0
- case 3:
- case 'end':
- return n.stop()
- }
- }, n)
- })
- )()
- },
- 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 y('div', { class: w }, [
- y('div', { class: O }, [
- h('您好,'),
- y('br', null, null),
- h(' 欢迎使用管乐团'),
- this.appName
- ]),
- y(
- _,
- { class: T, border: !1 },
- {
- default: function () {
- return [
- y(
- i,
- { style: { marginBottom: '16px' } },
- {
- default: function () {
- return [
- y(
- u,
- { span: 24, class: x },
- {
- default: function () {
- return [h('手机号')]
- }
- }
- ),
- y(
- u,
- { span: 24, class: 'van-hairline--bottom' },
- {
- default: function () {
- return [
- y(
- S,
- {
- modelValue: e.username,
- 'onUpdate:modelValue': function (n) {
- return (e.username = n)
- },
- name: '手机号',
- placeholder: '请输入您的手机号',
- type: 'tel',
- maxlength: 11
- },
- null
- )
- ]
- }
- }
- )
- ]
- }
- }
- ),
- 'PWD' === e.loginType
- ? y(i, null, {
- default: function () {
- return [
- y(
- u,
- { span: 24, class: x },
- {
- default: function () {
- return [h('密码')]
- }
- }
- ),
- y(
- u,
- { span: 24, class: 'van-hairline--bottom' },
- {
- default: function () {
- return [
- y(
- S,
- {
- modelValue: e.password,
- 'onUpdate:modelValue': function (n) {
- return (e.password = n)
- },
- type: 'password',
- name: '密码',
- placeholder: '请输入密码'
- },
- null
- )
- ]
- }
- }
- )
- ]
- }
- })
- : y(i, null, {
- default: function () {
- return [
- y(
- u,
- { span: 24, class: x },
- {
- default: function () {
- return [h('验证码')]
- }
- }
- ),
- y(
- u,
- { span: 24, class: 'van-hairline--bottom' },
- {
- default: function () {
- return [
- y(
- S,
- {
- modelValue: e.smsCode,
- 'onUpdate:modelValue': function (n) {
- return (e.smsCode = n)
- },
- name: '验证码',
- placeholder: '请输入验证码',
- type: 'tel',
- maxlength: 6
- },
- {
- button: function () {
- return e.countDownStatus
- ? y(
- 'span',
- { class: C, onClick: e.onSendCode },
- [h('获取验证码')]
- )
- : y(
- v,
- {
- ref: 'countDownRef',
- 'auto-start': !1,
- time: e.countDownTime,
- onFinish: e.onFinished,
- format: 'ss秒'
- },
- null
- )
- }
- }
- )
- ]
- }
- }
- )
- ]
- }
- })
- ]
- }
- }
- ),
- y('div', { class: T }, [
- y(
- b,
- {
- round: !0,
- block: !0,
- type: 'primary',
- disabled: this.codeDisable,
- onClick: this.onLogin
- },
- {
- default: function () {
- return [h('提交')]
- }
- }
- ),
- y(
- b,
- { block: !0, round: !0, color: '#F5F7FB', onClick: this.onChange },
- {
- default: function () {
- return ['PWD' === e.loginType ? '验证码登录' : '密码登录']
- }
- }
- )
- ]),
- this.imgCodeStatus
- ? y(
- s,
- {
- value: this.imgCodeStatus,
- 'onUpdate:value': function (n) {
- return (e.imgCodeStatus = n)
- },
- phone: this.username,
- onClose: function () {
- e.imgCodeStatus = !1
- },
- onSendCode: this.onCodeSend
- },
- null
- )
- : null
- ])
- }
- })
- )
- }
- }
- }
- )
- })()
|