mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-08 02:16:47 +08:00
feat:增加版本号
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -218,12 +218,7 @@
|
||||
<!-- <img style="width: 19.5px; height: 22px" :src="el.img" />
|
||||
<div style="margin-left: 15px">{{ el.name }}</div> -->
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
projectStatus !== '3' &&
|
||||
new Date(projectEndTime).getTime() > new Date().getTime()
|
||||
"
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
v-if="
|
||||
new Date(data.planDto.beginTime).getTime() >
|
||||
@@ -232,20 +227,23 @@
|
||||
class="download"
|
||||
>
|
||||
<img
|
||||
style="width: 13px; height: 12px"
|
||||
src="../../assets/image/faceteach/download.png"
|
||||
style="width: 16px; height: 15px"
|
||||
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 v-else class="download">
|
||||
<img
|
||||
style="width: 13px; height: 12px"
|
||||
src="../../assets/image/faceteach/download.png"
|
||||
style="width: 16px; height: 15px; color: #2478ff"
|
||||
src="../../assets/image/download.png"
|
||||
/>
|
||||
<div
|
||||
style="margin-left: 2.5px; color: #999"
|
||||
style="margin-left: 5px"
|
||||
@click="download(el.name ? el.response.data : el)"
|
||||
>
|
||||
下载
|
||||
@@ -280,26 +278,21 @@
|
||||
作业
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:style="{
|
||||
background:
|
||||
new Date(data.planDto?.beginTime).getTime() >
|
||||
new Date().getTime()
|
||||
? '#999'
|
||||
: '',
|
||||
}"
|
||||
class="submit"
|
||||
@click="toWork"
|
||||
>
|
||||
交作业
|
||||
</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
|
||||
v-else
|
||||
@@ -348,10 +341,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
projectStatus !== '3' &&
|
||||
new Date(projectEndTime).getTime() > new Date().getTime()
|
||||
"
|
||||
:style="{
|
||||
background:
|
||||
new Date(data.planDto?.beginTime).getTime() >
|
||||
@@ -415,6 +404,7 @@ const {
|
||||
const { data } = useRequest(STU_OFFCOURSE_DETAIL, { courseId });
|
||||
console.log("datadatadatadatadatadatadata", data);
|
||||
console.log("项目状态字段传递", projectStatus, projectEndTime);
|
||||
|
||||
const teacherInfo = useUserInfo(computed(() => 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);
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
</div>
|
||||
<div class="allimg">
|
||||
<img src="../../assets/image/homeworkpage/link.png" />
|
||||
<img src="../../assets/image/homeworkpage/pre.png" />
|
||||
<img src="../../assets/image/homeworkpage/next.png" />
|
||||
<img src="../../assets/image/homeworkpage/delete.png" />
|
||||
<!-- <img src="../../assets/image/homeworkpage/pre.png" />
|
||||
<img src="../../assets/image/homeworkpage/next.png" /> -->
|
||||
<img
|
||||
src="../../assets/image/homeworkpage/delete.png"
|
||||
@click="deleteAll"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,10 +87,16 @@ export default {
|
||||
// clearFiles();
|
||||
});
|
||||
};
|
||||
const deleteAll = () => {
|
||||
console.log("点击");
|
||||
textarea.value = "";
|
||||
fileList.value = [];
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
publishWork,
|
||||
textarea,
|
||||
deleteAll,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user