login-3adb015b.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  1. import {
  2. c as R,
  3. a as t,
  4. d as _,
  5. n as E,
  6. r as H,
  7. u as $,
  8. p as X,
  9. L as j,
  10. m as M,
  11. b as N,
  12. t as p,
  13. e as Y,
  14. w as U,
  15. f as Z,
  16. g as ee,
  17. v as te,
  18. h as oe,
  19. i as se,
  20. s as ne,
  21. T as ae,
  22. j as re,
  23. H as le,
  24. k as W,
  25. B as ie,
  26. l as ue,
  27. o as ce,
  28. q as de,
  29. x as he,
  30. y as me,
  31. z as ge,
  32. I as fe,
  33. A as m,
  34. C as k,
  35. F as ye,
  36. D as v,
  37. E as x,
  38. G as V,
  39. J as K,
  40. K as q,
  41. M as F,
  42. N as L,
  43. O as z
  44. } from './index-0b3380a9.js';
  45. import { O as Ae } from './index-ca2ff73d.js';
  46. import { C as G } from './index-a7cda64a.js';
  47. import { F as O } from './index-451fefb3.js';
  48. import './base-aba1ba3e.js';
  49. import './index-e2c278c3.js';
  50. const [pe, S] = R('key'),
  51. we = t('svg', { class: S('collapse-icon'), viewBox: '0 0 30 24' }, [
  52. t(
  53. 'path',
  54. {
  55. d: 'M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z',
  56. fill: 'currentColor'
  57. },
  58. null
  59. )
  60. ]),
  61. Ce = t('svg', { class: S('delete-icon'), viewBox: '0 0 32 22' }, [
  62. t(
  63. 'path',
  64. {
  65. d: 'M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z',
  66. fill: 'currentColor'
  67. },
  68. null
  69. )
  70. ]);
  71. var D = _({
  72. name: pe,
  73. props: {
  74. type: String,
  75. text: E,
  76. color: String,
  77. wider: Boolean,
  78. large: Boolean,
  79. loading: Boolean
  80. },
  81. emits: ['press'],
  82. setup(e, { emit: n, slots: r }) {
  83. const o = H(!1),
  84. l = $(),
  85. g = u => {
  86. l.start(u), (o.value = !0);
  87. },
  88. f = u => {
  89. l.move(u), l.direction.value && (o.value = !1);
  90. },
  91. i = u => {
  92. o.value &&
  93. (r.default || X(u), (o.value = !1), n('press', e.text, e.type));
  94. },
  95. y = () => {
  96. if (e.loading) return t(j, { class: S('loading-icon') }, null);
  97. const u = r.default ? r.default() : e.text;
  98. switch (e.type) {
  99. case 'delete':
  100. return u || Ce;
  101. case 'extra':
  102. return u || we;
  103. default:
  104. return u;
  105. }
  106. };
  107. return () =>
  108. t(
  109. 'div',
  110. {
  111. class: S('wrapper', { wider: e.wider }),
  112. onTouchstartPassive: g,
  113. onTouchmovePassive: f,
  114. onTouchend: i,
  115. onTouchcancel: i
  116. },
  117. [
  118. t(
  119. 'div',
  120. {
  121. role: 'button',
  122. tabindex: 0,
  123. class: S([
  124. e.color,
  125. { large: e.large, active: o.value, delete: e.type === 'delete' }
  126. ])
  127. },
  128. [y()]
  129. )
  130. ]
  131. );
  132. }
  133. });
  134. const [ve, A] = R('number-keyboard'),
  135. Se = {
  136. show: Boolean,
  137. title: String,
  138. theme: M('default'),
  139. zIndex: E,
  140. teleport: [String, Object],
  141. maxlength: N(1 / 0),
  142. modelValue: M(''),
  143. transition: p,
  144. blurOnClose: p,
  145. showDeleteKey: p,
  146. randomKeyOrder: Boolean,
  147. closeButtonText: String,
  148. deleteButtonText: String,
  149. closeButtonLoading: Boolean,
  150. hideOnClickOutside: p,
  151. safeAreaInsetBottom: p,
  152. extraKey: { type: [String, Array], default: '' }
  153. };
  154. function _e(e) {
  155. for (let n = e.length - 1; n > 0; n--) {
  156. const r = Math.floor(Math.random() * (n + 1)),
  157. o = e[n];
  158. (e[n] = e[r]), (e[r] = o);
  159. }
  160. return e;
  161. }
  162. var Te = _({
  163. name: ve,
  164. inheritAttrs: !1,
  165. props: Se,
  166. emits: [
  167. 'show',
  168. 'hide',
  169. 'blur',
  170. 'input',
  171. 'close',
  172. 'delete',
  173. 'update:modelValue'
  174. ],
  175. setup(e, { emit: n, slots: r, attrs: o }) {
  176. const l = H(),
  177. g = () => {
  178. const s = Array(9)
  179. .fill('')
  180. .map((c, d) => ({ text: d + 1 }));
  181. return e.randomKeyOrder && _e(s), s;
  182. },
  183. f = () => [
  184. ...g(),
  185. { text: e.extraKey, type: 'extra' },
  186. { text: 0 },
  187. {
  188. text: e.showDeleteKey ? e.deleteButtonText : '',
  189. type: e.showDeleteKey ? 'delete' : ''
  190. }
  191. ],
  192. i = () => {
  193. const s = g(),
  194. { extraKey: c } = e,
  195. d = Array.isArray(c) ? c : [c];
  196. return (
  197. d.length === 1
  198. ? s.push({ text: 0, wider: !0 }, { text: d[0], type: 'extra' })
  199. : d.length === 2 &&
  200. s.push(
  201. { text: d[0], type: 'extra' },
  202. { text: 0 },
  203. { text: d[1], type: 'extra' }
  204. ),
  205. s
  206. );
  207. },
  208. y = Y(() => (e.theme === 'custom' ? i() : f())),
  209. u = () => {
  210. e.show && n('blur');
  211. },
  212. h = () => {
  213. n('close'), e.blurOnClose && u();
  214. },
  215. T = () => n(e.show ? 'show' : 'hide'),
  216. w = (s, c) => {
  217. if (s === '') {
  218. c === 'extra' && u();
  219. return;
  220. }
  221. const d = e.modelValue;
  222. c === 'delete'
  223. ? (n('delete'), n('update:modelValue', d.slice(0, d.length - 1)))
  224. : c === 'close'
  225. ? h()
  226. : d.length < +e.maxlength &&
  227. (n('input', s), n('update:modelValue', d + s));
  228. },
  229. b = () => {
  230. const { title: s, theme: c, closeButtonText: d } = e,
  231. P = r['title-left'],
  232. I = d && c === 'default';
  233. if (s || I || P)
  234. return t('div', { class: A('header') }, [
  235. P && t('span', { class: A('title-left') }, [P()]),
  236. s && t('h2', { class: A('title') }, [s]),
  237. I &&
  238. t(
  239. 'button',
  240. { type: 'button', class: [A('close'), le], onClick: h },
  241. [d]
  242. )
  243. ]);
  244. },
  245. B = () =>
  246. y.value.map(s => {
  247. const c = {};
  248. return (
  249. s.type === 'delete' && (c.default = r.delete),
  250. s.type === 'extra' && (c.default = r['extra-key']),
  251. t(
  252. D,
  253. {
  254. key: s.text,
  255. text: s.text,
  256. type: s.type,
  257. wider: s.wider,
  258. color: s.color,
  259. onPress: w
  260. },
  261. c
  262. )
  263. );
  264. }),
  265. J = () => {
  266. if (e.theme === 'custom')
  267. return t('div', { class: A('sidebar') }, [
  268. e.showDeleteKey &&
  269. t(
  270. D,
  271. {
  272. large: !0,
  273. text: e.deleteButtonText,
  274. type: 'delete',
  275. onPress: w
  276. },
  277. { delete: r.delete }
  278. ),
  279. t(
  280. D,
  281. {
  282. large: !0,
  283. text: e.closeButtonText,
  284. type: 'close',
  285. color: 'blue',
  286. loading: e.closeButtonLoading,
  287. onPress: w
  288. },
  289. null
  290. )
  291. ]);
  292. };
  293. return (
  294. U(
  295. () => e.show,
  296. s => {
  297. e.transition || n(s ? 'show' : 'hide');
  298. }
  299. ),
  300. e.hideOnClickOutside && Z(l, u, { eventName: 'touchstart' }),
  301. () => {
  302. const s = b(),
  303. c = t(
  304. ae,
  305. { name: e.transition ? 'van-slide-up' : '' },
  306. {
  307. default: () => [
  308. ee(
  309. t(
  310. 'div',
  311. oe(
  312. {
  313. ref: l,
  314. style: se(e.zIndex),
  315. class: A({
  316. unfit: !e.safeAreaInsetBottom,
  317. 'with-title': !!s
  318. }),
  319. onAnimationend: T,
  320. onTouchstartPassive: ne
  321. },
  322. o
  323. ),
  324. [
  325. s,
  326. t('div', { class: A('body') }, [
  327. t('div', { class: A('keys') }, [B()]),
  328. J()
  329. ])
  330. ]
  331. ),
  332. [[te, e.show]]
  333. )
  334. ]
  335. }
  336. );
  337. return e.teleport
  338. ? t(re, { to: e.teleport }, { default: () => [c] })
  339. : c;
  340. }
  341. );
  342. }
  343. });
  344. const be = W(Te),
  345. [Be, C] = R('password-input'),
  346. xe = {
  347. info: String,
  348. mask: p,
  349. value: M(''),
  350. gutter: E,
  351. length: N(6),
  352. focused: Boolean,
  353. errorInfo: String
  354. };
  355. var Pe = _({
  356. name: Be,
  357. props: xe,
  358. emits: ['focus'],
  359. setup(e, { emit: n }) {
  360. const r = l => {
  361. l.stopPropagation(), n('focus', l);
  362. },
  363. o = () => {
  364. const l = [],
  365. { mask: g, value: f, gutter: i, focused: y } = e,
  366. u = +e.length;
  367. for (let h = 0; h < u; h++) {
  368. const T = f[h],
  369. w = h !== 0 && !i,
  370. b = y && h === f.length;
  371. let B;
  372. h !== 0 && i && (B = { marginLeft: ce(i) }),
  373. l.push(
  374. t(
  375. 'li',
  376. { class: [{ [ue]: w }, C('item', { focus: b })], style: B },
  377. [
  378. g
  379. ? t(
  380. 'i',
  381. { style: { visibility: T ? 'visible' : 'hidden' } },
  382. null
  383. )
  384. : T,
  385. b && t('div', { class: C('cursor') }, null)
  386. ]
  387. )
  388. );
  389. }
  390. return l;
  391. };
  392. return () => {
  393. const l = e.errorInfo || e.info;
  394. return t('div', { class: C() }, [
  395. t(
  396. 'ul',
  397. {
  398. class: [C('security'), { [ie]: !e.gutter }],
  399. onTouchstartPassive: r
  400. },
  401. [o()]
  402. ),
  403. l && t('div', { class: C(e.errorInfo ? 'error-info' : 'info') }, [l])
  404. ]);
  405. };
  406. }
  407. });
  408. const De = W(Pe),
  409. Q = '' + new URL('login-logo-11b6718f.png', import.meta.url).href,
  410. Me =
  411. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAPFBMVEUAAACnsMylrsymr8ymsMymrsymsMynsM2or8+ms8ynsM2nsM2mr8yosc6nr8ulscyissmkrcimr82mr8xoS1BYAAAAE3RSTlMAqlX5zaSca0wN5MK3cmNBIRyPF9bpcQAAAHRJREFUOMvt1LEOgCAMRVEriKiIKP//r4JlMIK+RCcT7kTDCRttan1H59Ry4yZ/bS6/57PEWoKdz9MlSHwnXThrwUP7AO0xGAxVPA8jhl4SUXAQchVW+AIKQzEJoU6TQnBIk0VwY+kkw0/fFS8AvFLwkvpXO7wRJHHiDd4WAAAAAElFTkSuQmCC',
  412. ke =
  413. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAZlBMVEUAAACmr82mr8ynsMyjssqnr8ymr8yksdKmr8ymr8ynsM2nr8ynsM2lr86qtc2msMyosc6nsc6msdOmsM2msM2nsM2nr82nsM2msMunsMynsc6or8ytrc6nsMymsMylsM2krcqmr8w5Qv39AAAAIXRSTlMArFWqIN6KBvv1oe+lShjWOzQL5bB5cmldWU1GD8SblDU92uELAAAAt0lEQVQ4y+3RyQ6DIBSFYVRAQUHrrLXDef+XbGp0I0NJXHTjv7oJX8gNkKs1Pbwkn9NfLOUZvrHY7+oH9jovTAC0o+pLAL47KyBbz1MJMM+eEuDbriWg3JABdBt7gLuhgNhHBUg3zJDv4x0ozsKa0gyCbo1AS7XNdQJmrDLcDGt5bT6hPWV+nr3YA8tnHgTFQqYgyAi5/Qk2hFRBENNSeKHRScgd8H2EurG6iBhpnkTHiiElVyF9ALhVMzsJy5oXAAAAAElFTkSuQmCC',
  414. Ve = '_login_1id51_1',
  415. Ke = '_arrowLeft_1id51_26',
  416. Re = '_loginContainer_1id51_35',
  417. Ee = '_container_1id51_40',
  418. Ie = '_logo_1id51_48',
  419. Fe = '_iconPhone_1id51_63',
  420. Le = '_iconPassword_1id51_64',
  421. ze = '_btnGroup_1id51_75',
  422. Oe = '_primaryButton_1id51_78',
  423. He = '_protocol_1id51_90',
  424. Ne = '_iconChecked_1id51_99',
  425. Ue = '_active_1id51_107',
  426. We = '_codePhone_1id51_127',
  427. qe = '_btnWrap_1id51_144',
  428. Ge = '_btnSend_1id51_148',
  429. a = {
  430. login: Ve,
  431. arrowLeft: Ke,
  432. loginContainer: Re,
  433. container: Ee,
  434. logo: Ie,
  435. 'input-group': '_input-group_1id51_54',
  436. iconPhone: Fe,
  437. iconPassword: Le,
  438. btnGroup: ze,
  439. primaryButton: Oe,
  440. 'login-change': '_login-change_1id51_79',
  441. protocol: He,
  442. iconChecked: Ne,
  443. active: Ue,
  444. 'code-title': '_code-title_1id51_121',
  445. codePhone: We,
  446. btnWrap: qe,
  447. btnSend: Ge
  448. },
  449. Qe = _({
  450. name: 'layout-code',
  451. props: {
  452. phone: { type: String, default: '' },
  453. isRegister: { type: String, default: '' }
  454. },
  455. emits: ['close', 'confirm'],
  456. setup(e, { emit: n }) {
  457. const r = de(),
  458. o = he({
  459. smsCode: '',
  460. showKeyboard: !1,
  461. countDownStatus: !0,
  462. countDownTime: 120,
  463. countTimer: null
  464. }),
  465. l = async () => {
  466. try {
  467. await v.post('/edu-app/open/sendSms', {
  468. requestType: 'form',
  469. data: {
  470. clientId: 'cooleshow-student',
  471. type: e.isRegister ? 'REGISTER' : 'LOGIN',
  472. mobile: e.phone
  473. }
  474. }),
  475. g(),
  476. setTimeout(() => {
  477. x('验证码已发送');
  478. }, 100);
  479. } catch (i) {
  480. o.countDownStatus = !0;
  481. }
  482. },
  483. g = () => {
  484. (o.countDownStatus = !1),
  485. (o.countTimer = setInterval(() => {
  486. o.countDownTime > 0
  487. ? o.countDownTime--
  488. : ((o.countDownStatus = !0), clearInterval(o.countTimer));
  489. }, 1e3));
  490. },
  491. f = async () => {
  492. try {
  493. const i = {
  494. username: e.phone,
  495. client_id: 'cooleshow-student',
  496. client_secret: 'cooleshow-student',
  497. password: o.smsCode,
  498. grant_type: 'password',
  499. loginType: 'SMS'
  500. },
  501. { data: y } = await v.post('/edu-app/userlogin', {
  502. requestType: 'form',
  503. data: { ...i }
  504. });
  505. V.set(K, y.token_type + ' ' + y.access_token);
  506. const u = await v.get('/edu-app/user/getUserInfo', {
  507. initRequest: !0
  508. });
  509. q(u.data), r.back(), n('confirm');
  510. } catch (i) {}
  511. };
  512. return (
  513. U(
  514. () => o.smsCode,
  515. i => {
  516. i && i.length === 6 && f();
  517. }
  518. ),
  519. me(() => {
  520. ge(async () => {
  521. await l();
  522. });
  523. }),
  524. () =>
  525. t('div', { class: [a.login] }, [
  526. t(
  527. fe,
  528. {
  529. name: 'arrow-left',
  530. class: a.arrowLeft,
  531. onClick: () => n('close')
  532. },
  533. null
  534. ),
  535. t('div', { class: a.loginContainer }, [
  536. t('img', { src: Q, class: a.logo }, null),
  537. t(
  538. G,
  539. { class: a.container, border: !1 },
  540. {
  541. default: () => [
  542. t('h2', { class: a['code-title'] }, [m('输入验证码')]),
  543. t('p', { class: a.codePhone }, [
  544. m('已发送6位验证码至'),
  545. t('span', null, [e.phone])
  546. ]),
  547. t(
  548. De,
  549. {
  550. value: o.smsCode,
  551. onFocus: () => {
  552. o.showKeyboard = !0;
  553. },
  554. focused: o.showKeyboard,
  555. length: 6,
  556. gutter: 12
  557. },
  558. null
  559. ),
  560. t(
  561. be,
  562. {
  563. modelValue: o.smsCode,
  564. 'onUpdate:modelValue': i => (o.smsCode = i),
  565. show: o.showKeyboard,
  566. maxlength: 6,
  567. onBlur: () => {
  568. o.showKeyboard = !1;
  569. }
  570. },
  571. null
  572. ),
  573. t('div', { class: a.btnWrap }, [
  574. t(
  575. k,
  576. {
  577. type: 'primary',
  578. round: !0,
  579. onClick: l,
  580. class: a.btnSend,
  581. disabled: !o.countDownStatus
  582. },
  583. {
  584. default: () => [
  585. m('重新发送'),
  586. !o.countDownStatus &&
  587. t(ye, null, [m('('), o.countDownTime, m(')')])
  588. ]
  589. }
  590. )
  591. ])
  592. ]
  593. }
  594. )
  595. ])
  596. ])
  597. );
  598. }
  599. }),
  600. tt = _({
  601. name: 'layout-login',
  602. data() {
  603. const { isRegister: e } = this.$route.query;
  604. return {
  605. isRegister: e,
  606. loginType: 'SMS',
  607. username: '',
  608. password: '',
  609. smsCode: '',
  610. countDownStatus: !0,
  611. countDownTime: 1e3 * 120,
  612. imgCodeStatus: !1,
  613. isAgree: !0
  614. };
  615. },
  616. mounted() {
  617. V.remove(K), this.directNext();
  618. },
  619. methods: {
  620. directNext() {
  621. if (F.user.status === 'login' || F.user.status === 'error') {
  622. const { returnUrl: e, isRegister: n, ...r } = this.$route.query;
  623. this.$router.replace({ path: e, query: { ...r } });
  624. }
  625. },
  626. async onLogin() {
  627. try {
  628. if (!L(this.username)) return x('请输入正确的手机号码');
  629. const e = {
  630. username: this.username,
  631. client_id: 'cooleshow-student',
  632. client_secret: 'cooleshow-student',
  633. password: this.loginType === 'PWD' ? this.password : this.smsCode,
  634. grant_type: 'password',
  635. loginType: this.loginType === 'PWD' ? 'PASSWORD' : 'SMS'
  636. },
  637. { data: n } = await v.post('/edu-app/userlogin', {
  638. requestType: 'form',
  639. data: { ...e }
  640. });
  641. V.set(K, n.token_type + ' ' + n.access_token);
  642. const r = await v.get('/edu-app/user/getUserInfo', {
  643. initRequest: !0
  644. });
  645. q(r.data), this.directNext();
  646. } catch (e) {
  647. console.log(e);
  648. }
  649. },
  650. async onSendCode() {
  651. if (!this.isAgree) return x('请阅读并同意以下协议');
  652. if (!L(this.username)) return x('请输入正确的手机号码');
  653. this.imgCodeStatus = !0;
  654. },
  655. onChange() {
  656. this.loginType === 'PWD'
  657. ? (this.loginType = 'SMS')
  658. : this.loginType === 'SMS' && (this.loginType = 'PWD');
  659. }
  660. },
  661. render() {
  662. return t('div', { class: [a.login] }, [
  663. t('div', { class: a.loginContainer }, [
  664. t('img', { src: Q, class: a.logo }, null),
  665. t(
  666. G,
  667. { class: a.container, border: !1 },
  668. {
  669. default: () => [
  670. t(
  671. O,
  672. {
  673. modelValue: this.username,
  674. 'onUpdate:modelValue': e => (this.username = e),
  675. name: '手机号',
  676. placeholder: '请输入您的手机号',
  677. type: 'tel',
  678. class: a['input-group'],
  679. maxlength: 11,
  680. autocomplete: 'off',
  681. border: !1
  682. },
  683. {
  684. 'left-icon': () =>
  685. t('img', { src: Me, class: a.iconPhone }, null)
  686. }
  687. ),
  688. this.loginType === 'PWD' &&
  689. t(
  690. O,
  691. {
  692. modelValue: this.password,
  693. 'onUpdate:modelValue': e => (this.password = e),
  694. type: 'password',
  695. name: '密码',
  696. class: a['input-group'],
  697. placeholder: '请输入密码',
  698. autocomplete: 'off',
  699. border: !1
  700. },
  701. {
  702. 'left-icon': () =>
  703. t('img', { src: ke, class: a.iconPassword }, null)
  704. }
  705. ),
  706. t('div', { class: a.btnGroup }, [
  707. t(
  708. k,
  709. {
  710. round: !0,
  711. block: !0,
  712. class: a.primaryButton,
  713. onClick: () => {
  714. this.loginType === 'PWD'
  715. ? this.onLogin()
  716. : this.onSendCode();
  717. }
  718. },
  719. {
  720. default: () => [
  721. this.loginType === 'PWD' ? '登录' : '获取短信验证码'
  722. ]
  723. }
  724. ),
  725. t(
  726. k,
  727. {
  728. round: !0,
  729. block: !0,
  730. type: 'default',
  731. class: a['login-change'],
  732. onClick: this.onChange
  733. },
  734. {
  735. default: () => [
  736. this.loginType === 'PWD' ? '短信登录' : '密码登录'
  737. ]
  738. }
  739. )
  740. ]),
  741. this.loginType === 'SMS' &&
  742. t(
  743. 'div',
  744. {
  745. class: a.protocol,
  746. onClick: () => (this.isAgree = !this.isAgree)
  747. },
  748. [
  749. t(
  750. 'i',
  751. {
  752. class: [a.iconChecked, this.isAgree ? a.active : '']
  753. },
  754. null
  755. ),
  756. m('我已阅读并同意'),
  757. t(
  758. 'span',
  759. {
  760. onClick: e => {
  761. e.stopPropagation(), z.push('/preview-protocol');
  762. }
  763. },
  764. [m('《用户注册协议》')]
  765. ),
  766. m('和'),
  767. t(
  768. 'span',
  769. {
  770. onClick: e => {
  771. e.stopPropagation(), z.push('/privacy-protocol');
  772. }
  773. },
  774. [m('《隐私政策》')]
  775. )
  776. ]
  777. )
  778. ]
  779. }
  780. )
  781. ]),
  782. t(
  783. Ae,
  784. {
  785. modelValue: this.imgCodeStatus,
  786. 'onUpdate:modelValue': e => (this.imgCodeStatus = e)
  787. },
  788. {
  789. default: () => [
  790. t(
  791. Qe,
  792. {
  793. phone: this.username,
  794. isRegister: this.isRegister,
  795. onClose: () => (this.imgCodeStatus = !1),
  796. onConfirm: this.directNext
  797. },
  798. null
  799. )
  800. ]
  801. }
  802. )
  803. ]);
  804. }
  805. });
  806. export { tt as default };