feat:增加版本号

This commit is contained in:
lixg
2023-01-18 14:21:57 +08:00
parent efc76cde13
commit 535e73fb4f
4 changed files with 44 additions and 43 deletions

View File

@@ -25,7 +25,7 @@ import { useStore } from "vuex";
import { boeRequest } from "@/api/request"; import { boeRequest } from "@/api/request";
import { GET_USER_INFO } from "@/api/ThirdApi"; import { GET_USER_INFO } from "@/api/ThirdApi";
import { getCookie } from "@/api/utils"; import { getCookie } from "@/api/utils";
console.log("版本1.2.0------------");
const store = useStore(); const store = useStore();
const router = useRouter(); const router = useRouter();

View File

@@ -1,6 +1,6 @@
import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'; import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router';
import routesConfig from './config'; import routesConfig from './config';
import {getCookie} from "@/api/utils"; import { getCookie } from "@/api/utils";
// console.log('routesConfig', routesConfig) // console.log('routesConfig', routesConfig)
const routes = [ const routes = [
@@ -19,9 +19,9 @@ const router = createRouter({
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
if (!getCookie('token')) { if (!getCookie('token')) {
if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") { if (import.meta.env.MODE === "development" || import.meta.env.MODE === "test") {
to.path.includes('/login') ? next() : next({path: '/login', query: {returnUrl: to.fullPath}}) to.path.includes('/login') ? next() : next({ path: '/login', query: { returnUrl: to.fullPath } })
}else { } else {
window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE+to.fullPath window.location.href = import.meta.env.VITE_BASE_LOGIN_URL + import.meta.env.VITE_BASE + to.fullPath
} }
} }
next() next()

View File

@@ -218,12 +218,7 @@
<!-- <img style="width: 19.5px; height: 22px" :src="el.img" /> <!-- <img style="width: 19.5px; height: 22px" :src="el.img" />
<div style="margin-left: 15px">{{ el.name }}</div> --> <div style="margin-left: 15px">{{ el.name }}</div> -->
</div> </div>
<div <div>
v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
>
<div <div
v-if=" v-if="
new Date(data.planDto.beginTime).getTime() > new Date(data.planDto.beginTime).getTime() >
@@ -232,20 +227,23 @@
class="download" class="download"
> >
<img <img
style="width: 13px; height: 12px" style="width: 16px; height: 15px"
src="../../assets/image/faceteach/download.png" src="../../assets/image/download.png"
/> />
<div style="margin-left: 2.5px" @click="downloads(el)"> <div
style="margin-left: 5px; color: #999"
@click="downloads(el)"
>
下载 下载
</div> </div>
</div> </div>
<div v-else class="download"> <div v-else class="download">
<img <img
style="width: 13px; height: 12px" style="width: 16px; height: 15px; color: #2478ff"
src="../../assets/image/faceteach/download.png" src="../../assets/image/download.png"
/> />
<div <div
style="margin-left: 2.5px; color: #999" style="margin-left: 5px"
@click="download(el.name ? el.response.data : el)" @click="download(el.name ? el.response.data : el)"
> >
下载 下载
@@ -280,26 +278,21 @@
作业 作业
</div> </div>
</div> </div>
<div
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toWork"
>
交作业
</div>
</div> </div>
</div> </div>
<div
v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
:style="{
background:
new Date(data.planDto?.beginTime).getTime() >
new Date().getTime()
? '#999'
: '',
}"
class="submit"
@click="toWork"
>
交作业
</div>
</div> </div>
<div <div
v-else v-else
@@ -348,10 +341,6 @@
</div> </div>
</div> </div>
<div <div
v-if="
projectStatus !== '3' &&
new Date(projectEndTime).getTime() > new Date().getTime()
"
:style="{ :style="{
background: background:
new Date(data.planDto?.beginTime).getTime() > new Date(data.planDto?.beginTime).getTime() >
@@ -415,6 +404,7 @@ const {
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId }); const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
console.log("datadatadatadatadatadatadata", data); console.log("datadatadatadatadatadatadata", data);
console.log("项目状态字段传递", projectStatus, projectEndTime); console.log("项目状态字段传递", projectStatus, projectEndTime);
const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId)); const teacherInfo = useUserInfo(computed(() => data.value?.planDto?.teacherId));
const state = reactive({ const state = reactive({
@@ -562,6 +552,7 @@ function toWork() {
let date2 = new Date().getTime(); let date2 = new Date().getTime();
if (date1 > date2) { if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
return;
} }
} }
router.push({ router.push({
@@ -584,6 +575,7 @@ function toExamItem(obj) {
let date2 = new Date().getTime(); let date2 = new Date().getTime();
if (date1 > date2) { if (date1 > date2) {
ElMessage.warning("未到开始时间,请耐心等待!"); ElMessage.warning("未到开始时间,请耐心等待!");
return;
} }
} }
console.log("obj", obj.examinationTestId); console.log("obj", obj.examinationTestId);

View File

@@ -26,9 +26,12 @@
</div> </div>
<div class="allimg"> <div class="allimg">
<img src="../../assets/image/homeworkpage/link.png" /> <img src="../../assets/image/homeworkpage/link.png" />
<img src="../../assets/image/homeworkpage/pre.png" /> <!-- <img src="../../assets/image/homeworkpage/pre.png" />
<img src="../../assets/image/homeworkpage/next.png" /> <img src="../../assets/image/homeworkpage/next.png" /> -->
<img src="../../assets/image/homeworkpage/delete.png" /> <img
src="../../assets/image/homeworkpage/delete.png"
@click="deleteAll"
/>
</div> </div>
</div> </div>
</div> </div>
@@ -84,10 +87,16 @@ export default {
// clearFiles(); // clearFiles();
}); });
}; };
const deleteAll = () => {
console.log("点击");
textarea.value = "";
fileList.value = [];
};
return { return {
...toRefs(state), ...toRefs(state),
publishWork, publishWork,
textarea, textarea,
deleteAll,
}; };
}, },
}; };