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,5 +9,5 @@ const shareOptTpl = {
9 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 查看文件

@@ -0,0 +1,36 @@
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,15 +24,23 @@
24 24
 
25 25
 <script setup>
26 26
   import { onMounted, ref } from "vue";
27
-  import { useRouter } from "vue-router";
27
+  import { useRouter, useRoute } from "vue-router";
28 28
   import { useModel } from '@zjxpcyc/vue-tiny-store';
29 29
 
30 30
   const { play, pause } = useModel('audio');
31 31
   const router = useRouter();
32
+  const route = useRoute();
32 33
   const mediaRef = ref();
33 34
   const show = ref(false);
34 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 44
   const onReplay = () => {
37 45
     mediaRef.value.play();
38 46
     show.value = false;