mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/student-h5.git
synced 2025-12-09 02:46:47 +08:00
feat:修改关卡
This commit is contained in:
5
.env
5
.env
@@ -1,7 +1,7 @@
|
||||
VITE_BASE=/fe-student-h5
|
||||
VITE_BASE_API=/
|
||||
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
|
||||
|
||||
|
||||
@@ -18,4 +18,5 @@ VITE_TASK_WHITE_TYPE=-8-,-12-,-13-
|
||||
# boe域名
|
||||
VUE_APP_BOE_API_URL=//u-pre.boe.com
|
||||
#评论上传图片
|
||||
VITE_IMG=/manageApi
|
||||
VITE_IMG=/manageApi
|
||||
VITE_BASE_FILE_PATH=/fe-student-h5/upload
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-01-13 11:42:48
|
||||
* @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
|
||||
* @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 ROUTERTASK_LIST = '/stu/router/chapterList post'
|
||||
export const ROUTERTASK_LIST = '/stu/router/chapterList'
|
||||
//获取项目详情
|
||||
export const PROJECT_DETAIL = '/admin/project/detail'
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="pathDetail pathDetailback">
|
||||
<div
|
||||
v-for="(item, i) in data"
|
||||
v-for="(item, i) in data?.list"
|
||||
:key="i"
|
||||
class="cha"
|
||||
:style="{
|
||||
top: `${imgAttr.positions[i]?.top - (current === i ? 5 : 0)}px`,
|
||||
left: `${imgAttr.positions[i]?.left - (current === i ? 10 : 0)}px`,
|
||||
top: `${imgAttr.positions[i]?.top - (current === i ? 1 : 0)}px`,
|
||||
left: `${imgAttr.positions[i]?.left - (current === i ? 11 : 0)}px`,
|
||||
}"
|
||||
>
|
||||
<div
|
||||
@@ -31,7 +31,7 @@ import { computed, defineProps, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router/dist/vue-router";
|
||||
import { ElLoading } from "element-plus";
|
||||
import { ROUTERTASK_LIST } from "@/api/api";
|
||||
import { usePage } from "@/api/request";
|
||||
import { usePage, useRequest } from "@/api/request";
|
||||
const listheight = document.body.clientHeight - 300 + "px";
|
||||
console.log("listheight", listheight);
|
||||
const props = defineProps({
|
||||
@@ -99,15 +99,20 @@ const closeLoading = () => {
|
||||
// },
|
||||
// ]);
|
||||
// closeLoading();
|
||||
const { data } = usePage(ROUTERTASK_LIST, { routerId: props.routerId }, (e) => {
|
||||
console.log("我请求成功了吗", e);
|
||||
e.data.rows.reverse();
|
||||
const { data } = useRequest(ROUTERTASK_LIST, { routerId: props.routerId });
|
||||
console.log("data", data);
|
||||
let current = ref(null);
|
||||
watch(data, () => {
|
||||
data.value.list.reverse();
|
||||
current.value = data.value.list.findIndex(
|
||||
(e) => e.id === data.value.currentChapterId
|
||||
);
|
||||
closeLoading();
|
||||
});
|
||||
const current = computed(() =>
|
||||
data.value.findIndex((e) => e.chapterId === props.currentStageId)
|
||||
);
|
||||
console.log("data", data);
|
||||
// const current = computed(() => {
|
||||
// data.value.list.findIndex((e) => e.id === data.value.currentChapterId);
|
||||
// });
|
||||
console.log("current", current);
|
||||
|
||||
function show() {
|
||||
visiable.value = true;
|
||||
@@ -115,9 +120,10 @@ function show() {
|
||||
|
||||
function toDetail(i) {
|
||||
// console.log("import.meta.env.MODE", import.meta.env.MODE);
|
||||
// if (current.value !== i) {
|
||||
// return;
|
||||
// }
|
||||
console.log("current.value !== i", current, i);
|
||||
if (current.value !== i) {
|
||||
return;
|
||||
}
|
||||
import.meta.env.MODE === "development" || import.meta.env.MODE === "test"
|
||||
? router.push({
|
||||
path: "/pathmappage",
|
||||
|
||||
@@ -123,6 +123,21 @@
|
||||
}}
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
@@ -168,7 +183,16 @@ const handleClick = (tab, event) => {
|
||||
console.log("附件", tab, event);
|
||||
};
|
||||
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) => {
|
||||
ElMessage.warning("未在有效时间范围内,请耐心等待!");
|
||||
|
||||
@@ -126,6 +126,21 @@
|
||||
}}
|
||||
</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>
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -141,7 +141,10 @@
|
||||
style="width: 16px; height: 15px"
|
||||
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 style="margin-left: 5px;color:#999;" @click="download(el)">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2023-01-19 11:28:11
|
||||
* @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
|
||||
* @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 = () => {
|
||||
router.push({
|
||||
path: "/pathdetails",
|
||||
query: { routerId: 404 },
|
||||
query: { routerId: 459 },
|
||||
});
|
||||
// router.push({
|
||||
// path: "/projectdetails",
|
||||
// query: { projectId: 591 },
|
||||
// query: { projectId: 684 },
|
||||
// });
|
||||
// router.push({
|
||||
// path: "/faceteach",
|
||||
|
||||
Reference in New Issue
Block a user