|
@@ -54,10 +54,11 @@ import {
|
|
|
} from "vue";
|
|
|
import { useApp } from "/@/hooks/userApp";
|
|
|
import { useSceneStore } from "/@/store/modules/scene";
|
|
|
+import loadLOGO from "/@/assets/images/loading.jpg";
|
|
|
|
|
|
const sceneStore = useSceneStore();
|
|
|
// import { useStore } from "vuex";
|
|
|
-// import { useApp } from "@/app";
|
|
|
+
|
|
|
const props = defineProps({
|
|
|
small: {
|
|
|
type: Boolean,
|
|
@@ -71,8 +72,8 @@ const props = defineProps({
|
|
|
// const store = useStore();
|
|
|
const progres = ref(0);
|
|
|
const enter = ref(false);
|
|
|
-const thumb = ref(null);
|
|
|
-const thumbStyle = ref(null);
|
|
|
+const thumb = ref<string>("");
|
|
|
+const thumbStyle = ref<string>("");
|
|
|
const show = ref(true);
|
|
|
const metadata = computed(() => sceneStore.metadata);
|
|
|
// store.getters["scene/loadingLogoFile"]
|
|
@@ -87,28 +88,20 @@ watchEffect(async () => {
|
|
|
// debugger
|
|
|
onMounted(async () => {
|
|
|
await nextTick();
|
|
|
- const [app] = useApp();
|
|
|
- console.log("app22", app);
|
|
|
- app().then(async (sdk: any) => {
|
|
|
- console.log("hey", sdk);
|
|
|
- debugger;
|
|
|
+ const app = await useApp();
|
|
|
+
|
|
|
+ app.Scene.on("ready", () => {
|
|
|
+ show.value = false;
|
|
|
+ });
|
|
|
+ app.store.on("metadata", (metadata) => {
|
|
|
+ if (metadata.entry) {
|
|
|
+ thumb.value = app.resource.getUserResourceURL("thumb-2k.jpg");
|
|
|
+ } else {
|
|
|
+ thumb.value = loadLOGO;
|
|
|
+ thumbStyle.value = "default";
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
- // console.log("app", app);
|
|
|
- // useApp().then((app) => {
|
|
|
- // app.Scene.on("ready", () => {
|
|
|
- // show.value = false;
|
|
|
- // });
|
|
|
- // app.store.on("metadata", (metadata) => {
|
|
|
- // if (metadata.entry) {
|
|
|
- // thumb.value = app.resource.getUserResourceURL("thumb-2k.jpg");
|
|
|
- // } else {
|
|
|
- // thumb.value = require("@/assets/images/loading.jpg");
|
|
|
- // thumbStyle.value = "default";
|
|
|
- // }
|
|
|
- // });
|
|
|
- // });
|
|
|
}
|
|
|
});
|
|
|
</script>
|