huangxiaojing 2 vuotta sitten
vanhempi
commit
734778fa60
2 muutettua tiedostoa jossa 19 lisäystä ja 3 poistoa
  1. 9 1
      pages/activity/invite-user/guide-pc.vue
  2. 10 2
      pages/activity/invite-user/guide.vue

+ 9 - 1
pages/activity/invite-user/guide-pc.vue

@@ -5,7 +5,7 @@
       <v-tab v-for="item in videoList" :key="item.plateId" style="height: 42px;">{{item.plateName}}</v-tab>
       <v-tabs-items v-model="tab">
         <v-tab-item v-for="item in videoList" :key="item.plateId" style="padding: 10px;">
-          <video v-for="ele in item.videoCourseList" :id="'el-video-' + ele.id" :key="ele.id" class="w165h148" preload="auto" :poster="'http://110.53.221.195:8210/document/newFile/download/0/e858720c23ke455aa60e?fileKey=' + ele.coverImageKey" :src="'http://110.53.221.195:8210/document/newFile/download/0/e858720c23ke455aa60e?fileKey=' + ele.videoKey" @click="play('el-video-' + ele.id)" />
+          <video v-for="ele in item.videoCourseList" :id="'el-video-' + ele.id" :key="ele.id" class="w165h148" preload="auto" :poster="videoURL(ele.coverImageKey)" :src="videoURL(ele.videoKey)" @click="play('el-video-' + ele.id)" />
         </v-tab-item>
       </v-tabs-items>
     </v-tabs>
@@ -13,6 +13,7 @@
 </template>
 
 <script>
+import { fileKeyToUrl } from '@/plugins/file-center.js';
 export default {
   name: 'GuidePc',
   auth: false,
@@ -27,6 +28,13 @@ export default {
   fetch() {
     this.token = this.$route.query.token;
   },
+  computed: {
+    videoURL() {
+      return (key) => {
+        return fileKeyToUrl + key
+      }
+    }
+  },
   created() {
     this.getActiveInfo()
     this.getAdInfoByAdPlace()

+ 10 - 2
pages/activity/invite-user/guide.vue

@@ -4,7 +4,7 @@
     <div v-for="item in videoList" :key="item.plateId">
       <div class="fs16">{{item.plateName}}</div>
       <div :class="item.displayMode === 1 ? 'jjjc-list' : 'jcjc-list'">
-        <video v-for="ele in item.videoCourseList" :id="'el-video-' + ele.id" :key="ele.id" class="w165h148" preload="auto" :poster="'http://110.53.221.195:8210/document/newFile/download/0/e858720c23ke455aa60e?fileKey=' + ele.coverImageKey" :src="'http://110.53.221.195:8210/document/newFile/download/0/e858720c23ke455aa60e?fileKey=' + ele.videoKey" @click="play(item, ele)" />
+        <video v-for="ele in item.videoCourseList" :id="'el-video-' + ele.id" :key="ele.id" class="w165h148" preload="auto" :poster="videoURL(ele.coverImageKey)" :src="videoURL(ele.videoKey)" @click="play(item, ele)" />
       </div>
     </div>
     <div class="return out"><div class="in"><img src="~/assets/image/activity/invite-user/guide/left.png" /></div></div>
@@ -12,6 +12,7 @@
 </template>
 
 <script>
+import { fileKeyToUrl } from '@/plugins/file-center.js';
 export default {
   name: 'Guide',
   auth: false,
@@ -25,13 +26,20 @@ export default {
   fetch() {
     this.token = this.$route.query.token;
   },
+  computed: {
+    videoURL() {
+      return (key) => {
+        return fileKeyToUrl + key
+      }
+    }
+  },
   created() {
     this.getActiveInfo()
     this.getAdInfoByAdPlace()
   },
   methods: {
     async getActiveInfo() {
-      const res = await this.$axios.$get('http://192.168.31.198:8112/videoCourse/client/list');
+      const res = await this.$axios.$get('/videoCourse/client/list');
       this.videoList = res.data;
     },
     async getAdInfoByAdPlace() {