123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559 |
- import {
- D as _,
- d as I,
- U as R,
- x as E,
- y as V,
- a as u,
- A as l,
- F as g,
- C as s,
- V as B,
- E as C
- } from './index-20bdb712.js';
- import { A as P } from './index-064e7df8.js';
- import { F as W } from './index-61a6f012.js';
- import { C as f } from './index-6930c802.js';
- import { F as o } from './index-7f161d6e.js';
- import './index-e6baae88.js';
- import './index-a4ff0f6f.js';
- const S = '_container_1484w_1',
- x = '_titleIcon_1484w_9',
- L = '_title_1484w_9',
- T = '_tagWrap_1484w_24',
- q = '_tag_1484w_24',
- M = '_contentWrap_1484w_45',
- N = '_content_1484w_45',
- Y = '_icon_1484w_56',
- k = '_group_1484w_62',
- z = '_radio_1484w_77',
- G = '_tips_1484w_88',
- $ = '_submit_1484w_98',
- J = '_submitIcon_1484w_108',
- O = '_successWrap_1484w_113',
- X = '_p1_1484w_120',
- j = '_p2_1484w_125',
- H = '_btnWrap_1484w_130',
- Q = '_btnTitle_1484w_141',
- K = '_btnDes_1484w_150',
- Z = '_btn_1484w_130',
- t = {
- container: S,
- titleIcon: x,
- title: L,
- tagWrap: T,
- tag: q,
- contentWrap: M,
- content: N,
- icon: Y,
- group: k,
- radio: z,
- tips: G,
- submit: $,
- submitIcon: J,
- successWrap: O,
- p1: X,
- p2: j,
- btnWrap: H,
- btnTitle: Q,
- btnDes: K,
- btn: Z
- },
- ee = '' + new URL('icon_school-246e55f8.png', import.meta.url).href,
- ue = '' + new URL('icon_person-e885956c.png', import.meta.url).href,
- ae = '' + new URL('icon_submit-1b1e3ed1.png', import.meta.url).href,
- te = '' + new URL('logo-f2c1f146.png', import.meta.url).href,
- ne = '' + new URL('icon_p1-49eb8f11.png', import.meta.url).href,
- oe = '' + new URL('icon_p2-ecea3fa8.png', import.meta.url).href,
- le = () => _.get('/edu-app/open/sysArea/queryAllProvince'),
- se = r => _.post('/edu-app/open/school/add', { data: r }),
- re = r => _.post('/edu-app/open/sendSms', { data: r, requestType: 'form' }),
- be = I({
- name: 'SchoolRegister',
- setup() {
- const r = R(),
- d = {
- nature: [
- { label: '公立', value: 'PUBLIC' },
- { label: '私立', value: 'PRIVATE' }
- ],
- types: [
- { label: '小学', value: 'PRIMARY' },
- { label: '初中', value: 'JUNIOR' },
- { label: '小初一体', value: 'PRIMARY_JUNIOR' }
- ],
- grades: [
- { label: '六年制', value: 'SIX_YEAR_SYSTEM' },
- { label: '五年制', value: 'FIVE_YEAR_SYSTEM' }
- ],
- genaral: [
- { label: '男', value: '1' },
- { label: '女', value: '0' }
- ]
- },
- a = E({
- name: '',
- regionCode: '',
- cityCode: '',
- provinceCode: '',
- schoolNature: 'PUBLIC',
- schoolType: 'PRIMARY',
- gradeYear: 'SIX_YEAR_SYSTEM',
- emergencyContact: '',
- emergencyContactPhone: '',
- educationalAdministrationUsername: '',
- educationalAdministrationPhone: '',
- genaral: '1',
- code: '',
- buyGoods: !0,
- tenantId: r.query.id || '',
- sourceForm: 'TEACHER'
- }),
- n = E({
- cityName: '',
- showArea: !1,
- success: !1,
- areaList: {},
- sendMsg: '发送验证码'
- }),
- v = e => {
- const p = {},
- b = {},
- h = {};
- return (
- e.forEach(c => {
- p[c.code] = c.name;
- }),
- e.forEach(c => {
- var i;
- (i = c.areas) == null ||
- i.forEach(m => {
- b[m.code] = m.name;
- });
- }),
- e.forEach(c => {
- var i;
- (i = c.areas) == null ||
- i.forEach(m => {
- var F;
- (F = m.areas) == null ||
- F.forEach(A => {
- h[A.code] = A.name;
- });
- });
- }),
- { province_list: p, city_list: b, county_list: h }
- );
- },
- y = () => {
- le().then(e => {
- (e == null ? void 0 : e.code) === 200 &&
- ((n.areaList = v(e.data)),
- console.log('🚀 ~ data.areaList:', n.areaList));
- });
- };
- V(() => {
- y();
- });
- const w = async () => {
- try {
- await re({
- clientId: 'cooleshow-student',
- type: 'REGISTER',
- mobile: a.educationalAdministrationPhone
- }),
- D(),
- C('验证码已发送');
- } catch (e) {
- n.sendMsg = '重新发送';
- }
- },
- D = () => {
- n.sendMsg = '30s';
- let e = 30;
- setInterval(() => {
- e--,
- (n.sendMsg = `${e}s后重新发送`),
- e <= 0 && (n.sendMsg = '重新发送');
- }, 1e3);
- },
- U = async () => {
- const e = await se({ ...a });
- (e == null ? void 0 : e.code) === 200 &&
- (C('提交成功'), (n.success = !0));
- };
- return () =>
- u('div', { class: t.container }, [
- u('img', { class: t.titleIcon, src: te }, null),
- u('div', { class: t.title }, [r.query.name]),
- u('div', { class: t.tagWrap }, [
- u('div', { class: t.tag }, [
- u('span', null, [l('·')]),
- l(' 音乐数字课堂学校登记 '),
- u('span', null, [l('·')])
- ])
- ]),
- u('div', { class: t.contentWrap }, [
- u('div', { class: t.content }, [
- u(
- W,
- { onSubmit: () => U() },
- {
- default: () => [
- u(
- f,
- { class: t.group },
- {
- default: () => [
- u('img', { src: ee, class: t.icon }, null),
- u(
- o,
- {
- border: !0,
- name: 'name',
- label: '学校全称',
- rows: '1',
- autosize: !0,
- type: 'textarea',
- placeholder: '请输入学校全称',
- inputAlign: 'right',
- modelValue: a.name,
- 'onUpdate:modelValue': e => (a.name = e),
- rules: [
- { required: !0, message: '请输入学校全称' }
- ]
- },
- null
- ),
- u(
- o,
- {
- isLink: !0,
- border: !0,
- label: '所属城市',
- placeholder: '请选择',
- readonly: !0,
- inputAlign: 'right',
- modelValue: n.cityName,
- 'onUpdate:modelValue': e => (n.cityName = e),
- onClick: () => (n.showArea = !0),
- rules: [{ required: !0, message: '请选择' }]
- },
- null
- ),
- u(
- o,
- {
- center: !0,
- border: !0,
- name: 'schoolNature',
- label: '办学性质'
- },
- {
- input: () =>
- u(g, null, [
- d.nature.map(e =>
- u(
- s,
- {
- class: t.radio,
- size: 'small',
- color:
- e.value === a.schoolNature
- ? '#198CFE'
- : '',
- onClick: () =>
- (a.schoolNature = e.value)
- },
- { default: () => [e.label] }
- )
- )
- ])
- }
- ),
- u(
- o,
- {
- center: !0,
- border: !0,
- label: '学校类型',
- labelWidth: '70px'
- },
- {
- input: () =>
- u(g, null, [
- d.types.map(e =>
- u(
- s,
- {
- class: t.radio,
- size: 'small',
- color:
- e.value === a.schoolType
- ? '#198CFE'
- : '',
- onClick: () => (a.schoolType = e.value)
- },
- { default: () => [e.label] }
- )
- )
- ])
- }
- ),
- u(
- o,
- { center: !0, border: !0, label: '学年制' },
- {
- input: () =>
- u(g, null, [
- d.grades.map(e =>
- u(
- s,
- {
- class: t.radio,
- size: 'small',
- color:
- e.value === a.gradeYear
- ? '#198CFE'
- : '',
- onClick: () => (a.gradeYear = e.value)
- },
- { default: () => [e.label] }
- )
- )
- ])
- }
- )
- ]
- }
- ),
- u(
- f,
- { class: t.group },
- {
- default: () => [
- u('img', { src: ue, class: t.icon }, null),
- u(
- o,
- {
- border: !0,
- name: 'emergencyContact',
- label: '校长姓名',
- placeholder: '请输入校长姓名',
- inputAlign: 'right',
- maxlength: 6,
- modelValue: a.emergencyContact,
- 'onUpdate:modelValue': e =>
- (a.emergencyContact = e),
- rules: [
- { required: !0, message: '请输入校长姓名' }
- ]
- },
- null
- ),
- u(
- o,
- {
- border: !0,
- name: 'emergencyContactPhone',
- label: '校长联系方式',
- maxlength: 11,
- placeholder: '请输入校长手机号码',
- inputAlign: 'right',
- modelValue: a.emergencyContactPhone,
- 'onUpdate:modelValue': e =>
- (a.emergencyContactPhone = e),
- rules: [
- { required: !0, message: '请输入校长手机号码' },
- {
- pattern: /^1[3456789]\d{9}$/,
- message: '请输入正确的手机号码'
- }
- ]
- },
- null
- ),
- u(
- o,
- {
- border: !0,
- name: 'educationalAdministrationUsername',
- label: '负责人姓名',
- placeholder: '请输入负责人姓名',
- inputAlign: 'right',
- maxlength: 6,
- modelValue: a.educationalAdministrationUsername,
- 'onUpdate:modelValue': e =>
- (a.educationalAdministrationUsername = e),
- rules: [
- { required: !0, message: '请输入负责人姓名' }
- ]
- },
- null
- ),
- u(
- o,
- {
- border: !0,
- name: 'educationalAdministrationPhone',
- label: '负责人联系方式',
- labelWidth: '40%',
- inputAlign: 'right',
- placeholder: '请输入负责人手机号码',
- maxlength: 11,
- modelValue: a.educationalAdministrationPhone,
- 'onUpdate:modelValue': e =>
- (a.educationalAdministrationPhone = e),
- rules: [
- {
- required: !0,
- message: '请输入负责人手机号码'
- },
- {
- pattern: /^1[3456789]\d{9}$/,
- message: '请输入正确的手机号码'
- }
- ]
- },
- null
- ),
- u(
- o,
- { center: !0, border: !0, label: '性别' },
- {
- input: () =>
- u(g, null, [
- d.genaral.map(e =>
- u(
- s,
- {
- class: t.radio,
- size: 'small',
- color:
- e.value === a.genaral
- ? '#198CFE'
- : '',
- onClick: () => (a.genaral = e.value)
- },
- { default: () => [e.label] }
- )
- )
- ])
- }
- ),
- u(
- o,
- {
- border: !0,
- center: !0,
- name: 'code',
- label: '验证码',
- placeholder: '请输入验证码',
- modelValue: a.code,
- 'onUpdate:modelValue': e => (a.code = e),
- maxlength: 6,
- rules: [{ required: !0, message: '请输入验证码' }]
- },
- {
- button: () =>
- u(
- s,
- {
- size: 'small',
- type: 'primary',
- color: '#198CFE',
- onClick: () => w()
- },
- { default: () => [n.sendMsg] }
- )
- }
- ),
- u('div', { style: { padding: '10px 16px' } }, [
- u('div', { class: t.tips }, [
- l(
- '负责人即为该学校酷乐秀音乐数字课堂老师端管理员,手机号即为酷乐秀音乐数字课堂老师端账号,默认密码为:ktyq+手机号后四位'
- )
- ])
- ])
- ]
- }
- ),
- u(
- s,
- {
- class: t.submit,
- round: !0,
- block: !0,
- 'native-type': 'submit'
- },
- {
- default: () => [
- u('img', { class: t.submitIcon, src: ae }, null)
- ]
- }
- )
- ]
- }
- ),
- u(
- B,
- {
- show: n.showArea,
- 'onUpdate:show': e => (n.showArea = e),
- position: 'bottom'
- },
- {
- default: () => [
- u(
- P,
- {
- areaList: n.areaList,
- onCancel: () => (n.showArea = !1),
- onConfirm: ({ selectedOptions: e }) => {
- (a.provinceCode = e[0].value),
- (a.cityCode = e[1].value),
- (a.regionCode = e[2].value),
- (n.cityName = e.map(p => p.text).join('-')),
- (n.showArea = !1);
- }
- },
- null
- )
- ]
- }
- ),
- u(
- B,
- {
- class: 'popup-custom van-scale',
- transition: 'van-scale',
- closeOnClickOverlay: !1,
- show: n.success,
- 'onUpdate:show': e => (n.success = e)
- },
- {
- default: () => [
- u('div', { class: t.successWrap }, [
- u('img', { class: t.p1, src: ne }, null),
- u('img', { class: t.p2, src: oe }, null),
- u('div', { class: t.btnWrap }, [
- u('div', { class: t.btnTitle }, [l('您已成功登记')]),
- u('div', { class: t.btnDes }, [
- l('欢迎您使用酷乐秀音乐数字课堂~')
- ]),
- u(
- s,
- { class: t.btn, type: 'primary', round: !0 },
- { default: () => [l('我知道了')] }
- )
- ])
- ])
- ]
- }
- )
- ])
- ])
- ]);
- }
- });
- export { be as default };
|