diff --git a/src/renderer/src/api/apiService.js b/src/renderer/src/api/apiService.js
index d5d1668..b030354 100644
--- a/src/renderer/src/api/apiService.js
+++ b/src/renderer/src/api/apiService.js
@@ -36,3 +36,18 @@ export class toLink {
// 删除链接-缓存
static delLink = key => ApiService.publicHttp(`/smarttalk/toLink/${key}`, null, 'delete')
}
+
+// v2.5加入 认证学校
+export class school {
+ // 学校加入 认证
+ static schoolJoin = data => ApiService.publicHttp(`/smarttalk/register/schoolJoin`,data, 'post')
+ // 获取学校列表
+ static deptTree = data => ApiService.publicHttp(`/smarttalk/register/deptTree`)
+ // 获取当前用户审核详情
+ static registerinfo = data => ApiService.publicHttp(`/smarttalk/register/info`)
+ // 获取学校管理列表
+ static auditlist = data => ApiService.publicHttp(`/smarttalk/audit/list`,data)
+ // 获取学校管理审核
+ static checkSchool = data => ApiService.publicHttp(`/smarttalk/audit/checkSchool`,data,'post')
+
+}
\ No newline at end of file
diff --git a/src/renderer/src/api/login.js b/src/renderer/src/api/login.js
index 9d9be49..b861345 100644
--- a/src/renderer/src/api/login.js
+++ b/src/renderer/src/api/login.js
@@ -139,10 +139,19 @@ export function listEvaluation(query) {
})
}
// 发送验证码
-export function sendcode(query) {
+export function sendcode(data) {
return request({
url: '/code/send',
method: 'post',
data
})
}
+
+// 教师注册
+export function instructorregister(data) {
+ return request({
+ url: '/instructor/register',
+ method: 'post',
+ data
+ })
+}
diff --git a/src/renderer/src/layout/components/Aside.vue b/src/renderer/src/layout/components/Aside.vue
index 61f9f3b..ba39451 100644
--- a/src/renderer/src/layout/components/Aside.vue
+++ b/src/renderer/src/layout/components/Aside.vue
@@ -10,14 +10,15 @@
-
- -
+
+ -
学校认证
未认证
- - 加入学校
+ - 加入学校
- 个人中心
+ - 学校管理
- 班级中心
- 退出登录
@@ -51,13 +52,14 @@
\ No newline at end of file
diff --git a/src/renderer/src/router/index.js b/src/renderer/src/router/index.js
index 56215f2..1a789b1 100644
--- a/src/renderer/src/router/index.js
+++ b/src/renderer/src/router/index.js
@@ -152,7 +152,12 @@ export const constantRoutes = [
name: 'schoolCertification',
meta: {title: '学校认证'}
},
-
+ {
+ path: '/schoolManagement',
+ component: () => import('@/views/schoolManagement/index.vue'),
+ name: 'schoolManagement',
+ meta: {title: '学校管理'}
+ },
]
},
...toolRouters
diff --git a/src/renderer/src/store/modules/user.js b/src/renderer/src/store/modules/user.js
index 3a45327..c3b4a2e 100644
--- a/src/renderer/src/store/modules/user.js
+++ b/src/renderer/src/store/modules/user.js
@@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
-import { login, logout, getInfo } from '@/api/login'
+import { login, logout, getInfo, getdeptTree } from '@/api/login'
+import {school} from '@/api/apiService'
import { getToken, setToken, removeToken } from '@/utils/auth'
import defAva from '@/assets/images/user.png'
@@ -11,7 +12,8 @@ const useUserStore = defineStore('user', {
avatar: '',
roles: [],
permissions: [],
- user: {}
+ user: {},
+ DeptInfo:{}
}),
actions: {
// 登录
@@ -80,6 +82,12 @@ const useUserStore = defineStore('user', {
})
})
},
+ // 注册部门信息
+ getDeptInfo(){
+ school.registerinfo().then(res=>{
+ this.DeptInfo=res.data || {}
+ })
+ },
// 退出系统
logOut() {
return new Promise((resolve, reject) => {
diff --git a/src/renderer/src/views/joinSchool/index.vue b/src/renderer/src/views/joinSchool/index.vue
index df39cf2..7d01a05 100644
--- a/src/renderer/src/views/joinSchool/index.vue
+++ b/src/renderer/src/views/joinSchool/index.vue
@@ -1,36 +1,39 @@
-
加入学校
-
-
-
+
加入学校
+
+
+
+
申请审核中
+
申请信息已提交,请耐心等待审核通过即可完成申请。
+
+
+
+
-
-
+
+
-
+
{{ state.user.nickName }}
@@ -41,8 +44,8 @@
- 关闭
- 确定
+ 关闭
+ 确定
@@ -51,27 +54,57 @@
diff --git a/src/renderer/src/views/login/index.vue b/src/renderer/src/views/login/index.vue
index d14c911..ed5bdc6 100644
--- a/src/renderer/src/views/login/index.vue
+++ b/src/renderer/src/views/login/index.vue
@@ -25,7 +25,7 @@
登录
@@ -35,20 +35,20 @@
账号注册
-
+
-
- 发送验证码
+
+ {{ codeName }}
-
+
立即注册
@@ -73,7 +73,7 @@ import WindowTools from '@/components/window-tools/index.vue'
import SelectSubject from '@/components/select-subject/index.vue'
import Register from './components/Register.vue'
import { sessionStore } from '@/utils/store'
-import {sendcode} from '@/api/login'
+import {sendcode,instructorregister} from '@/api/login'
const { session } = require('@electron/remote')
const downloadProp = ref(0)
@@ -86,6 +86,8 @@ const isSubject = ref(false)
const RegModel = ref(false)
const isRegister = ref(true)
const ruleFormRef = ref(null)
+const codeName=ref('发送验证码')
+const timer=ref(null)
//表单
const loginForm = reactive({
username: '',
@@ -99,7 +101,8 @@ const ruleForm = reactive({
//表单规则
const rules = reactive({
username: [{ required: true, trigger: 'blur', message: '请输入您的账号' }],
- password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }]
+ password: [{ required: true, trigger: 'blur', message: '请输入您的密码' }],
+ smsCode: [{ required: true, trigger: 'blur', message: '请输入您的验证码' }],
})
let curWinUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
@@ -108,9 +111,42 @@ ipcRenderer.on('update-app-progress', (e, prop) => {
downloadProp.value = prop
showDownLoading.value = prop !== 100
})
+const gotoreRegister=()=>{
+ codeName.value='发送验证码'
+ if(timer.value){
+ clearInterval(timer.value);
+ }
+ isRegister.value=false
+}
// 发送验证码
const sendyzm=()=>{
- // sendcode
+ if(ruleForm.username){
+ const pattern = /^1[3-9]\d{9}$/;
+ if( pattern.test(ruleForm.username) ){
+ sendcode({username:ruleForm.username, source: '4'}).then(res=>{
+ if(res.code==200){
+ ElMessage.success('消息发送成功')
+ codeName.value=60
+ timer.value=setInterval(()=>{
+ codeName.value--
+ if(codeName.value==0){
+ codeName.value='发送验证码'
+ clearInterval(timer.value);
+ }
+ },1000)
+ }else{
+ ElMessage.error(res.msg)
+ }
+ })
+ }else{
+ ElMessage.error('请输入正确的手机号码')
+ }
+ // captchaImg({mobile:ruleForm.phoneNumber}).then(res=>{
+ // console.log('res->', res)
+ // })
+ }else{
+ ElMessage.error('请输入手机号码')
+ }
}
// 打开弹窗
const RegisterModel = type => {
@@ -179,24 +215,25 @@ const setCookie = (name, value) => {
}
return session.defaultSession.cookies.set(cookie)
}
+const gotoLogin = () => {
+ codeName.value='发送验证码'
+ if (ruleFormRef.value) ruleFormRef.value.resetFields()
+ isRegister.value = true
+}
// 注册
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)
- // }
- // })
+ instructorregister(ruleForm).then(res=>{
+ if(res.code==200){
+ ElMessage.success('您已注册成功')
+ if (ruleFormRef.value) ruleFormRef.value.resetFields()
+ gotoLogin()
+ }else{
+ ElMessage.error(res.msg)
+ }
+ })
console.log('submit!')
} else {
console.log('error submit!', fields)
diff --git a/src/renderer/src/views/schoolCertification/index.vue b/src/renderer/src/views/schoolCertification/index.vue
index f23d525..530c1e8 100644
--- a/src/renderer/src/views/schoolCertification/index.vue
+++ b/src/renderer/src/views/schoolCertification/index.vue
@@ -1,39 +1,44 @@
学校认证
-
+
+
申请审核中
申请信息已提交,请耐心等待审核通过即可完成申请。
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
-
+
+
{{ state.user.nickName }}
@@ -45,11 +50,11 @@
- 以上信息真实有效,勾选后提交
+ 以上信息真实有效,勾选后提交
- 关闭
- 确定
+ 关闭
+ 确定
@@ -60,27 +65,66 @@
diff --git a/src/renderer/src/views/schoolManagement/index.vue b/src/renderer/src/views/schoolManagement/index.vue
new file mode 100644
index 0000000..9dbcdc1
--- /dev/null
+++ b/src/renderer/src/views/schoolManagement/index.vue
@@ -0,0 +1,197 @@
+
+
+
学校管理
+
+
+
+
+
+
+
+
+
+ {{scope.row.status==0?'审核中':scope.row.status==1?'已通过':'已驳回' }}
+
+
+
+
+ 审核
+
+
+
+
+
+
+
+ 审核状态:
+
+ 通过
+ 拒绝
+
+
+
+ 审核理由:
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file