import { Image, Cell, Tag, Button, Popup, showToast, Form, Field, CountDown, RadioGroup, Radio, Picker, closeToast, Popover, Area, CellGroup, showConfirmDialog } from 'vant'; import { computed, defineComponent, nextTick, onMounted, onUnmounted, reactive, ref } from 'vue'; import styles from './detail.module.less'; import MSticky from '@/components/m-sticky'; // import MVideo from '@/components/m-video'; import { useRoute, useRouter } from 'vue-router'; import request from '@/helpers/request'; import loginSuccess from './images/login-success.png'; import SelectStudent from '@/views/student-register/modal/select-student'; const classList: any = []; for (let i = 1; i <= 40; i++) { classList.push({ text: i + '班', value: i }); } const GRADE_ENUM = { '1': '一年级', '2': '二年级', '3': '三年级', '4': '四年级', '5': '五年级', '6': '六年级', '7': '七年级', '8': '八年级', '9': '九年级' } as any; const getGradeList = (gradeYear?: string, instrumentCode?: string) => { let tempList: any = []; const five = [ { text: '一年级', value: 1, instrumentCode }, { text: '二年级', value: 2, instrumentCode }, { text: '三年级', value: 3, instrumentCode }, { text: '四年级', value: 4, instrumentCode }, { text: '五年级', value: 5, instrumentCode } ]; const one = [{ text: '六年级', value: 6, instrumentCode }]; const three = [ { text: '七年级', value: 7, instrumentCode }, { text: '八年级', value: 8, instrumentCode }, { text: '九年级', value: 9, instrumentCode } ]; if (gradeYear === 'FIVE_YEAR_SYSTEM') { tempList.push(...[...five]); } else if (gradeYear === 'SIX_YEAR_SYSTEM') { tempList.push(...[...five, ...one]); } else if (gradeYear === 'THREE_YEAR_SYSTEM') { tempList.push(...[...three]); } else if (gradeYear === 'FORE_YEAR_SYSTEM') { tempList.push(...[...one, ...three]); } else { tempList.push(...[...five, ...one, ...three]); } return tempList; }; export default defineComponent({ name: 'activation-register', setup() { const route = useRoute(); const forms = reactive({ activationCodeRecordId: route.query.activationCodeRecordId, statusShow: false, schoolId: null as any, schoolAreaId: null, // 学校区域编号 activationCode: route.query.code as any, // 互通码 paymentType: '', // 支付类型 paymentChannel: '', multi_user_limit: 1, // 限制注册学生数量 // popupShow: false, registerDetails: {} as any, details: [] as any[], // schoolType: '', // 学校类型 gradeYear: '', // 学制 schoolInstrumentSetType: null as any, submitLoading: false, showSelectStudent: false, // 选择学生 studentList: [], // 手机号关联学生列表 studentItem: {} as any // 选择的学生 // bugGoods: false, // 是否购买AI }); const studentInfo = reactive({ autoRegister: true, multiUser: true, // 是否为多用户 client_id: 'cooleshow-student', client_secret: 'cooleshow-student', extra: { nickname: '', currentGradeNum: '' as any, currentClass: '' as any, gender: 1 as any, registerType: null as any, // 报名类型 giftVipDay: 0 // 赠送会员天数 }, grant_type: 'password', loginType: 'SMS', password: '', username: '' }); const getDetail = async () => { try { const { data } = await request.post( '/edu-app/open/instrumentRegister/instrumentUseRegister', { requestType: 'form', data: { activationCodeRecordId: forms.activationCodeRecordId } } ); } catch { // } }; onMounted(() => { getDetail(); }); return () => (