diff --git a/frontend/public/loading/loading.css b/frontend/public/loading/loading.css
index a899eac..e06ac36 100644
--- a/frontend/public/loading/loading.css
+++ b/frontend/public/loading/loading.css
@@ -1 +1,52 @@
-#preloadingAnimation{position:fixed;left:0;top:0;height:100%;width:100%;background:#ffffff;user-select:none;z-index: 9999;overflow: hidden}.lds-roller{display:inline-block;position:relative;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(0.5,0,0.5,1) infinite;transform-origin:32px 32px;}.lds-roller div:after{content:" ";display:block;position:absolute;width:6px;height:6px;border-radius:50%;background:#13c2c2;margin:-3px 0 0 -3px;}.lds-roller div:nth-child(1){animation-delay:-0.036s;}.lds-roller div:nth-child(1):after{top:50px;left:50px;}.lds-roller div:nth-child(2){animation-delay:-0.072s;}.lds-roller div:nth-child(2):after{top:54px;left:45px;}.lds-roller div:nth-child(3){animation-delay:-0.108s;}.lds-roller div:nth-child(3):after{top:57px;left:39px;}.lds-roller div:nth-child(4){animation-delay:-0.144s;}.lds-roller div:nth-child(4):after{top:58px;left:32px;}.lds-roller div:nth-child(5){animation-delay:-0.18s;}.lds-roller div:nth-child(5):after{top:57px;left:25px;}.lds-roller div:nth-child(6){animation-delay:-0.216s;}.lds-roller div:nth-child(6):after{top:54px;left:19px;}.lds-roller div:nth-child(7){animation-delay:-0.252s;}.lds-roller div:nth-child(7):after{top:50px;left:14px;}.lds-roller div:nth-child(8){animation-delay:-0.288s;}.lds-roller div:nth-child(8):after{top:45px;left:10px;}#preloadingAnimation .load-tips{color: #13c2c2;font-size:2rem;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin-top:80px;text-align:center;width:400px;height:64px;} @keyframes lds-roller{0%{transform:rotate(0deg);} 100%{transform:rotate(360deg);}}
\ No newline at end of file
+#preloadingAnimation{
+ position:fixed;left:0;top:0;height:100%;width:100%;background:#ffffff;user-select:none;
+ z-index: 9999;overflow: hidden}
+.lds-roller{
+ display:inline-block;
+ position:relative;
+ left:50%;
+ top:50%;
+ transform:translate(-50%,-50%);
+ width:64px;
+ height:64px;
+}
+.lds-roller div{
+ animation:lds-roller 1.2s cubic-bezier(0.5,0,0.5,1) infinite;
+ transform-origin:32px 32px;
+}
+.lds-roller div:after{
+ content:" ";
+ display:block;
+ position:absolute;
+ width:6px;
+ height:6px;
+ border-radius:50%;
+ background:#13c2c2;
+ margin:-3px 0 0 -3px;
+}
+.lds-roller div:nth-child(1){animation-delay:-0.036s;}
+.lds-roller div:nth-child(1):after{top:50px;left:50px;}
+.lds-roller div:nth-child(2){animation-delay:-0.072s;}
+.lds-roller div:nth-child(2):after{top:54px;left:45px;}
+.lds-roller div:nth-child(3){animation-delay:-0.108s;}
+.lds-roller div:nth-child(3):after{top:57px;left:39px;}
+.lds-roller div:nth-child(4){animation-delay:-0.144s;}
+.lds-roller div:nth-child(4):after{top:58px;left:32px;}
+.lds-roller div:nth-child(5){animation-delay:-0.18s;}
+.lds-roller div:nth-child(5):after{top:57px;left:25px;}
+.lds-roller div:nth-child(6){animation-delay:-0.216s;}
+.lds-roller div:nth-child(6):after{top:54px;left:19px;}
+.lds-roller div:nth-child(7){animation-delay:-0.252s;}
+.lds-roller div:nth-child(7):after{top:50px;left:14px;}
+.lds-roller div:nth-child(8){animation-delay:-0.288s;}
+.lds-roller div:nth-child(8):after{top:45px;left:10px;}
+#preloadingAnimation .load-tips{
+ color: #13c2c2;
+ font-size:2rem;
+ position:absolute;
+ left:50%;
+ top:50%;
+ transform:translate(-50%,-50%);margin-top:80px;
+ text-align:center;width:400px;height:64px;}
+@keyframes lds-roller{0%{transform:rotate(0deg);}
+ 100%{transform:rotate(360deg);}}
\ No newline at end of file
diff --git a/frontend/public/loading/loading.html b/frontend/public/loading/loading.html
index 9b93196..1d51177 100644
--- a/frontend/public/loading/loading.html
+++ b/frontend/public/loading/loading.html
@@ -1 +1,27 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading
+
\ No newline at end of file
diff --git a/frontend/public/loading/option2/html_code_segment.html b/frontend/public/loading/option2/html_code_segment.html
index df81b26..fc874e3 100644
--- a/frontend/public/loading/option2/html_code_segment.html
+++ b/frontend/public/loading/option2/html_code_segment.html
@@ -1,5 +1,31 @@
+/**
+ * 预加载动画
+ */
+
-
+
\ No newline at end of file
diff --git a/frontend/public/loading/option2/loading.css b/frontend/public/loading/option2/loading.css
index c35cd73..4486a8a 100644
--- a/frontend/public/loading/option2/loading.css
+++ b/frontend/public/loading/option2/loading.css
@@ -1 +1,20 @@
-.preloading-animate{background:#ffffff;width:100%;height:100%;position:fixed;left:0;top:0;z-index:299;}.preloading-animate .preloading-wrapper{position:absolute;width:5rem;height:5rem;left:50%;top:50%;transform:translate(-50%,-50%);}.preloading-animate .preloading-wrapper .preloading-balls{font-size:5rem;}
\ No newline at end of file
+.preloading-animate{
+ background:#ffffff;
+ width:100%;
+ height:100%;
+ position:fixed;
+ left:0;
+ top:0;
+ z-index:299;
+}
+.preloading-animate .preloading-wrapper{
+ position:absolute;
+ width:5rem;
+ height:5rem;
+ left:50%;
+ top:50%;
+ transform:translate(-50%,-50%);
+}
+.preloading-animate .preloading-wrapper .preloading-balls{
+ font-size:5rem;
+}
\ No newline at end of file
diff --git a/frontend/src/api/exam.js b/frontend/src/api/exam.js
index c6d98b5..1344922 100644
--- a/frontend/src/api/exam.js
+++ b/frontend/src/api/exam.js
@@ -1,8 +1,15 @@
-// 考试相关的接口,包括考试、问题、选项和评分等接口
+/**
+ * @description: 考试模块接口,包括考试、问题、选项和评分等接口
+ */
import api from './index'
import { axios } from '../utils/request'
+/**
+ * @description: 根据传入的参数获取问题列表
+ * @param {Object} parameter - 查询参数
+ * @returns {Promise} - 返回问题列表的Promise对象
+ */
export function getQuestionList (parameter) {
return axios({
url: api.ExamQuestionList,
@@ -11,6 +18,10 @@ export function getQuestionList (parameter) {
})
}
+/**
+ * @description: 获取所有问题
+ * @returns {Promise} - 返回所有问题的Promise对象
+ */
export function getQuestionAll () {
return axios({
url: api.ExamQuestionAll,
@@ -18,6 +29,11 @@ export function getQuestionAll () {
})
}
+/**
+ * @description: 更新问题信息
+ * @param {Object} parameter - 问题更新参数
+ * @returns {Promise} - 返回更新操作的Promise对象
+ */
export function questionUpdate (parameter) {
console.log(parameter)
return axios({
@@ -27,6 +43,10 @@ export function questionUpdate (parameter) {
})
}
+/**
+ * @description: 获取问题的选项
+ * @returns {Promise} - 返回问题选项的Promise对象
+ */
export function getQuestionSelection () {
return axios({
url: api.ExamQuestionSelection,
@@ -37,6 +57,11 @@ export function getQuestionSelection () {
})
}
+/**
+ * @description: 创建新问题
+ * @param {Object} parameter - 问题创建参数
+ * @returns {Promise} - 返回创建操作的Promise对象
+ */
export function questionCreate (parameter) {
console.log(parameter)
return axios({
@@ -46,6 +71,11 @@ export function questionCreate (parameter) {
})
}
+/**
+ * @description: 根据传入的参数获取考试列表
+ * @param {Object} parameter - 查询参数
+ * @returns {Promise} - 返回考试列表的Promise对象
+ */
export function getExamList (parameter) {
return axios({
url: api.ExamList,
@@ -54,6 +84,10 @@ export function getExamList (parameter) {
})
}
+/**
+ * @description: 获取所有考试
+ * @returns {Promise} - 返回所有考试的Promise对象
+ */
export function getExamAll () {
return axios({
url: api.ExamAll,
@@ -61,7 +95,10 @@ export function getExamAll () {
})
}
-// 获取所有问题,按照单选、多选和判断进行分类
+/**
+ * @description: 获取所有问题,并按单选、多选和判断进行分类
+ * @returns {Promise} - 返回分类问题列表的Promise对象
+ */
export function getExamQuestionTypeList () {
return axios({
url: api.ExamQuestionTypeList,
@@ -72,6 +109,10 @@ export function getExamQuestionTypeList () {
})
}
+/**
+ * @description: 获取考试卡片列表
+ * @returns {Promise} - 返回考试卡片列表的Promise对象
+ */
export function getExamCardList () {
return axios({
url: api.ExamCardList,
@@ -82,6 +123,11 @@ export function getExamCardList () {
})
}
+/**
+ * @description: 创建新考试
+ * @param {Object} parameter - 考试创建参数
+ * @returns {Promise} - 返回创建操作的Promise对象
+ */
export function examCreate (parameter) {
console.log(parameter)
return axios({
@@ -91,6 +137,11 @@ export function examCreate (parameter) {
})
}
+/**
+ * @description: 更新考试信息
+ * @param {Object} parameter - 考试更新参数
+ * @returns {Promise} - 返回更新操作的Promise对象
+ */
export function examUpdate (parameter) {
console.log(parameter)
return axios({
@@ -100,6 +151,11 @@ export function examUpdate (parameter) {
})
}
+/**
+ * @description: 根据考试ID获取考试详情
+ * @param {String} examId - 考试ID
+ * @returns {Promise} - 返回考试详情的Promise对象
+ */
export function getExamDetail (examId) {
return axios({
url: api.ExamDetail + examId,
@@ -110,6 +166,11 @@ export function getExamDetail (examId) {
})
}
+/**
+ * @description: 根据记录ID获取考试记录详情
+ * @param {String} recordId - 记录ID
+ * @returns {Promise} - 返回考试记录详情的Promise对象
+ */
export function getExamRecordDetail (recordId) {
return axios({
url: api.recordDetail + recordId,
@@ -120,6 +181,11 @@ export function getExamRecordDetail (recordId) {
})
}
+/**
+ * @description: 根据问题ID获取问题详情
+ * @param {String} questionId - 问题ID
+ * @returns {Promise} - 返回问题详情的Promise对象
+ */
export function getQuestionDetail (questionId) {
return axios({
url: api.QuestionDetail + questionId,
@@ -130,6 +196,12 @@ export function getQuestionDetail (questionId) {
})
}
+/**
+ * @description: 提交考试答案,完成考试
+ * @param {String} examId - 考试ID
+ * @param {Object} answersMap - 答案映射
+ * @returns {Promise} - 返回完成考试的Promise对象
+ */
export function finishExam (examId, answersMap) {
console.log(answersMap)
return axios({
@@ -142,6 +214,10 @@ export function finishExam (examId, answersMap) {
})
}
+/**
+ * @description: 获取所有考试记录
+ * @returns {Promise} - 返回所有考试记录的Promise对象
+ */
export function getExamRecordList () {
return axios({
url: api.ExamRecordList,
diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js
index 05423bf..6867621 100644
--- a/frontend/src/api/index.js
+++ b/frontend/src/api/index.js
@@ -1,38 +1,117 @@
+/**
+ * @description: api接口统一管理
+ */
const api = {
+ /**
+ * @description: 用户登录的接口
+ */
Login: '/auth/login',
+ /**
+ * @description: 用户注销的接口
+ */
Logout: '/auth/logout',
+ /**
+ * @description: 重置密码的接口
+ */
ForgePassword: '/auth/forge-password',
+ /**
+ * @description: 用户注册的接口
+ */
Register: '/auth/register',
+ /**
+ * @description: 两步验证码的接口
+ */
twoStepCode: '/auth/2step-code',
+ /**
+ * @description: 发送短信的接口
+ */
SendSms: '/account/sms',
+ /**
+ * @description: 发送短信错误的接口
+ */
SendSmsErr: '/account/sms_err',
- // get my info
+ /**
+ * @description: 获取用户信息的接口
+ */
UserInfo: '/user/info',
// 下面是自己的用户认证的接口
+ /**
+ * @description: 用户注册(自定义)的接口
+ */
UserRegister: '/user/register',
+ /**
+ * @description: 用户登录(自定义)的接口
+ */
UserLogin: '/user/login',
// 考试的接口
+ /**
+ * @description: 获取考试问题列表的接口
+ */
ExamQuestionList: '/exam/question/list',
+ /**
+ * @description: 获取所有考试问题的接口
+ */
ExamQuestionAll: '/exam/question/all',
+ /**
+ * @description: 更新考试问题的接口
+ */
ExamQuestionUpdate: '/exam/question/update',
+ /**
+ * @description: 选择考试问题的接口
+ */
ExamQuestionSelection: '/exam/question/selection',
+ /**
+ * @description: 创建考试问题的接口
+ */
ExamQuestionCreate: '/exam/question/create',
+ /**
+ * @description: 获取考试列表的接口
+ */
ExamList: '/exam/list',
+ /**
+ * @description: 获取所有考试的接口
+ */
ExamAll: '/exam/all',
- // 获取问题列表,按照单选、多选和判断进行分类
+ /**
+ * @description: 按照单选、多选和判断分类获取问题列表的接口
+ */
ExamQuestionTypeList: '/exam/question/type/list',
+ /**
+ * @description: 创建考试的接口
+ */
ExamCreate: '/exam/create',
+ /**
+ * @description: 更新考试的接口
+ */
ExamUpdate: '/exam/update',
+ /**
+ * @description: 获取考试卡片列表的接口
+ */
ExamCardList: '/exam/card/list',
- // 获取考试详情
+ /**
+ * @description: 获取考试详情的接口
+ */
ExamDetail: '/exam/detail/',
- // 获取考试详情
+ /**
+ * @description: 获取问题详情的接口
+ */
QuestionDetail: '/exam/question/detail/',
- // 交卷
+ /**
+ * @description: 交卷的接口
+ */
FinishExam: '/exam/finish/',
+ /**
+ * @description: 获取考试记录列表的接口
+ */
ExamRecordList: '/exam/record/list',
+ /**
+ * @description: 获取考试记录详情的接口
+ */
recordDetail: '/exam/record/detail/'
}
+/**
+ * @description: 默认导出api对象
+ */
export default api
diff --git a/frontend/src/api/login.js b/frontend/src/api/login.js
index 9f71d6b..6ab7817 100644
--- a/frontend/src/api/login.js
+++ b/frontend/src/api/login.js
@@ -2,12 +2,12 @@ import api from './index'
import { axios } from '../utils/request'
/**
- * login func
- * parameter: {
- * username: '',
- * password: '',
- * remember_me: true,
- * captcha: '12345'
+ * 用户登录功能
+ * 参数: {
+ * username: 用户名
+ * password: 密码
+ * remember_me: 是否记住
+ * captcha: 验证码
* }
* @param parameter
* @returns {*}
@@ -21,6 +21,11 @@ export function login (parameter) {
})
}
+/**
+ * 获取短信验证码
+ * @param parameter
+ * @returns {*}
+ */
export function getSmsCaptcha (parameter) {
return axios({
url: api.SendSms,
@@ -29,6 +34,10 @@ export function getSmsCaptcha (parameter) {
})
}
+/**
+ * 获取用户信息
+ * @returns {*}
+ */
export function getInfo () {
return axios({
url: api.UserInfo,
@@ -39,6 +48,10 @@ export function getInfo () {
})
}
+/**
+ * 用户登出
+ * @returns {*}
+ */
export function logout () {
return axios({
url: api.Logout,
@@ -50,8 +63,9 @@ export function logout () {
}
/**
- * get user 2step code open?
- * @param parameter {*}
+ * 获取用户两步验证码开启状态
+ * @param parameter
+ * @returns {*}
*/
export function get2step (parameter) {
return axios({
diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js
index 71e361b..162ca03 100644
--- a/frontend/src/api/user.js
+++ b/frontend/src/api/user.js
@@ -3,6 +3,11 @@
import api from './index'
import { axios } from '../utils/request'
+/**
+ * 用户登录
+ * @param {Object} parameter - 登录参数
+ * @returns {Promise} - 返回登录请求的Promise
+ */
export function login (parameter) {
return axios({
url: api.UserLogin,
@@ -11,6 +16,11 @@ export function login (parameter) {
})
}
+/**
+ * 用户注册
+ * @param {Object} parameter - 注册参数
+ * @returns {Promise} - 返回注册请求的Promise
+ */
export function register (parameter) {
return axios({
url: api.UserRegister,
diff --git a/frontend/src/components/Exception/ExceptionPage.vue b/frontend/src/components/Exception/ExceptionPage.vue
index 132e346..7e9d584 100644
--- a/frontend/src/components/Exception/ExceptionPage.vue
+++ b/frontend/src/components/Exception/ExceptionPage.vue
@@ -1,24 +1,33 @@
+
+
+
+
{{ config[type].title }}
+
{{ config[type].desc }}
+
-
-
diff --git a/frontend/src/components/PageHeader/PageHeader.vue b/frontend/src/components/PageHeader/PageHeader.vue
index b9df938..40f5c6b 100644
--- a/frontend/src/components/PageHeader/PageHeader.vue
+++ b/frontend/src/components/PageHeader/PageHeader.vue
@@ -1,28 +1,38 @@
+