From 4208524c6636c958f3c5cd6fb730489c83053974 Mon Sep 17 00:00:00 2001 From: wyx Date: Wed, 18 Jan 2023 10:41:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index c50d341..9126c49 100644 --- a/vue.config.js +++ b/vue.config.js @@ -8,6 +8,6 @@ */ const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ - publicPath: "/student-h5", + publicPath: process.env.VITE_BASE, transpileDependencies: true }) From 535e73fb4fed14671e6ab27638b35ee5c44ce59d Mon Sep 17 00:00:00 2001 From: lixg Date: Wed, 18 Jan 2023 14:21:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/router/index.js | 10 ++--- src/views/faceteach/FaceTeach.vue | 60 ++++++++++++--------------- src/views/homeworkpage/UploadWork.vue | 15 +++++-- 4 files changed, 44 insertions(+), 43 deletions(-) diff --git a/src/App.vue b/src/App.vue index 5254b68..a285f4a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -25,7 +25,7 @@ import { useStore } from "vuex"; import { boeRequest } from "@/api/request"; import { GET_USER_INFO } from "@/api/ThirdApi"; import { getCookie } from "@/api/utils"; - +console.log("版本1.2.0------------"); const store = useStore(); const router = useRouter(); diff --git a/src/router/index.js b/src/router/index.js index 2728bca..7884067 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,6 @@ -import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'; +import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'; import routesConfig from './config'; -import {getCookie} from "@/api/utils"; +import { getCookie } from "@/api/utils"; // console.log('routesConfig', routesConfig) const routes = [ @@ -19,9 +19,9 @@ const router = createRouter({ router.beforeEach((to, from, next) => { if (!getCookie('token')) { if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") { - to.path.includes('/login') ? next() : next({path: '/login', query: {returnUrl: to.fullPath}}) - }else { - window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE+to.fullPath + to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: to.fullPath } }) + } else { + window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE + to.fullPath } } next() diff --git a/src/views/faceteach/FaceTeach.vue b/src/views/faceteach/FaceTeach.vue index bb0ee61..667b12b 100644 --- a/src/views/faceteach/FaceTeach.vue +++ b/src/views/faceteach/FaceTeach.vue @@ -218,12 +218,7 @@ -
+
-
+
下载
下载 @@ -280,26 +278,21 @@ 作业
+
+ 交作业 +
- -
- 交作业 -
data.value?.planDto?.teacherId)); const state = reactive({ @@ -562,6 +552,7 @@ function toWork() { let date2 = new Date().getTime(); if (date1 > date2) { ElMessage.warning("未到开始时间,请耐心等待!"); + return; } } router.push({ @@ -584,6 +575,7 @@ function toExamItem(obj) { let date2 = new Date().getTime(); if (date1 > date2) { ElMessage.warning("未到开始时间,请耐心等待!"); + return; } } console.log("obj", obj.examinationTestId); diff --git a/src/views/homeworkpage/UploadWork.vue b/src/views/homeworkpage/UploadWork.vue index 375d4cb..f6ccf85 100644 --- a/src/views/homeworkpage/UploadWork.vue +++ b/src/views/homeworkpage/UploadWork.vue @@ -26,9 +26,12 @@
- - - + +
@@ -84,10 +87,16 @@ export default { // clearFiles(); }); }; + const deleteAll = () => { + console.log("点击"); + textarea.value = ""; + fileList.value = []; + }; return { ...toRefs(state), publishWork, textarea, + deleteAll, }; }, };