|
@@ -5,6 +5,8 @@ import ScrollDown from '@/components/ScrollDown.vue';
|
5
|
5
|
import Image from '@/components/Image.vue';
|
6
|
6
|
import { preload } from '@/utils/preload';
|
7
|
7
|
|
|
8
|
+const fixedLogo = './fixed-logo.png';
|
|
9
|
+
|
8
|
10
|
const loading = ref(true);
|
9
|
11
|
const percent = ref(0);
|
10
|
12
|
const resources = ref([]);
|
|
@@ -13,6 +15,11 @@ const updateCallback = (num) => {
|
13
|
15
|
percent.value = Math.round(num * 100);
|
14
|
16
|
}
|
15
|
17
|
|
|
18
|
+const onClick = () => {
|
|
19
|
+ // logo2URL 来自于 public/config.js
|
|
20
|
+ window.location.href = logo2URL;
|
|
21
|
+}
|
|
22
|
+
|
16
|
23
|
onMounted(() => {
|
17
|
24
|
preload(updateCallback).then((res) => {
|
18
|
25
|
loading.value = false;
|
|
@@ -23,9 +30,21 @@ onMounted(() => {
|
23
|
30
|
|
24
|
31
|
<template>
|
25
|
32
|
<Loader :loading="loading" :percent="percent" />
|
26
|
|
- <ScrollDown />
|
27
|
|
- <Image v-for="res in resources" :key="res.image" :resource="res"></Image>
|
|
33
|
+ <ScrollDown />
|
|
34
|
+ <Image v-for="res in resources" :key="res.image" :resource="res"></Image>
|
|
35
|
+ <img :src="fixedLogo" alt="" class="fixed-log" @click="onClick">
|
28
|
36
|
</template>
|
29
|
37
|
|
30
|
38
|
<style lang="less" scoped>
|
|
39
|
+.fixed-log {
|
|
40
|
+ position: fixed;
|
|
41
|
+ right: 20px;
|
|
42
|
+ bottom: 400px;
|
|
43
|
+ z-index: 50;
|
|
44
|
+ width: 48px;
|
|
45
|
+ height: 48px;
|
|
46
|
+ border: none;
|
|
47
|
+ box-shadow: 0 0 2px 2px rgba(0,0,0, .1);
|
|
48
|
+ border-radius: 50%;
|
|
49
|
+}
|
31
|
50
|
</style>
|