laozt 1 year ago
parent f6138673dd
commit ff3a569359

@ -56,6 +56,7 @@
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"vue": "2.6.12",
"vue-3d-model": "^1.4.1",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-meta": "2.4.0",

Binary file not shown.

@ -0,0 +1,42 @@
# 3ds Max Wavefront OBJ Exporter v0.99 - (c)2007 guruware
# ´´½¨µÄÎļþ:27.10.2023 13:44:57
newmtl wire_214228153
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.8392 0.8941 0.6000
Kd 0.8392 0.8941 0.6000
Ks 0.3500 0.3500 0.3500
newmtl wire_006135113
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.0235 0.5294 0.4431
Kd 0.0235 0.5294 0.4431
Ks 0.3500 0.3500 0.3500
newmtl wire_087224143
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.3412 0.8784 0.5608
Kd 0.3412 0.8784 0.5608
Ks 0.3500 0.3500 0.3500
newmtl wire_166229229
Ns 32
d 1
Tr 0
Tf 1 1 1
illum 2
Ka 0.6510 0.8980 0.8980
Kd 0.6510 0.8980 0.8980
Ks 0.3500 0.3500 0.3500

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,56 +1,59 @@
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth'
import { isRelogin } from '@/utils/request'
import router from "./router";
import store from "./store";
import { Message } from "element-ui";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import { getToken } from "@/utils/auth";
import { isRelogin } from "@/utils/request";
NProgress.configure({ showSpinner: false })
NProgress.configure({ showSpinner: false });
const whiteList = ['/login', '/register']
const whiteList = ["/login", "/register", "/3dmodel"];
router.beforeEach((to, from, next) => {
NProgress.start()
NProgress.start();
if (getToken()) {
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
to.meta.title && store.dispatch("settings/setTitle", to.meta.title);
/* has token*/
if (to.path === '/login') {
next({ path: '/' })
NProgress.done()
if (to.path === "/login") {
next({ path: "/" });
NProgress.done();
} else {
if (store.getters.roles.length === 0) {
isRelogin.show = true
isRelogin.show = true;
// 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(() => {
isRelogin.show = false
store.dispatch('GenerateRoutes').then(accessRoutes => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
})
}).catch(err => {
store.dispatch('LogOut').then(() => {
Message.error(err)
next({ path: '/' })
})
store
.dispatch("GetInfo")
.then(() => {
isRelogin.show = false;
store.dispatch("GenerateRoutes").then((accessRoutes) => {
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes); // 动态添加可访问路由表
next({ ...to, replace: true }); // hack方法 确保addRoutes已完成
});
})
.catch((err) => {
store.dispatch("LogOut").then(() => {
Message.error(err);
next({ path: "/" });
});
});
} else {
next()
next();
}
}
} else {
// 没有token
if (whiteList.indexOf(to.path) !== -1) {
// 在免登录白名单,直接进入
next()
next();
} else {
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页
NProgress.done()
next(`/login?redirect=${encodeURIComponent(to.fullPath)}`); // 否则全部重定向到登录页
NProgress.done();
}
}
})
});
router.afterEach(() => {
NProgress.done()
})
NProgress.done();
});

@ -41,6 +41,11 @@ export const constantRoutes = [
},
],
},
{
path: "/3dmodel",
component: () => import("@/views/3dmodel"),
hidden: true,
},
{
path: "/login",
component: () => import("@/views/login"),

@ -0,0 +1,27 @@
<template>
<div>
<!-- <model-collada
:backgroundAlpha="0"
:rotation="{
x: -Math.PI / 2,
y: 0,
z: 0,
}"
src="http://localhost/3dmodel/elf.dae"
/> -->
<!-- src="http://localhost/3dmodel/tree.obj" -->
<model-obj src="http://localhost/3dmodel/2.obj" />
<!-- src="http://localhost/3dmodel/dancing.fbx" -->
<!-- <model-fbx src="http://localhost/3dmodel/1.fbx" /> -->
</div>
</template>
<script>
import { ModelCollada, ModelObj, ModelFbx } from "vue-3d-model";
export default {
components: {
ModelCollada,
ModelObj,
ModelFbx,
},
};
</script>
Loading…
Cancel
Save