feat:修改跳转

This commit is contained in:
lixg
2023-03-01 14:58:04 +08:00
parent 59de81a021
commit 4d4ec3f8e8
7 changed files with 56 additions and 44 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="projectdetails">
<div class="projectdetails" v-if="data?.projectId">
<ReturnHead
text="项目详情"
:showfile="true"
@@ -200,6 +200,13 @@
</div> -->
</div>
</div>
<div v-else>
<el-result icon="success" title="您不是此项目学员" sub-title="请联系管理员">
<template #extra>
<el-button type="primary" @click="toIndex">返回首页</el-button>
</template>
</el-result>
</div>
</template>
<script setup>
@@ -242,16 +249,17 @@ watch(
},
{ deep: true }
);
watch(data, () => {
console.log("data.value.projectId", data.value);
if (data && data.value && !data.value.projectId) {
ElMessage.warning("您不是此项目的学员");
window.open(
import.meta.env.VITE_BOE_BASE_URL + "/mobile/pages/index/index",
"_self"
);
}
});
// watch(data, () => {
// console.log("data.value.projectId", data.value);
// if (data && data.value && !data.value.projectId) {
// ElMessage.warning("您不是此项目的学员");
// console.log("您不是此项目的学员");
// // window.open(
// // import.meta.env.VITE_BOE_BASE_URL + "/mobile/pages/index/index",
// // "_self"
// // );
// }
// });
function getTaskStatus(d) {
if (data.value.status !== 3) {
@@ -576,6 +584,9 @@ const queryAllStatus = (data) => {
}
return true;
};
function toIndex() {
window.location.href = import.meta.env.VITE_BOE_API_URL;
}
</script>
<style lang="scss">