feat:修改关卡

This commit is contained in:
lixg
2023-02-27 17:52:56 +08:00
parent 6d458db4c6
commit 3c6482534c
7 changed files with 72 additions and 23 deletions

3
.env
View File

@@ -1,7 +1,7 @@
VITE_BASE=/fe-student-h5 VITE_BASE=/fe-student-h5
VITE_BASE_API=/ VITE_BASE_API=/
VITE_OUTPUT_DIR=./dist VITE_OUTPUT_DIR=./dist
VITE_BASE_LOGIN_URL=//u-pre.boe.com/web?returnUrl= VITE_BASE_LOGIN_URL=//u-pre.boe.com/m/loginuser?returnUrl=
VITE_PROXY_URL=http://43.143.139.204/manageApi VITE_PROXY_URL=http://43.143.139.204/manageApi
@@ -19,3 +19,4 @@ VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
VUE_APP_BOE_API_URL=//u-pre.boe.com VUE_APP_BOE_API_URL=//u-pre.boe.com
#评论上传图片 #评论上传图片
VITE_IMG=/manageApi VITE_IMG=/manageApi
VITE_BASE_FILE_PATH=/fe-student-h5/upload

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-13 11:42:48 * @Date: 2023-01-13 11:42:48
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-22 14:51:53 * @LastEditTime: 2023-02-27 15:35:34
* @FilePath: /stu_h5/src/api/api.js * @FilePath: /stu_h5/src/api/api.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -71,7 +71,7 @@ export const COMMENT_ADD = '/comment/add post'
// 外部考试详情接口 // 外部考试详情接口
export const EXTERNALEXAM = `/external/exam/queryExternalExam` export const EXTERNALEXAM = `/external/exam/queryExternalExam`
//关卡列表接口 //关卡列表接口
export const ROUTERTASK_LIST = '/stu/router/chapterList post' export const ROUTERTASK_LIST = '/stu/router/chapterList'
//获取项目详情 //获取项目详情
export const PROJECT_DETAIL = '/admin/project/detail' export const PROJECT_DETAIL = '/admin/project/detail'

View File

@@ -1,12 +1,12 @@
<template> <template>
<div class="pathDetail pathDetailback"> <div class="pathDetail pathDetailback">
<div <div
v-for="(item, i) in data" v-for="(item, i) in data?.list"
:key="i" :key="i"
class="cha" class="cha"
:style="{ :style="{
top: `${imgAttr.positions[i]?.top - (current === i ? 5 : 0)}px`, top: `${imgAttr.positions[i]?.top - (current === i ? 1 : 0)}px`,
left: `${imgAttr.positions[i]?.left - (current === i ? 10 : 0)}px`, left: `${imgAttr.positions[i]?.left - (current === i ? 11 : 0)}px`,
}" }"
> >
<div <div
@@ -31,7 +31,7 @@ import { computed, defineProps, ref, watch } from "vue";
import { useRouter } from "vue-router/dist/vue-router"; import { useRouter } from "vue-router/dist/vue-router";
import { ElLoading } from "element-plus"; import { ElLoading } from "element-plus";
import { ROUTERTASK_LIST } from "@/api/api"; import { ROUTERTASK_LIST } from "@/api/api";
import { usePage } from "@/api/request"; import { usePage, useRequest } from "@/api/request";
const listheight = document.body.clientHeight - 300 + "px"; const listheight = document.body.clientHeight - 300 + "px";
console.log("listheight", listheight); console.log("listheight", listheight);
const props = defineProps({ const props = defineProps({
@@ -99,15 +99,20 @@ const closeLoading = () => {
// }, // },
// ]); // ]);
// closeLoading(); // closeLoading();
const { data } = usePage(ROUTERTASK_LIST, { routerId: props.routerId }, (e) => { const { data } = useRequest(ROUTERTASK_LIST, { routerId: props.routerId });
console.log("我请求成功了吗", e); console.log("data", data);
e.data.rows.reverse(); let current = ref(null);
watch(data, () => {
data.value.list.reverse();
current.value = data.value.list.findIndex(
(e) => e.id === data.value.currentChapterId
);
closeLoading(); closeLoading();
}); });
const current = computed(() => // const current = computed(() => {
data.value.findIndex((e) => e.chapterId === props.currentStageId) // data.value.list.findIndex((e) => e.id === data.value.currentChapterId);
); // });
console.log("data", data); console.log("current", current);
function show() { function show() {
visiable.value = true; visiable.value = true;
@@ -115,9 +120,10 @@ function show() {
function toDetail(i) { function toDetail(i) {
// console.log("import.meta.env.MODE", import.meta.env.MODE); // console.log("import.meta.env.MODE", import.meta.env.MODE);
// if (current.value !== i) { console.log("current.value !== i", current, i);
// return; if (current.value !== i) {
// } return;
}
import.meta.env.MODE === "development" || import.meta.env.MODE === "test" import.meta.env.MODE === "development" || import.meta.env.MODE === "test"
? router.push({ ? router.push({
path: "/pathmappage", path: "/pathmappage",

View File

@@ -123,6 +123,21 @@
}} }}
</div> </div>
</div> </div>
<div class="download">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px; color: rgba(36, 120, 255, 1)"
@click="download(el)"
>
下载
</div>
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">
下载
</div> -->
</div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
@@ -168,7 +183,16 @@ const handleClick = (tab, event) => {
console.log("附件", tab, event); console.log("附件", tab, event);
}; };
const download = (url) => { const download = (url) => {
window.open(url); console.log(
"下载url",
import.meta.env.VITE_BOE_TEST_DETAIL_URL,
import.meta.env.VITE_BASE_FILE_PATH,
process.env.VITE_BASE_FILE_PATH,
url
);
window.open(
window.location.protocol + import.meta.env.VITE_BASE_FILE_PATH + url
);
}; };
const downloads = (url) => { const downloads = (url) => {
ElMessage.warning("未在有效时间范围内,请耐心等待!"); ElMessage.warning("未在有效时间范围内,请耐心等待!");

View File

@@ -126,6 +126,21 @@
}} }}
</div> </div>
</div> </div>
<div class="download">
<img
style="width: 16px; height: 15px"
src="../../assets/image/download.png"
/>
<div
style="margin-left: 5px; color: rgba(36, 120, 255, 1)"
@click="download(el)"
>
下载
</div>
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">
下载
</div> -->
</div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>

View File

@@ -141,7 +141,10 @@
style="width: 16px; height: 15px" style="width: 16px; height: 15px"
src="../../assets/image/download.png" src="../../assets/image/download.png"
/> />
<div style="margin-left: 5px; color: rgba(36, 120, 255, 1)"> <div
style="margin-left: 5px; color: rgba(36, 120, 255, 1)"
@click="download(el)"
>
下载 下载
</div> </div>
<!-- <div style="margin-left: 5px;color:#999;" @click="download(el)"> <!-- <div style="margin-left: 5px;color:#999;" @click="download(el)">

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2023-01-19 11:28:11 * @Date: 2023-01-19 11:28:11
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2023-02-20 10:45:25 * @LastEditTime: 2023-02-27 15:34:11
* @FilePath: /stu_h5/src/views/projectdetails/ProjectPath.vue * @FilePath: /stu_h5/src/views/projectdetails/ProjectPath.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@@ -181,11 +181,11 @@ const handleClick = (tab, event) => {
const goDetails = () => { const goDetails = () => {
router.push({ router.push({
path: "/pathdetails", path: "/pathdetails",
query: { routerId: 404 }, query: { routerId: 459 },
}); });
// router.push({ // router.push({
// path: "/projectdetails", // path: "/projectdetails",
// query: { projectId: 591 }, // query: { projectId: 684 },
// }); // });
// router.push({ // router.push({
// path: "/faceteach", // path: "/faceteach",