三维加载提示,系统重定向设置

main
许宏杰 2 weeks ago
parent 96c391e780
commit f5f26481bf

@ -58,7 +58,7 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入 // 在免登录白名单,直接进入
next() next()
} else { } else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/map?redirect=${to.fullPath}`) // 否则全部重定向到登录页
NProgress.done() NProgress.done()
} }
} }

@ -207,6 +207,8 @@
</template> </template>
<script setup name="Map"> <script setup name="Map">
import { h } from "vue";
import { ElNotification } from "element-plus";
import NavigationBar from "@/components/NavigationBar"; import NavigationBar from "@/components/NavigationBar";
import marsMap from "@/components/marsMap"; import marsMap from "@/components/marsMap";
import markerIcon from "@/assets/images/map-marker.png"; import markerIcon from "@/assets/images/map-marker.png";
@ -333,11 +335,6 @@ onUnmounted(() => {
const lookIamge = (index) => { const lookIamge = (index) => {
initialIndex.value = index; // initialIndex.value = index; //
showPreview.value = true; showPreview.value = true;
// if (!exampleFile) return;
// const imageItem = document.getElementById(`businessImage` + index);
// console.log('sssddd',)
// imageItem.click();
}; };
/** /**
@ -573,6 +570,14 @@ const changeModel = (index) => {
currentModelIndex.value = index; currentModelIndex.value = index;
if (index == 1) { if (index == 1) {
if (mapLayer.tiles3dLayer == undefined) { if (mapLayer.tiles3dLayer == undefined) {
ElNotification({
title: "渲染小提示!",
message: h(
"i",
{ style: "color: teal" },
"首次加载三维模型需要一段时间,请耐心等待。"
),
});
mapLayer.tiles3dLayer = new mars3d.layer.TilesetLayer({ mapLayer.tiles3dLayer = new mars3d.layer.TilesetLayer({
name: "模型名称", name: "模型名称",
url: "http://localhost:9090/B3dmqlh06/tileset.json", url: "http://localhost:9090/B3dmqlh06/tileset.json",

Loading…
Cancel
Save