张延森 il y a 2 ans
Parent
révision
209186e7b7
8 fichiers modifiés avec 25 ajouts et 4 suppressions
  1. 1
    1
      index.html
  2. 2
    0
      public/config.js
  3. BIN
      public/fixed-logo.png
  4. BIN
      public/images/1.jpg
  5. BIN
      public/images/23.jpg
  6. BIN
      public/index.jpg
  7. 21
    2
      src/App.vue
  8. 1
    1
      src/components/Loader.vue

+ 1
- 1
index.html Voir le fichier

@@ -6,7 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7 7
     <link rel="stylesheet" href="./fonts/iconfont.css">
8 8
     <script src="./wx/jweixin-1.6.0.js"></script>
9
-    <script src="./share.js"></script>
9
+    <script src="./config.js"></script>
10 10
     <title>和“宁好”一起,跟着诗歌游南京</title>
11 11
   </head>
12 12
   <body>

public/share.js → public/config.js Voir le fichier

@@ -4,3 +4,5 @@ const shareOptTpl = {
4 4
   desc: '',
5 5
   imgUrl: location.origin + location.pathname.replace('index.html', '') + 'share.png',
6 6
 }
7
+
8
+const logo2URL = 'https://s.wenkor.com/group-collection-20220706/#/'

BIN
public/fixed-logo.png Voir le fichier


BIN
public/images/1.jpg Voir le fichier


BIN
public/images/23.jpg Voir le fichier


BIN
public/index.jpg Voir le fichier


+ 21
- 2
src/App.vue Voir le fichier

@@ -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>

+ 1
- 1
src/components/Loader.vue Voir le fichier

@@ -40,7 +40,7 @@ const maskRef = ref();
40 40
 const progressStyle = computed(() => ({ width: `${props.percent}%` }));
41 41
 const visibleStyle = ref({  })
42 42
 const onEnd = () => {
43
-  visibleStyle.value = { visibility: 'hidden' }
43
+  visibleStyle.value = { display: 'none' }
44 44
 }
45 45
 
46 46
 const onTouchMove = (e) => {