新增加入学校 学校认证
This commit is contained in:
parent
b7dc080840
commit
7319c396c4
|
@ -11,11 +11,12 @@
|
|||
</template>
|
||||
<div class="head-aside">
|
||||
<ul>
|
||||
<li class="auth-li">
|
||||
<li class="auth-li" @click="onUserTo('/schoolCertification')">
|
||||
<i class="iconfont icon-renzheng-"></i>
|
||||
<span class="mlr-5">学校认证</span>
|
||||
<span class="gray">未认证</span>
|
||||
</li>
|
||||
<li @click="onUserTo('/joinSchool')">加入学校</li>
|
||||
<li @click="onUserTo('/profile')">个人中心</li>
|
||||
<li @click="onUserTo('/class')">班级中心</li>
|
||||
<li @click="logout">退出登录</li>
|
||||
|
|
|
@ -134,6 +134,19 @@ export const constantRoutes = [
|
|||
name: 'setting',
|
||||
meta: {title: '设置'}
|
||||
},
|
||||
{
|
||||
path: '/joinSchool',
|
||||
component: () => import('@/views/joinSchool/index.vue'),
|
||||
name: 'joinSchool',
|
||||
meta: {title: '加入学校'}
|
||||
},
|
||||
{
|
||||
path: '/schoolCertification',
|
||||
component: () => import('@/views/schoolCertification/index.vue'),
|
||||
name: 'schoolCertification',
|
||||
meta: {title: '学校认证'}
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
...toolRouters
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<template>
|
||||
<div class="joinschool">
|
||||
<div>加入学校</div>
|
||||
<div class="box-item login" >
|
||||
<el-form ref="ruleFormRef" label-width="auto" size="large">
|
||||
<el-form-item label="所属地区" prop="username">
|
||||
<el-cascader
|
||||
style="width:100%"
|
||||
popper-class="aix-regist-address"
|
||||
:options="regionData"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校名称" prop="Code">
|
||||
<el-input placeholder="请输入学校名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人" >
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人电话" >
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item >
|
||||
<div style="width:100%;text-align: right;padding-right:100px">
|
||||
<el-button style="width:100px" type="default">关闭</el-button>
|
||||
<el-button style="width:100px" type="primary" >确定</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup >
|
||||
import { regionData, codeToText } from 'element-china-area-data'
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.joinschool{
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
|
@ -26,8 +26,6 @@
|
|||
</el-form-item>
|
||||
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
|
||||
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="isRegister=false">注册账号</a>
|
||||
|
|
||||
<a class="hover:text-sky-500" style="margin-left: 10px;" >忘记密码</a>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -35,22 +33,22 @@
|
|||
<div class="box-item login" v-else>
|
||||
<WindowTools :is-has-max="false" />
|
||||
<div class="login-title">账号注册</div>
|
||||
<el-form ref="formRef" class="login-form" :rules="rules" size="large">
|
||||
<el-form ref="ruleFormRef" class="login-form" :model="ruleForm" label-width="auto" :rules="rules" size="large">
|
||||
<el-form-item label="手机号" prop="username">
|
||||
<el-input placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="验证码" prop="username">
|
||||
<el-form-item label="验证码" prop="Code">
|
||||
<el-input style="width:185px" placeholder="请输入验证码" /><el-button type="primary" >发送验证码</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label=" 密码" prop="password" >
|
||||
<el-input v-model="loginForm.password" autocomplete="on" type="password" placeholder="请输入密码" />
|
||||
<el-form-item label="密码" prop="password" >
|
||||
<el-input autocomplete="on" type="password" placeholder="请输入密码" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" >立即注册</el-button>
|
||||
<el-button class="btn" type="primary" @click="RegisterForm(ruleFormRef)">立即注册</el-button>
|
||||
</el-form-item>
|
||||
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
|
||||
<a class="hover:text-sky-500" style="margin-right: 10px;"> 《 返回登录 </a>
|
||||
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="isRegister=true"> 《 返回登录 </a>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -86,13 +84,17 @@ const btnLoading = ref(false)
|
|||
const isSubject = ref(false)
|
||||
const RegModel = ref(false)
|
||||
const isRegister = ref(true)
|
||||
const ruleFormRef = ref(null)
|
||||
//表单
|
||||
const loginForm = reactive({
|
||||
username: '',
|
||||
password: '',
|
||||
rememberMe: false
|
||||
})
|
||||
// 注册表单
|
||||
const ruleForm = reactive({
|
||||
|
||||
})
|
||||
//表单规则
|
||||
const rules = reactive({
|
||||
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
|
||||
|
@ -172,7 +174,30 @@ const setCookie = (name, value) => {
|
|||
}
|
||||
return session.defaultSession.cookies.set(cookie)
|
||||
}
|
||||
// 注册
|
||||
const RegisterForm = async (formEl) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
|
||||
var form={
|
||||
|
||||
}
|
||||
// signIn(form).then(res=>{
|
||||
// if(res.code==200){
|
||||
// ElMessage.success('您已注册成功,等待学校管理员审核')
|
||||
// if (ruleFormRef.value) ruleFormRef.value.resetFields()
|
||||
|
||||
// }else{
|
||||
// ElMessage.error(res.msg)
|
||||
// }
|
||||
// })
|
||||
console.log('submit!')
|
||||
} else {
|
||||
console.log('error submit!', fields)
|
||||
}
|
||||
})
|
||||
}
|
||||
onMounted(() => {
|
||||
localStorage.clear()
|
||||
sessionStore.set('subject', {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>加入学校</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup >
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue