{"version":3,"sources":["webpack:///./src/views/Auth/Register.vue?347a","webpack:///./src/views/Auth/Register.vue","webpack:///./src/views/Auth/Register.vue?0b81","webpack:///./src/views/Auth/Register.vue?c40e","webpack:///./src/utils/element.ts","webpack:///./src/components/exam/NationalSelect.vue?01ed","webpack:///./src/components/exam/NationalSelect.vue","webpack:///./src/components/exam/NationalSelect.vue?8b3b","webpack:///./src/components/exam/NationalSelect.vue?eb0b","webpack:///./src/apis/student/index.ts","webpack:///./src/views/Auth/Register.vue?2a40"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","ref","attrs","form","rules","model","value","callback","$$v","$set","expression","national","on","$event","_l","option","key","getKey","_s","loading","handleRegister","handleReset","_m","staticRenderFns","idNumber","name","sex","birthday","password","passwordAgain","resetPasswordQuestion","resetPasswordAnswer","contactAddress","contactPhone","telephone","zipCode","required","message","trigger","type","min","validator","rule","configs","options","find","a","$refs","validate","birthYear","getFullYear","toString","birthMonth","getMonth","$router","push","resetFields","components","Logo","NationalSelect","component","createValidator","print","$emit","createStudent","payload","fetchQustion","IdNumber","data","validateQustion","resetPassword"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,YAAY,CAACF,EAAG,MAAM,CAACE,YAAY,yBAAyBF,EAAG,MAAM,CAACE,YAAY,gCAAgC,CAACF,EAAG,MAAM,CAACE,YAAY,uBAAuB,CAACF,EAAG,KAAK,CAACE,YAAY,wBAAwB,CAACN,EAAIO,GAAG,UAAUH,EAAG,UAAU,CAACI,IAAI,OAAOC,MAAM,CAAC,cAAc,QAAQ,iBAAiB,OAAO,MAAQT,EAAIU,KAAK,MAAQV,EAAIW,QAAQ,CAACP,EAAG,eAAe,CAACK,MAAM,CAAC,KAAO,WAAW,MAAQ,UAAU,CAACL,EAAG,WAAW,CAACQ,MAAM,CAACC,MAAO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G,0BAGE,EAAAN,OAAS,OAHX,gDAKE,WAAa,QACX,2BAAO,OAAY0B,QAAQE,MAAK,SAAAC,GAAC,MAAc,aAAVA,EAAE9B,cAAvC,aAAO,EAAqDV,aAA5D,QAAqE,KANzE,oBASE,WACE,OAAOZ,KAAKY,OAVhB,IAaE,SAAaA,GACXZ,KAAKqE,MAAM,eAAgBzD,OAd/B,GAA4C,QAClC,gBAAP,kB,4BACO,gBAAP,kB,4BAFkB,EAAc,gBADlC,QACoB,WCnBsY,I,YCOvZsD,EAAY,eACd,EACApE,EACA+B,GACA,EACA,KACA,KACA,MAIa,OAAAqC,E,2NCVR,SAAeI,EAAtB,kC,8DAAO,WAA6BC,GAA7B,iGACC,eAAK,UAAWA,GADjB,2C,wBAQA,SAAeC,EAAtB,kC,8DAAO,WAA4BC,GAA5B,yGACkB,eAAI,oBAAD,OAAqBA,IAD1C,uBACGC,EADH,EACGA,KADH,kBAEEA,GAFF,2C,wBASA,SAAeC,EAAtB,kC,8DAAO,WAA+BJ,GAA/B,iGACC,eAAK,mBAAoBA,GAD1B,2C,wBAIA,SAAeK,EAAtB,kC,8DAAO,WAA6BL,GAA7B,iGACC,eAAI,mBAAoBA,GADzB,2C,4DC7BP,W","file":"js/chunk-a00f6b4e.67850a91.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"register\"},[_c('div',{staticClass:\"register__background\"}),_c('div',{staticClass:\"register__card register-card\"},[_c('div',{staticClass:\"register-card__left\"},[_c('h1',{staticClass:\"register-card__title\"},[_vm._v(\"网上注册\")]),_c('el-form',{ref:\"form\",attrs:{\"label-width\":\"150px\",\"label-position\":\"left\",\"model\":_vm.form,\"rules\":_vm.rules}},[_c('el-form-item',{attrs:{\"prop\":\"idNumber\",\"label\":\"身份证号码\"}},[_c('el-input',{model:{value:(_vm.form.idNumber),callback:function ($$v) {_vm.$set(_vm.form, \"idNumber\", $$v)},expression:\"form.idNumber\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"name\",\"label\":\"真实姓名\"}},[_c('el-input',{model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, \"name\", $$v)},expression:\"form.name\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"sex\",\"label\":\"性别\"}},[_c('el-radio',{attrs:{\"label\":0},model:{value:(_vm.form.sex),callback:function ($$v) {_vm.$set(_vm.form, \"sex\", $$v)},expression:\"form.sex\"}},[_vm._v(\"男\")]),_c('el-radio',{attrs:{\"label\":1},model:{value:(_vm.form.sex),callback:function ($$v) {_vm.$set(_vm.form, \"sex\", $$v)},expression:\"form.sex\"}},[_vm._v(\"女\")])],1),_c('el-form-item',{attrs:{\"prop\":\"national\",\"label\":\"民族\"}},[_c('NationalSelect',{attrs:{\"value\":_vm.form.national},on:{\"update:value\":function($event){return _vm.$set(_vm.form, \"national\", $event)}}})],1),_c('el-form-item',{attrs:{\"prop\":\"birthday\",\"label\":\"出生年月\"}},[_c('el-date-picker',{attrs:{\"type\":\"month\"},model:{value:(_vm.form.birthday),callback:function ($$v) {_vm.$set(_vm.form, \"birthday\", $$v)},expression:\"form.birthday\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"password\",\"label\":\"密码\"}},[_c('el-input',{attrs:{\"type\":\"password\"},model:{value:(_vm.form.password),callback:function ($$v) {_vm.$set(_vm.form, \"password\", $$v)},expression:\"form.password\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"passwordAgain\",\"label\":\"确认密码\"}},[_c('el-input',{attrs:{\"type\":\"password\"},model:{value:(_vm.form.passwordAgain),callback:function ($$v) {_vm.$set(_vm.form, \"passwordAgain\", $$v)},expression:\"form.passwordAgain\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"resetPasswordQuestion\",\"label\":\"重置密码问题\"}},[_c('el-select',{model:{value:(_vm.form.resetPasswordQuestion),callback:function ($$v) {_vm.$set(_vm.form, \"resetPasswordQuestion\", $$v)},expression:\"form.resetPasswordQuestion\"}},_vm._l((_vm.questions),function(option){return _c('el-option',{key:_vm.getKey(option),attrs:{\"value\":option}},[_vm._v(\" \"+_vm._s(option)+\" \")])}),1)],1),_c('el-form-item',{attrs:{\"prop\":\"resetPasswordAnswer\",\"label\":\"重置密码答案\"}},[_c('el-input',{model:{value:(_vm.form.resetPasswordAnswer),callback:function ($$v) {_vm.$set(_vm.form, \"resetPasswordAnswer\", $$v)},expression:\"form.resetPasswordAnswer\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"contactPhone\",\"label\":\"联系电话\"}},[_c('el-input',{model:{value:(_vm.form.contactPhone),callback:function ($$v) {_vm.$set(_vm.form, \"contactPhone\", $$v)},expression:\"form.contactPhone\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"telephone\",\"label\":\"手机号码\"}},[_c('el-input',{model:{value:(_vm.form.telephone),callback:function ($$v) {_vm.$set(_vm.form, \"telephone\", $$v)},expression:\"form.telephone\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"contactAddress\",\"label\":\"联系地址\"}},[_c('el-input',{model:{value:(_vm.form.contactAddress),callback:function ($$v) {_vm.$set(_vm.form, \"contactAddress\", $$v)},expression:\"form.contactAddress\"}})],1),_c('el-form-item',{attrs:{\"prop\":\"zipCode\",\"label\":\"邮政编号\"}},[_c('el-input',{model:{value:(_vm.form.zipCode),callback:function ($$v) {_vm.$set(_vm.form, \"zipCode\", $$v)},expression:\"form.zipCode\"}})],1),_c('el-form-item',{staticClass:\"register-card__operation\"},[_c('el-button',{attrs:{\"loading\":_vm.loading,\"type\":\"primary\"},on:{\"click\":_vm.handleRegister}},[_vm._v(\" 注册 \")]),_c('el-button',{on:{\"click\":_vm.handleReset}},[_vm._v(\"重置\")])],1)],1)],1),_c('div',{staticClass:\"register-card__right\"},[_vm._m(0),_c('div',{staticClass:\"register-card__logo\"},[_c('Logo',{attrs:{\"fade\":\"\"}})],1)]),_c('div')])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"register-card__welcome\"},[_c('h1',[_vm._v(\"欢迎报考上海师范大学\")])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Vue, Component } from 'vue-property-decorator'\r\nimport { ElForm } from 'element-ui/types/form'\r\nimport Logo from '@/components/layout/Logo.vue'\r\nimport NationalSelect from '@/components/exam/NationalSelect.vue'\r\nimport { ConfigStore } from '@/store/config'\r\nimport { createStudent } from '@/apis/student'\r\nimport { getKey } from '@/utils/key'\r\nimport { alert, confirm } from '@/utils/notification'\r\nimport { createValidator } from '@/utils/element'\r\n\r\n@Component({\r\n components: { Logo, NationalSelect }\r\n})\r\nexport default class Register extends Vue {\r\n getKey = getKey\r\n loading = false\r\n form = {\r\n idNumber: '',\r\n name: '',\r\n sex: null as number | null,\r\n birthday: null as Date | null,\r\n national: '',\r\n password: '',\r\n passwordAgain: '',\r\n resetPasswordQuestion: '',\r\n resetPasswordAnswer: '',\r\n contactAddress: '',\r\n contactPhone: '',\r\n telephone: '',\r\n zipCode: ''\r\n }\r\n\r\n rules = {\r\n idNumber: [\r\n { required: true, message: '请输入有效的身份证号码', trigger: 'change' },\r\n {\r\n // validator: createValidator(async (rule, value) => {\r\n // if (!checkIDCard(value)) throw '请输入有效的身份证号码'\r\n // }),\r\n trigger: 'blur'\r\n }\r\n ],\r\n name: [{ required: true, message: '请输入姓名', trigger: 'change' }],\r\n sex: [{ required: true, message: '请选择性别', trigger: 'change' }],\r\n birthday: [\r\n {\r\n type: 'date',\r\n required: true,\r\n message: '请选择出生年月',\r\n trigger: 'change'\r\n }\r\n ],\r\n national: [{ required: true, message: '请选择民族', trigger: 'change' }],\r\n password: [\r\n { required: true, message: '请输入密码', trigger: 'change' },\r\n { min: 6, message: '至少需要设置 6 位密码', trigger: 'change' }\r\n ],\r\n passwordAgain: [\r\n { required: true, message: '请再次输入密码', trigger: 'change' },\r\n {\r\n validator: createValidator(async (rule, value) => {\r\n if (value !== this.form.password) throw '两次输入密码不一致'\r\n }),\r\n trigger: 'blur'\r\n }\r\n ],\r\n resetPasswordQuestion: [\r\n { required: true, message: '请选择密保问题', trigger: 'change' }\r\n ],\r\n resetPasswordAnswer: [\r\n { required: true, message: '请输入密保答案', trigger: 'change' }\r\n ]\r\n }\r\n\r\n get questions() {\r\n const configs = ConfigStore.configs\r\n const options =\r\n configs.find(a => a.key === 'resetPasswordQuestion')?.value ?? []\r\n return options\r\n }\r\n\r\n async handleRegister() {\r\n try {\r\n const form = this.$refs.form as ElForm\r\n await form.validate()\r\n } catch (e) {\r\n return\r\n }\r\n\r\n const birthday = this.form.birthday as Date\r\n const form = {\r\n ...this.form,\r\n sex: this.form.sex as number,\r\n birthYear: birthday.getFullYear().toString(),\r\n birthMonth: birthday.getMonth().toString()\r\n }\r\n\r\n try {\r\n this.loading = true\r\n await createStudent(form)\r\n await confirm('注册成功')\r\n this.$router.push('/')\r\n } catch (e) {\r\n alert('注册失败,请重试', e)\r\n } finally {\r\n this.loading = false\r\n }\r\n }\r\n\r\n handleReset() {\r\n const form = this.$refs.form as ElForm\r\n form.resetFields()\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Register.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Register.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Register.vue?vue&type=template&id=6565175c&\"\nimport script from \"./Register.vue?vue&type=script&lang=ts&\"\nexport * from \"./Register.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./Register.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","type Rule = {\r\n validator: T\r\n field: string\r\n fullField: string\r\n type: string\r\n}\r\n\r\ntype AsyncValidator = (\r\n rule: Rule>,\r\n value: T\r\n) => Promise\r\n\r\ntype Validator = (\r\n rule: Rule>,\r\n value: T,\r\n callback: (e?: Error) => void\r\n) => void\r\n\r\n/**\r\n * This is a NOOP\r\n * @param validator\r\n */\r\nexport function createValidator(\r\n validator: AsyncValidator\r\n): AsyncValidator\r\n\r\n/**\r\n * This is a NOOP\r\n * @param validator\r\n */\r\nexport function createValidator(\r\n validator: Validator\r\n): Validator\r\n\r\nexport function createValidator(validator: any) {\r\n return validator\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.print)?_c('el-select',{attrs:{\"filterable\":\"\",\"size\":\"mini\"},model:{value:(_vm.national),callback:function ($$v) {_vm.national=$$v},expression:\"national\"}},_vm._l((_vm.nationals),function(national){return _c('el-option',{key:_vm.getKey(national),attrs:{\"value\":national}},[_vm._v(\" \"+_vm._s(national)+\" \")])}),1):_c('span',[_vm._v(_vm._s(_vm.value))])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Vue, Component, Prop } from 'vue-property-decorator'\r\nimport { ConfigStore } from '@/store/config'\r\nimport { getKey } from '@/utils/key'\r\n\r\n@Component\r\nexport default class NationalSelect extends Vue {\r\n @Prop() value!: string\r\n @Prop() print!: boolean\r\n getKey = getKey\r\n\r\n get nationals() {\r\n return ConfigStore.configs.find(a => a.key === 'national')?.value ?? []\r\n }\r\n\r\n get national() {\r\n return this.value\r\n }\r\n\r\n set national(value) {\r\n this.$emit('update:value', value)\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NationalSelect.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NationalSelect.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./NationalSelect.vue?vue&type=template&id=1a0862a5&\"\nimport script from \"./NationalSelect.vue?vue&type=script&lang=ts&\"\nexport * from \"./NationalSelect.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import { post, get, put } from '@/apis'\r\nimport { ValidateQustionPayload } from '@/models/student/question'\r\nimport { ResetPasswordPayload, RegisterPayload } from '@/models/student'\r\n\r\n/**\r\n * 注册\r\n * @param payload 学生信息\r\n */\r\nexport async function createStudent(payload: RegisterPayload) {\r\n await post(`student`, payload)\r\n}\r\n\r\n/**\r\n * 获取密保问题\r\n * @param IdNumber 身份证号码\r\n */\r\nexport async function fetchQustion(IdNumber: string) {\r\n const { data } = await get(`student/question/${IdNumber}`)\r\n return data\r\n}\r\n\r\n/**\r\n * 校验密保问题答案\r\n * @param payload 身份证/密保答案\r\n */\r\nexport async function validateQustion(payload: ValidateQustionPayload) {\r\n await post(`student/question`, payload)\r\n}\r\n\r\nexport async function resetPassword(payload: ResetPasswordPayload) {\r\n await put(`student/password`, payload)\r\n}\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/style-resources-loader/lib/index.js??ref--8-oneOf-1-4!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Register.vue?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}