Yansen 2 年之前
父節點
當前提交
93cc387597
共有 3 個檔案被更改,包括 47 行新增3 行删除
  1. 2
    2
      public/config.js
  2. 36
    0
      src/components/IFrame.vue
  3. 9
    1
      src/pages/pg4/video.vue

+ 2
- 2
public/config.js 查看文件

9
 const link1URL = 'http://h5.njyunzhi.com/wenhua818-2/index.html';
9
 const link1URL = 'http://h5.njyunzhi.com/wenhua818-2/index.html';
10
 
10
 
11
 // 分享接口地址
11
 // 分享接口地址
12
-// const API_BASE = 'http://api.h5.zijincao.njyunzhi.com';
13
-const API_BASE = '';
12
+const API_BASE = 'http://api.h5.zijincao.njyunzhi.com';
13
+// const API_BASE = '';

+ 36
- 0
src/components/IFrame.vue 查看文件

1
+<template>
2
+  <div class="iframe-wrapper">
3
+    <img class="goback abs" src="/images/goback.png" alt="">
4
+    <iframe src="https://m2.nbs.cn/article/564333.html?id=564333&mid=1" frameborder="0"></iframe>
5
+  </div>
6
+</template>
7
+
8
+<script setup>
9
+
10
+</script>
11
+
12
+<style lang="less" scoped>
13
+
14
+.iframe-wrapper {
15
+  position: fixed;
16
+  width: 100vw;
17
+  height: 100vh;
18
+  top: 0;
19
+  left: 0;
20
+
21
+  .goback {
22
+    position: absolute;
23
+    z-index: 10;
24
+    width: 40px;
25
+    top: 12px;
26
+    left: 12px;
27
+  }
28
+
29
+  iframe {
30
+    width: 100%;
31
+    height: 100%;
32
+    z-index: 1;
33
+  }
34
+}
35
+
36
+</style>

+ 9
- 1
src/pages/pg4/video.vue 查看文件

24
 
24
 
25
 <script setup>
25
 <script setup>
26
   import { onMounted, ref } from "vue";
26
   import { onMounted, ref } from "vue";
27
-  import { useRouter } from "vue-router";
27
+  import { useRouter, useRoute } from "vue-router";
28
   import { useModel } from '@zjxpcyc/vue-tiny-store';
28
   import { useModel } from '@zjxpcyc/vue-tiny-store';
29
 
29
 
30
   const { play, pause } = useModel('audio');
30
   const { play, pause } = useModel('audio');
31
   const router = useRouter();
31
   const router = useRouter();
32
+  const route = useRoute();
32
   const mediaRef = ref();
33
   const mediaRef = ref();
33
   const show = ref(false);
34
   const show = ref(false);
34
   const controls = ref();
35
   const controls = ref();
35
 
36
 
37
+  const { query } = route;
38
+  const { from } = query;
39
+
40
+  // if (from) {
41
+  //   window.location.href = decodeURIComponent(from);
42
+  // }
43
+
36
   const onReplay = () => {
44
   const onReplay = () => {
37
     mediaRef.value.play();
45
     mediaRef.value.play();
38
     show.value = false;
46
     show.value = false;