From a377375030cecc4c578229f9d9e61c621ffd577b Mon Sep 17 00:00:00 2001
From: helloworld180 <1678854362@qq.com>
Date: Fri, 11 Oct 2024 05:06:32 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=90=8E=E7=AB=AF=E5=AF=B9=E6=8E=A5?=
=?UTF-8?q?=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
FRONT_ATTENDANCE/index.html | 2 +-
FRONT_ATTENDANCE/src/assets/css/result.css | 29 +-
FRONT_ATTENDANCE/src/assets/image/back.svg | 1 +
FRONT_ATTENDANCE/src/assets/image/stage.svg | 10 +
FRONT_ATTENDANCE/src/utils/axiosConfig.js | 64 ++---
FRONT_ATTENDANCE/src/views/beginCall.vue | 34 ++-
FRONT_ATTENDANCE/src/views/home.vue | 35 +++
FRONT_ATTENDANCE/src/views/importFile.vue | 9 +-
FRONT_ATTENDANCE/src/views/login2.vue | 29 +-
FRONT_ATTENDANCE/src/views/result.vue | 41 ++-
FRONT_ATTENDANCE/src/views/ruleSetting.vue | 2 +-
FRONT_ATTENDANCE/src/views/seeChart.vue | 297 +++++++++-----------
12 files changed, 308 insertions(+), 245 deletions(-)
create mode 100644 FRONT_ATTENDANCE/src/assets/image/back.svg
create mode 100644 FRONT_ATTENDANCE/src/assets/image/stage.svg
diff --git a/FRONT_ATTENDANCE/index.html b/FRONT_ATTENDANCE/index.html
index 92986bb..9cc323d 100644
--- a/FRONT_ATTENDANCE/index.html
+++ b/FRONT_ATTENDANCE/index.html
@@ -4,7 +4,7 @@
-
Vite App
+ 点点小助手
diff --git a/FRONT_ATTENDANCE/src/assets/css/result.css b/FRONT_ATTENDANCE/src/assets/css/result.css
index 04a0983..7cd9273 100644
--- a/FRONT_ATTENDANCE/src/assets/css/result.css
+++ b/FRONT_ATTENDANCE/src/assets/css/result.css
@@ -35,31 +35,46 @@
}
.lucky-icon {
- width: 780px;
+ width: 700px;
position: relative;
}
+ .stage-icon {
+ position: absolute;
+ width: 900px;
+ top: 44%;
+ }
+ .student-info {
+ position: absolute;
+ text-align: center; /* 确保文本居中 */
+ top: 34%;
+}
- .student-id {
+.student-id, .student-name {
+ font-size: 75px;
+ font-weight: bold;
+ color: black;
+}
+ /* .student-id {
position: absolute;
- top: 35%;
+ top: 33%;
font-size: 75px;
font-weight: bold;
color: black;
}
.student-name {
position: absolute;
- top: 50%;
+ top: 45%;
font-size: 75px;
font-weight: bold;
color: black;
- }
+ } */
.student-msg {
position: absolute;
left: 5%;
right: 5%;
- top: 65%;
- font-size: 35px;
+ top: 62.5%;
+ font-size: 33px;
text-align: center;
font-weight: bold;
color: #333;
diff --git a/FRONT_ATTENDANCE/src/assets/image/back.svg b/FRONT_ATTENDANCE/src/assets/image/back.svg
new file mode 100644
index 0000000..beb2462
--- /dev/null
+++ b/FRONT_ATTENDANCE/src/assets/image/back.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/FRONT_ATTENDANCE/src/assets/image/stage.svg b/FRONT_ATTENDANCE/src/assets/image/stage.svg
new file mode 100644
index 0000000..236a12b
--- /dev/null
+++ b/FRONT_ATTENDANCE/src/assets/image/stage.svg
@@ -0,0 +1,10 @@
+
diff --git a/FRONT_ATTENDANCE/src/utils/axiosConfig.js b/FRONT_ATTENDANCE/src/utils/axiosConfig.js
index 5791e28..3131352 100644
--- a/FRONT_ATTENDANCE/src/utils/axiosConfig.js
+++ b/FRONT_ATTENDANCE/src/utils/axiosConfig.js
@@ -4,7 +4,7 @@ import {getToken} from '@/token/auth' // 注意这里使用了解构赋值来导
// 创建axios实例
const service = axios.create({
- baseURL: 'http://localhost:8080/api', // 配置基础URL
+ baseURL: ' http://p4ue3i.natappfree.cc/api', // 配置基础URL
timeout: 5000, // 请求超时时间
});
@@ -13,9 +13,13 @@ service.interceptors.request.use(
config => {
// 在发送请求之前做些什么
const token = getToken(); // 获取token的方式取决于你的应用
+ console.log('请求拦截器的token是:' +token)
+ console.log('Request Config:', config);
if (token) {
config.headers['Authorization'] = `Bearer ${token}`; // 设置token
+ // axios.defaults.headers.common['Authorization'] = 'Bearer ' + token;
}
+ config.headers['Accept'] = 'application/json';
return config;
},
error => {
@@ -29,62 +33,32 @@ service.interceptors.request.use(
service.interceptors.response.use(
response => {
// 对响应数据做点什么
- // 注意!!!这里返回已经包含data
+ // !!!注意!!!这里返回已经包含data
const res = response.data;
// 你可以根据实际情况在这里添加一些通用的响应处理逻辑
// 例如,根据返回的状态码判断请求是否成功
- if (res.code !== 200) {
+ // if (res.code !== 200) {
// 业务错误处理,比如弹窗提示等
- return Promise.reject(new Error(res.message || 'Error'));
- } else {
+ // return Promise.reject(new Error(res.message || 'Error'));
+ // } else {
return res;
- }
+ // }
},
error => {
// 对响应错误做点什么
- if (error.response) {
+ // if (error.response) {
// 请求已发出,但服务器响应的状态码不在2xx的范围
- console.error('Error status:', error.response.status);
- console.error('Error data:', error.response.data);
- } else if (error.request) {
+ // console.error('Error status:', error.response.status);
+ // console.error('Error data:', error.response.data);
+ // } else if (error.request) {
// 请求已发出,但没有收到响应
- console.error('Error request:', error.request);
- } else {
+ // console.error('Error request:', error.request);
+ // } else {
// 在设置请求时触发错误
- console.error('Error message:', error.message);
- }
+ console.error('响应拦截器errorMessage:', error.message);
+ // }
return Promise.reject(error);
}
);
-export default service;
-
-
-// 使用
-// 导入封装好的axios实例
-// import axios from './axiosConfig';
-
-// 登录方法
-// methods: {
-// async login() {
-// try {
-// const response = await axios.post('/api/login', {
-// username: this.username,
-// password: this.password
-// });
-
-// // 假设token在响应的data字段中
-// const token = response.data.token;
-
-// // 存储token
-// setToken(token);
-
-// // 登录成功后的操作,比如跳转到主页
-// this.$router.push('/home');
-// } catch (error) {
-// // 处理登录错误
-// console.error('Login Error:', error);
-// }
-// }
-// }
-
+export default service;
\ No newline at end of file
diff --git a/FRONT_ATTENDANCE/src/views/beginCall.vue b/FRONT_ATTENDANCE/src/views/beginCall.vue
index 6330d67..9d2e911 100644
--- a/FRONT_ATTENDANCE/src/views/beginCall.vue
+++ b/FRONT_ATTENDANCE/src/views/beginCall.vue
@@ -20,10 +20,12 @@
+ };
+
+ function close() {
+ router.push('/home');
+ }
+
+ onMounted(() => {
+ fetchStudents();
+ });
+
-
\ No newline at end of file
+
\ No newline at end of file